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

AFT Failure DemoTravelAccountMaintenanceNewAft blanket approve doesn't work and no error message

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Development, Regression
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-12799AFT Failure DemoTravelAccountMaintenanceEditAft Blanket Approve doesn't go to FINAL or save changes
      KULRICE-12718AFT Failure DemoTravelAccountMaintenanceNewAft Document submitted successfuly, but locked.
      KULRICE-14031AFT Failure DemoTravelAccountMaintenanceNewAft testDemoTravelAccountMaintenanceNewXss page doesn't fully render
      KULRICE-12794AFT Failure DemoTravelAccountMaintenanceNewAft missing search icons
      KULRICE-14170AFT Failure : AgendaEditorAndOrToggleSyncAft
      KULRICE-14142AFT Failure : edu.sampleu.kim.api.location.LocationCampusAft.testBlanketAppNav
      KULRICE-12178AFT Failure Identity Blanket Approvals go to ENROUTE rather than FINAL
      KULRICE-12903AFT Failure DemoTravelAccountMaintenanceNewAft Travel Account Type Code Search icon missing
      KULRICE-4083ALLOW_ENROUTE_BLANKET_APPROVE_WITHOUT_APPROVAL_REQUEST_IND doesn't appear to work the way it's being described.
      KULRICE-13016AFT Failure DemoElementsLinkAft Dialog Close doesn't work
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required

      Description

      AFT Step: Open /kr-krad/kradsampleapp?viewId=KradSampleAppHome
      AFT Step: Click Travel Account Maintenance (New) link.

      Notice Date Required input field is not present, is this by design?
      Create a new Travel Account. (notice Sub Account query javascript error)
      Click Blanket Approve
      Notice no success for error message
      Go to Demo Travel Account lookup and search for the Travel Account you just created.

      Abbreviated test name: DemoTravelAccountMaintenanceNewAft.testDemoTravelAccountMaintenanceNewNav
      Full test name: org.kuali.rice.krad.demo.travel.account.DemoTravelAccountMaintenanceNewAft.testDemoTravelAccountMaintenanceNewNav
      Test results url: http://ci.rice.kuali.org/job/rice-2.4-smoke-test-krad/lastCompletedBuild/testReport/org.kuali.rice.krad.demo.travel.account/DemoTravelAccountMaintenanceNewAft/testDemoTravelAccountMaintenanceNewNav/

      Abbreviated test name: DemoTravelAccountMaintenanceNewAft.testDemoTravelAccountMaintenanceNewBookmark
      Full test name: org.kuali.rice.krad.demo.travel.account.DemoTravelAccountMaintenanceNewAft.testDemoTravelAccountMaintenanceNewBookmark
      Test results url: http://ci.rice.kuali.org/job/rice-2.4-smoke-test-krad/lastCompletedBuild/testReport/org.kuali.rice.krad.demo.travel.account/DemoTravelAccountMaintenanceNewAft/testDemoTravelAccountMaintenanceNewBookmark/

        Issue Links

          Activity

          Hide
          Shannon Hess added a comment -

          This test is no longer working because the create date is no longer populated with the current date by default (due to changes made in KULRICE-12020) . Create date is required so the document errors when it is submitted with no create date.

          There are no issues for lookup and inquiry screens. I double verified this is an issue for any maintenance document using p:defaultValue by adding one to description in TermSpecificationBo.xml to bean TermSpec-MainSection. The defaultValue is always ignored if a Term Specification is edited, created, or copied.

            <bean id="TermSpec-MainSection" parent="Uif-VerticalBoxSection">
          ...
          ...
                        <bean parent="Uif-InputField" p:propertyName="description" p:defaultValue="TestDefault"/>
                        <bean parent="Uif-InputField" p:propertyName="active" />
          ...
          ...
            </bean>
          
          Show
          Shannon Hess added a comment - This test is no longer working because the create date is no longer populated with the current date by default (due to changes made in KULRICE-12020 ) . Create date is required so the document errors when it is submitted with no create date. There are no issues for lookup and inquiry screens. I double verified this is an issue for any maintenance document using p:defaultValue by adding one to description in TermSpecificationBo.xml to bean TermSpec-MainSection. The defaultValue is always ignored if a Term Specification is edited, created, or copied. <bean id= "TermSpec-MainSection" parent= "Uif-VerticalBoxSection" > ... ... <bean parent= "Uif-InputField" p:propertyName= "description" p:defaultValue= "TestDefault" /> <bean parent= "Uif-InputField" p:propertyName= "active" /> ... ... </bean>
          Hide
          Shannon Hess added a comment -

          I made a couple changes that I thought fixed the issue and got a good "mvn clean install" locally but then I got a build error when I checked in my change. I reverted my change and am planning to talk to Claus about this tomorrow.

          Show
          Shannon Hess added a comment - I made a couple changes that I thought fixed the issue and got a good "mvn clean install" locally but then I got a build error when I checked in my change. I reverted my change and am planning to talk to Claus about this tomorrow.
          Hide
          Shannon Hess added a comment - - edited

          In UifControllerBase.start the view id is added to the ViewThatNeedsDefaultValuesApplied list, however this start method is not hit for maintenance actions. I added similar code to MaintenanceDocumentController.setupMaintenance, but adding only this causes the default value to be used even if a current value exists since the following code was removed from ViewHelperServiceImpl.populateDefaultValueForField :

                  // Default value only applies when the value being set is null (has no value on the form)
                  if (currentValue != null) {
                      return;
                  }
          

          I added that code back with a modifications so that a false in a checkbox is treated like a null (this makes a default of either true or false work correctly.)

          New code:

            
                  // Default value only applies when the value being set is null (has no value on the form) or false (for
                  // Boolean fields).
                  if (currentValue != null ) {
                      if (currentValue instanceof Boolean) {
                          Boolean currentValueBoolean = (Boolean)currentValue;
                          if (currentValueBoolean) {
                              return;
                          }
                      } else {
                          return;
                      }
                  }
          

          This seemed to fix all cases when using defaultValue as a property, and a mvn clean install is successful locally. However, the build failed when I committed these changes.

          Show
          Shannon Hess added a comment - - edited In UifControllerBase.start the view id is added to the ViewThatNeedsDefaultValuesApplied list, however this start method is not hit for maintenance actions. I added similar code to MaintenanceDocumentController.setupMaintenance, but adding only this causes the default value to be used even if a current value exists since the following code was removed from ViewHelperServiceImpl.populateDefaultValueForField : // Default value only applies when the value being set is null (has no value on the form) if (currentValue != null ) { return ; } I added that code back with a modifications so that a false in a checkbox is treated like a null (this makes a default of either true or false work correctly.) New code: // Default value only applies when the value being set is null (has no value on the form) or false ( for // Boolean fields). if (currentValue != null ) { if (currentValue instanceof Boolean ) { Boolean currentValueBoolean = ( Boolean )currentValue; if (currentValueBoolean) { return ; } } else { return ; } } This seemed to fix all cases when using defaultValue as a property, and a mvn clean install is successful locally. However, the build failed when I committed these changes.
          Hide
          Shannon Hess added a comment -

          Added Jeff and Claus as watchers to get their opinion of the best way to fix this issue

          Show
          Shannon Hess added a comment - Added Jeff and Claus as watchers to get their opinion of the best way to fix this issue
          Hide
          Shannon Hess added a comment - - edited

          After looking at this again today, I realize that my modified code in ViewHelperServiceImpl.populateDefaultValueForField would not be accurate for checkboxes that have a user value of false but a defaultValue of True. (i.e., edit document for a Term Specification that had been inactivated would switch the active checkbox to true.) It works for the case in KULRICE-12020 since the view ID is not added to the ViewThatNeedsDefaultValuesApplied list when the "Make ReadOnly" button is selected – the value is not re-checked at that point.

          Show
          Shannon Hess added a comment - - edited After looking at this again today, I realize that my modified code in ViewHelperServiceImpl.populateDefaultValueForField would not be accurate for checkboxes that have a user value of false but a defaultValue of True. (i.e., edit document for a Term Specification that had been inactivated would switch the active checkbox to true.) It works for the case in KULRICE-12020 since the view ID is not added to the ViewThatNeedsDefaultValuesApplied list when the "Make ReadOnly" button is selected – the value is not re-checked at that point.
          Hide
          Jeff Ruch added a comment -

          I don't think we should be setting defaults on edit or copy documents, only new documents. That being the case you can just add

          //indicate that default values should be applied to this view
          maintenanceForm.addViewThatNeedsDefaultValuesApplied(form.getViewId());
          

          to the start method in MaintenanceDocumentController

          I think we should be using a different mechanism for create date type fields.

          Show
          Jeff Ruch added a comment - I don't think we should be setting defaults on edit or copy documents, only new documents. That being the case you can just add //indicate that default values should be applied to this view maintenanceForm.addViewThatNeedsDefaultValuesApplied(form.getViewId()); to the start method in MaintenanceDocumentController I think we should be using a different mechanism for create date type fields.
          Hide
          Shannon Hess added a comment -

          That sounds good to me, I'll go ahead and make that change.

          Thanks!
          Shannon

          Show
          Shannon Hess added a comment - That sounds good to me, I'll go ahead and make that change. Thanks! Shannon

            People

            • Assignee:
              Shannon Hess
              Reporter:
              Erik Meade
            • Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 4 hours
                4h

                  Structure Helper Panel