Kuali Rice Development
  1. Kuali Rice Development
  2. KULRICE-5367

Uif Framework - Collections: Delete line should appear if the line is new or always allow deletion is specified on document entry

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-5371Uif Framework - Collections: Hook in authorization
      KULRICE-5346Delete collection line on editing maintenance doc - not deleting old collection line
      KULRICE-5345Add ability to identify new lines in collections
      KULRICE-13233Can't edit or delete line in Labs: Table Collection Edit Details
      KULRICE-1900Problems deleting collection items in maintenance documents
      KULRICE-11199Support for delete icon on collection line headers
      KULRICE-1962Enhance Maintenance Document framework to allow for collection item deletions
      KULRICE-5370Uif Framework - Collections: Support for Total Lines and Grouping
      KULRICE-11460Maintenance Conversion Script - M89 Collection deletion
      KULRICE-13991Fill AFT Gap: Add Line ("Collection Add Line with Custom Actions")
    • Rice Module:
      KRAD
    • Sprint:
      Core 2.5.0-m6 Sprint 1, Core 2.5.0-m6 Sprint 2
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Story Points:
      3

      Description

      See TO DO in comments

      Collections should allow the delete button for an existing collection record by default if the line is new or
      always allow line deletion is set to true. Currently this flag is set on the MaintenanceDocumentEntry. We should move
      it up to the DocumentEntry and also have the flag that can be set on the CollectionGroup. If not set on the CollectionGroup
      and their is an associated document entry it will default to that. If not set should be false. when set to true if overrides
      the check for new line.

      As a developer I want to configure when a collection line can be deleted with the available options of "never", only newly added items or all items.

        Issue Links

          Activity

          Hide
          Jessica Coltrin (Inactive) added a comment -

          double-tagging with 2.0.0-b3 for review.

          Show
          Jessica Coltrin (Inactive) added a comment - double-tagging with 2.0.0-b3 for review.
          Hide
          Claus Niesen added a comment -

          Can be done by adding the following code:

          <property name="lineActions">
            <list>
              <bean parent="Uif-DeleteLineAction" p:render="@{isAddedCollectionItem(#line)}"/>
              <bean parent="Uif-SaveLineAction"/>
            </list>
          </property>
          

          Is that good enough or is a convenient method needed to toggle between delete button on all rows, new rows, no rows?

          Show
          Claus Niesen added a comment - Can be done by adding the following code: <property name= "lineActions" > <list> <bean parent= "Uif-DeleteLineAction" p:render= "@{isAddedCollectionItem(#line)}" /> <bean parent= "Uif-SaveLineAction" /> </list> </property> Is that good enough or is a convenient method needed to toggle between delete button on all rows, new rows, no rows?
          Hide
          Kristina Taylor (Inactive) added a comment -

          Claus Niesen, can you check with KFS to see if your solution is appropriate, as Jerry suggested in our meeting?

          Show
          Kristina Taylor (Inactive) added a comment - Claus Niesen , can you check with KFS to see if your solution is appropriate, as Jerry suggested in our meeting?
          Hide
          James Smith added a comment -

          Claus & Kristina, can I think about this a bit? I think that in screens or transactional documents, we'd always have new records in collections, so moving the flag up to DocumentEntry shouldn't change anything on that side. It sounds as if current maint doc behavior would stay as it is today. If I'm copying a transactional document, I should be clearing out keys so again, the records in the collection should seem "new". So off hand, I think this is okay, but if I could try to think through some other cases and let you know by EOB mountain time today, I'd be grateful.

          Show
          James Smith added a comment - Claus & Kristina, can I think about this a bit? I think that in screens or transactional documents, we'd always have new records in collections, so moving the flag up to DocumentEntry shouldn't change anything on that side. It sounds as if current maint doc behavior would stay as it is today. If I'm copying a transactional document, I should be clearing out keys so again, the records in the collection should seem "new". So off hand, I think this is okay, but if I could try to think through some other cases and let you know by EOB mountain time today, I'd be grateful.
          Hide
          James Smith added a comment -

          Added Kevin and Bryan as watchers.

          Kevin pointed out that we have a situation on our transactional documents and we're curious how the framework would approach it. On accounting docs, like the Distribution of Income and Expense, the initiator adds lines and then routes to the fiscal officer. The fiscal officer can then add and delete lines if they are the owner of the account on the line. So at the first route node, would the accounting lines in the collection still be considered "new" and therefore, deleting would be possible? Can we easily turn off deleting if: a) the account on the line is not associated with the fiscal officer, or b) if there's only one accounting line in the group - basically, one item in the collection? Thanks!

          Show
          James Smith added a comment - Added Kevin and Bryan as watchers. Kevin pointed out that we have a situation on our transactional documents and we're curious how the framework would approach it. On accounting docs, like the Distribution of Income and Expense, the initiator adds lines and then routes to the fiscal officer. The fiscal officer can then add and delete lines if they are the owner of the account on the line. So at the first route node, would the accounting lines in the collection still be considered "new" and therefore, deleting would be possible? Can we easily turn off deleting if: a) the account on the line is not associated with the fiscal officer, or b) if there's only one accounting line in the group - basically, one item in the collection? Thanks!
          Hide
          Jerry Neal (Inactive) added a comment -

          Hi James,

          Yes this will be possible (and there a few different ways). KIM permissions can be setup to determine view/edit status of a line. So you can setup a permissions for accounting lines. If the user doesn't have the permission the line will become readonly. So you can change the expression on the delete button to:

          <bean parent="Uif-DeleteLineAction" p:render="@

          {isAddedCollectionItem(#line) || !readOnlyLine}

          "/>

          There are various other ways as well. We still support edit modes, and you can create/export any sort of flag or function you need for your expressions.

          Once you guys get around to converting we can add things that you determine would be helpful.

          thanks
          Jerry

          Show
          Jerry Neal (Inactive) added a comment - Hi James, Yes this will be possible (and there a few different ways). KIM permissions can be setup to determine view/edit status of a line. So you can setup a permissions for accounting lines. If the user doesn't have the permission the line will become readonly. So you can change the expression on the delete button to: <bean parent="Uif-DeleteLineAction" p:render="@ {isAddedCollectionItem(#line) || !readOnlyLine} "/> There are various other ways as well. We still support edit modes, and you can create/export any sort of flag or function you need for your expressions. Once you guys get around to converting we can add things that you determine would be helpful. thanks Jerry
          Hide
          James Smith added a comment -

          Thanks Jerry. I think one of our biggest targets of analysis will be how best to expose our rich presentation controller logic to the Spring EL, but that's really tangential to this. At this point in time, I don't think the KFS team has any further concerns here. Thanks greatly everyone!

          Show
          James Smith added a comment - Thanks Jerry. I think one of our biggest targets of analysis will be how best to expose our rich presentation controller logic to the Spring EL, but that's really tangential to this. At this point in time, I don't think the KFS team has any further concerns here. Thanks greatly everyone!
          Hide
          Claus Niesen added a comment - - edited

          ToDo: Check to see if we can document the code snipped somewhere (KRAD User Guide, KRAD Library, ...)

          Show
          Claus Niesen added a comment - - edited ToDo: Check to see if we can document the code snipped somewhere (KRAD User Guide, KRAD Library, ...) Libary example with AFT KRAD Guide -> Collection Groups -> Like Actions KNS to KRAD Conversion Guide Done
          Show
          Shannon Hess added a comment - All TODOs are now done. Library Example: local - http://localhost:8080/krad-dev/kr-krad/kradsampleapp?viewId=Demo-CollectionDeleteLineView env14 - http://env14.rice.kuali.org/kr-krad/kradsampleapp?viewId=Demo-CollectionDeleteLineView AFT - DemoCollectionFeaturesDeleteLineAft Link to tests in CI – https://ci.kuali.org/view/rice/view/2.5/view/list/job/rice-2.5-test-functional-env14-jenkins-krad-sampleapp/lastCompletedBuild/testReport/org.kuali.rice.krad.demo.uif.library.collections/DemoCollectionFeaturesDeleteLineAft/ The KRAD Guide has also been updated - http://site.kuali.org/rice/latest/reference/html/KRAD_Guide.html#d2543e9245

            People

            • Assignee:
              Shannon Hess
              Reporter:
              Jerry Neal (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours
                5h

                  Agile

                    Structure Helper Panel