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

Binding path for PrerequisiteConstraints defined in data dictionary wrong on reload

    Details

    • Type: Bug Fix Bug Fix
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3.2, 2.4
    • Fix Version/s: 2.5
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-5172Default the binding path for fieldLookup.fieldConversions
      KULRICE-10047CollectionGroup.readOnly=true is not respected after data dictionary reload
      KULRICE-5947Add validation for data dictionary defined custom attributes
      KULRICE-9998Country Name is defined as 40 characters in the database, but 50 characters in the data dictionary
      KULRICE-11142Reloading Data Dictionary Error:(13,1 ) you tried to assign a value to the class 'config'. Do you have a script with this name?
      KULRICE-14141Change to performInitialize in CollectionGroupBase to check and fix binding prefix path
      KULRICE-6358refreshing components in the tree doesn't work, binding path gets mangled
      KULRICE-12625Attribute definitions not being correctly picked up from data dictionary for input fields
      KULRICE-6399Make configuring the reloading data dictionary easier for client app developers
      KULRICE-4670integration with Data Dictionary
    • Rice Module:
      KRAD
    • KRAD Feature Area:
      Data Dictionary
    • Application Requirement:
      KS
    • Sprint:
      Core 2.5.0-m7 Sprint 1
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes
    • Story Points:
      3

      Description

      Prerequisite constraints defined in a data dictionary are broken when the page (with an input that references the attribute) is reloaded, either by hitting the browser reload button or navigating away and then returning to the page. Not sure if it's relevant or not, but the page in question here is part of a maintenance view.

      Here's the specific scenario. In this DD def ...

      https://svn.kuali.org/repos/student/enrollment/ks-api/trunk/ks-enroll-api/src/main/resources/ks-CourseInfo-dictionary.xml

      ... if I modify the CourseInfo.pilotCourse bean like ...

      <bean id="CourseInfo.pilotCourse" parent="CourseInfo.pilotCourse-parent"/>
      <bean id="CourseInfo.pilotCourse-parent" abstract="true" parent="CourseInfo.pilotCourse-generated">
           <property name="dependencyConstraints">
                <list>
                     <bean parent="PrerequisiteConstraint" p:propertyName="courseInfo.endTerm">
                          <property name="messageKey" value="Some key"/>
      ...
      

      It works as expected the first time the page is loaded, but if the page is reloaded a JS error is generated in krad.utility.js#getAttributeId(elementId). I believe this is because PrerequisiteConstraint#getPropertyAdjustedBindingPath(String propertyPath) prepends the bindingPath to propertyPath on page reload. So, the binding property name gets set to ...

      document.newMaintainableObject.dataObject.courseInfo.endTerm
      .... then ...
      document.newMaintainableObject.dataObject.document.newMaintainableObject.dataObject.courseInfo.endTerm
      ... etc.

      This isn't a problem when the same constraints are configured directly in the input definition.

      StR:

      • Add a prerequisite constraint to the DD and reference the attribute from an input field (perhaps on a maintenace doc)
      • Load the page
      • Reload the page either with the refresh button or navigating away from the page and back
        • Expected: The constraint is functional
        • Actual: As JS error is thrown and the page is initialized propertly

        Issue Links

          Activity

          Hide
          Kristina Taylor (Inactive) added a comment -

          Larry Symms, is this still occurring? I recall fixing something similar to this bug.

          Show
          Kristina Taylor (Inactive) added a comment - Larry Symms , is this still occurring? I recall fixing something similar to this bug.
          Hide
          Glenn Sudduth (Inactive) added a comment -

          Not sure about this particular issue, but yesterday I was getting a very similar behavior/breakage with a case constraint defined in the DD (w/Rice 2.4.1).
          (I'll be doing some additional testing today and will most likely file a bug)

          Show
          Glenn Sudduth (Inactive) added a comment - Not sure about this particular issue, but yesterday I was getting a very similar behavior/breakage with a case constraint defined in the DD (w/Rice 2.4.1). (I'll be doing some additional testing today and will most likely file a bug)
          Hide
          Larry Symms added a comment -

          Need to verify this is still happening for this to get attention in 2.5. Option 1 test in ks's rice-upgrade branch. Option 2 pull down rice and try to duplicate.

          Show
          Larry Symms added a comment - Need to verify this is still happening for this to get attention in 2.5. Option 1 test in ks's rice-upgrade branch. Option 2 pull down rice and try to duplicate.
          Hide
          Jeff Ruch added a comment -

          This problem is similar to KULRICE-13096. Both are caused by the bindingPath being applied multiple times.

          Show
          Jeff Ruch added a comment - This problem is similar to KULRICE-13096 . Both are caused by the bindingPath being applied multiple times.
          Hide
          Jeff Ruch added a comment -

          Completed fix and committed. See KULRICE-13096 for details.

          Show
          Jeff Ruch added a comment - Completed fix and committed. See KULRICE-13096 for details.

            People

            • Assignee:
              Jeff Ruch
              Reporter:
              Larry Symms
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Agile

                  Structure Helper Panel