[KULRICE-5367] Uif Framework - Collections: Delete line should appear if the line is new or always allow deletion is specified on document entry Created: 14/Jul/11  Updated: 24/Sep/14  Resolved: 13/Aug/14

Status: Closed
Project: Kuali Rice Development
Component/s: Development, KNS Equivalency, Roadmap
Affects Version/s: None
Fix Version/s: 2.5
Security Level: Public (Public: Anyone can view)

Type: Improvement Priority: Major
Reporter: Jerry Neal (Inactive) Assignee: Shannon Hess
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0 minutes
Time Spent: 5 hours
Original Estimate: Not Specified

Issue Links:
relates to KRRM-144 KRAD Equivalency with KNS Open
relies on KULRICE-5345 Add ability to identify new lines in ... Closed
Rice Module:
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


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.

Comment by Jessica Coltrin (Inactive) [ 08/Nov/11 ]

double-tagging with 2.0.0-b3 for review.

Comment by Claus Niesen [ 10/Dec/13 ]

Can be done by adding the following code:

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

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

Comment by Kristina Taylor (Inactive) [ 09/Jul/14 ]

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

Comment by James Smith [ 09/Jul/14 ]

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.

Comment by James Smith [ 09/Jul/14 ]

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!

Comment by Jerry Neal (Inactive) [ 10/Jul/14 ]

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.


Comment by James Smith [ 10/Jul/14 ]

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!

Comment by Claus Niesen [ 10/Jul/14 ]

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

Comment by Shannon Hess [ 13/Aug/14 ]

All TODOs are now done.

Library Example:

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

Generated at Thu Jun 24 11:22:41 CDT 2021 using JIRA 7.0.11#70121-sha1:19d24976997c1d95f06f3e327e087be0b71f28d4.