Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-8055

Allow for specifications of behavior on copy of maintenance document

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.5
    • Component/s: KNS Equivalency, Roadmap
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Rice Module:
      KNS, KRAD
    • KRAD Feature Area:
      Document
    • Application Requirement:
      Rice
    • Sprint:
      2.5.0-m2 Sprint 3
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      Clear fields on maintenance copy refers to the ability to specify when a maintenance copy action performed, what fields on the new record should not be copied. For example we generally don't copy the primary key, and in some cases there are other fields they do not wanted copied.

        Attachments

          Issue Links

            Activity

            Hide
            cniesen Claus Niesen added a comment - - edited

            The primary keys, object ID and version number fields are already cleared out in In MaintenanceDocumentServiceImpl.setupMaintenanceObject. If locking field values (primary keys) should be preserved on copy, the preserveLockingKeysOnCopy property is set to true.

            To Do:

            • Clear any field that the user isn't authorized for (equivalency)
            • Support list of fields that shouldn't be copied (new feature) Proposal
            • populate blank/cleared fields with default values (equivalency)
            • Document new feature and preserveLockingKeysOnCopy in user guide KULRICE-12572

            (see KualiMaintenanceDocumentAction.copy for KNS implementation)

            Show
            cniesen Claus Niesen added a comment - - edited The primary keys, object ID and version number fields are already cleared out in In MaintenanceDocumentServiceImpl.setupMaintenanceObject. If locking field values (primary keys) should be preserved on copy, the preserveLockingKeysOnCopy property is set to true. To Do: Clear any field that the user isn't authorized for (equivalency) Support list of fields that shouldn't be copied (new feature) Proposal populate blank/cleared fields with default values (equivalency) Document new feature and preserveLockingKeysOnCopy in user guide KULRICE-12572 (see KualiMaintenanceDocumentAction.copy for KNS implementation)
            Hide
            shahess Shannon Hess added a comment - - edited

            UPDATE - Coding and some testing have been completed for the following:

            • Clear any field that the user isn't authorized for (equivalency) - This was done in KULRICE-10317
            • Support list of fields that shouldn't be copied (new feature)
            • populate blank/cleared fields with default values (equivalency)

            For testing purposes I have been using the TravelAccountMaintenanceDocument bean

              <bean id="TravelAccountMaintenanceDocument" parent="uifMaintenanceDocumentEntry">
                <property name="dataObjectClass" value="org.kuali.rice.krad.demo.travel.dataobject.TravelAccount"/>
                <property name="documentTypeName" value="TravelAccountMaintenanceDocument"/>
                <property name="lockingKeys">
                  <list>
                    <value>number</value>
                  </list>
                </property>
                <property name="clearValueOnCopyPropertyNames">
                  <list>
                    <value>foId</value>
                    <value>subAccounts</value>
                  </list>
                </property>
              </bean>
            

            Still working on final testing and documentation.

            Show
            shahess Shannon Hess added a comment - - edited UPDATE - Coding and some testing have been completed for the following: Clear any field that the user isn't authorized for (equivalency) - This was done in KULRICE-10317 Support list of fields that shouldn't be copied (new feature) populate blank/cleared fields with default values (equivalency) For testing purposes I have been using the TravelAccountMaintenanceDocument bean <bean id= "TravelAccountMaintenanceDocument" parent= "uifMaintenanceDocumentEntry" > <property name= "dataObjectClass" value= "org.kuali.rice.krad.demo.travel.dataobject.TravelAccount" /> <property name= "documentTypeName" value= "TravelAccountMaintenanceDocument" /> <property name= "lockingKeys" > <list> <value>number</value> </list> </property> <property name= "clearValueOnCopyPropertyNames" > <list> <value>foId</value> <value>subAccounts</value> </list> </property> </bean> Still working on final testing and documentation.
            Hide
            shahess Shannon Hess added a comment - - edited

            I was having some issue for nested objects, but my local code is now working for both non-nested and nested objects.

            For testing, this was the list I used in TravelAccountMaintenanceDocument. These do not make sense business wise, I just used these to test the functionality.

                <property name="clearValueOnCopyPropertyNames">
                  <list>
                    <value>foId</value>
                    <value>subAccounts.subAccountName</value>
                    <value>subAccounts.account.accountTypeCode</value>
                  </list>
                </property>
            

            Also for testing purposes, I removed the readOnly property from subAccount and subAccountName (Fields are cleared as well for authorization purposes if they are read only in MaintainableImpl.clearUnauthorizedField. Checking with Christina to see if this is as expected. ANSWER - That's the way it is in the KNS, so it is that way in KRAD for equivalency.)

            <bean parent="Uif-InputField" p:propertyName="subAccount" p:uppercaseValue="true" p:readOnly="@{!#isAddLine}"/>
            <bean parent="Uif-InputField" p:propertyName="subAccountName" p:readOnly="@{!#isAddLine}"/>
            
            Show
            shahess Shannon Hess added a comment - - edited I was having some issue for nested objects, but my local code is now working for both non-nested and nested objects. For testing, this was the list I used in TravelAccountMaintenanceDocument. These do not make sense business wise, I just used these to test the functionality. <property name= "clearValueOnCopyPropertyNames" > <list> <value>foId</value> <value>subAccounts.subAccountName</value> <value>subAccounts.account.accountTypeCode</value> </list> </property> Also for testing purposes, I removed the readOnly property from subAccount and subAccountName (Fields are cleared as well for authorization purposes if they are read only in MaintainableImpl.clearUnauthorizedField. Checking with Christina to see if this is as expected. ANSWER - That's the way it is in the KNS, so it is that way in KRAD for equivalency.) <bean parent= "Uif-InputField" p:propertyName= "subAccount" p:uppercaseValue= " true " p:readOnly= "@{!#isAddLine}" /> <bean parent= "Uif-InputField" p:propertyName= "subAccountName" p:readOnly= "@{!#isAddLine}" />
            Hide
            shahess Shannon Hess added a comment -

            Final testing is complete and documentation was completed as part of KULRICE-12572

            Show
            shahess Shannon Hess added a comment - Final testing is complete and documentation was completed as part of KULRICE-12572

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 3 days
                  3d
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 30 minutes Time Not Required
                  2d 30m