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

Allow for specifications of behavior on copy of maintenance document

    Details

    • Type: Task Task
    • Status: Closed Closed
    • Priority: Major 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
    • Similar issues:
      KULRICE-3072Allow maintenance documents to copy PK fields
      KULRICE-12394KRAD Maintenance Document Copy broken
      KULRICE-13632Create Smoke Tests for KRAD Maintenance Document Copy Features
      KULRICE-6572KRMS Valid Term Specification to Context Assignments. Allows Duplicate Assignments
      KULRICE-10463Altering of behavior of maintenance document submitted with docHandler and command params
      KULRICE-9186Changes for KULRICE-7626 broke Term Specification maintenence document
      KULRICE-10362Populate default values on Maintenance document copy
      KULRICE-176Implement the copy feature for Maintenance documents
      KULRICE-862Allow for PostProcessor to dictate retry and exception routing behavior
      KULRICE-7716Update Lightboxes to allow for Maintenance Documents within them
    • 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.

        Issue Links

          Activity

          Hide
          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
          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
          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
          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
          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
          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
          Shannon Hess added a comment -

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

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

            People

            • Assignee:
              Shannon Hess
              Reporter:
              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

                  Agile

                    Structure Helper Panel