Details

    • Type: Task Task
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4
    • Component/s: Development
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Similar issues:
      KULRICE-11349Create Conversion Guide Documenation for M41, M42, M54
      KULRICE-11332Conversion Script: Maintenance
      KULRICE-11345samples for M41, M42, M43
      KULRICE-11563Check that Maintenance conversion guide and conversion scripts are up to date
      KULRICE-11711Maintenance Conversion Script for M80 LookupReadonlyControlDefinition
      KULRICE-11457Maintenance Conversion Script - M82 & M83 ReadOnly
      KULRICE-10989Create Conversion Guide Documenation for M41-M42
      KULRICE-11222Conversion Script: Maintenance
      KULRICE-11510Maintenance Conversion Script - documentAuthorizerClass property
      KULRICE-11458Maintenance Conversion Script - M84 & M85 alternate/additional display attribute name
    • Rice Module:
      KRAD
    • KRAD Feature Area:
      Maintenance
    • Application Requirement:
      Rice
    • Sprint:
      2.4.0-m4 KRAD Sprint 1, 2.4.0-m4 KRAD Sprint 2
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required
    • Code Review Status:
      Not Required
    • Include in Release Notes?:
      Yes

      Description

      Simple conversion to krad equivalent.

      <bean parent="MaintainableFieldDefinition" p:name="reportsToAccountNumber" p:webUILeaveFieldFunction="onblur_accountNumber_newAccount" p:javascriptLeaveFieldCallbackFunction="checkRestrictedStatusCode_Callback">
        <property name="webUILeaveFieldFunctionParameters">
          <list>
            <value>reportsToChartOfAccountsCode</value>
          </list>
        </property> 
      </bean>        
      

      to

      <property name="onBlurScript" value="(onblur_accountNumber_newAccount(@{reportsToChartOfAccountsCode})???" />
      </bean>
      

      (Check for proper KRAD JavaScript.)

      Add comment to check if JavaScript is still relevant and correct.

      Don't forget the test.

        Issue Links

          Activity

          Hide
          Claus Niesen added a comment -

          Starter script (by Martin)

          def transformWebUILeaveField(NodeBuilder builderDelegate, Node beanNode) { 
            def functionProperty = bean.property.find { it -> "webUILeaveFieldFunction".equals(it.@name) };
            def callbackProperty = bean.property.find { it -> "webUILeaveFieldCallbackFunction".equals(it.@name) };
            def functionParamsProperty = bean.property.find { it -> "webUILeaveFieldFunctionParameters".equals(it.@name) };
          
            def parametersString = ["this"];
            if(callbackProperty.value != null) {
               parametersString.add(callbackProperty.value)
            }
            
            //if(functionParamsProperty.contains(list)) {
               // add list
            //} else {
               // add single parameters to param list
            //}
          
            // build function call
            def functionString = "";
            builder.property(name: "onBlurScript", functionString) 
          
          }
          
          Show
          Claus Niesen added a comment - Starter script (by Martin) def transformWebUILeaveField(NodeBuilder builderDelegate, Node beanNode) { def functionProperty = bean.property.find { it -> "webUILeaveFieldFunction" .equals(it.@name) }; def callbackProperty = bean.property.find { it -> "webUILeaveFieldCallbackFunction" .equals(it.@name) }; def functionParamsProperty = bean.property.find { it -> "webUILeaveFieldFunctionParameters" .equals(it.@name) }; def parametersString = [ " this " ]; if (callbackProperty.value != null ) { parametersString.add(callbackProperty.value) } // if (functionParamsProperty.contains(list)) { // add list //} else { // add single parameters to param list //} // build function call def functionString = ""; builder.property(name: "onBlurScript" , functionString) }
          Hide
          Sona Sona (Inactive) added a comment - - edited

          Missed Claus's comment about Martin's starter script. Added a transform method for the given property. Its not complete. Still need to add tests. Have a couple of questions.
          1. Looking at the conversion script transformMaintainableSectionDefinitionBean(), it assumes that if it finds a MaintainableCollectionDefinition then there are no other MaintainableFieldDefinitions within the same maintainableItems list. Is that a right assumption?

          2. For the MaintainableFieldDefintions that are not inside the MaintainableCollectionDefinition the code does a simple transform node to Uif-inputField and does not use transformMaintainableFieldsProperty() as is done with MaintainableFieldDefintions in a collection definition. Shouldn't all MaintainableFieldDefintions use the same transformMaintainableFieldsProperty().

          3. For onBlur function conversion from KNS to KRAD should the parameter field name under webUILeaveFieldFunctionParameters property be mapped differently in case of MaintainableCollectionDefinition (e.g #line.<fieldname> ? )

          Show
          Sona Sona (Inactive) added a comment - - edited Missed Claus's comment about Martin's starter script. Added a transform method for the given property. Its not complete. Still need to add tests. Have a couple of questions. 1. Looking at the conversion script transformMaintainableSectionDefinitionBean(), it assumes that if it finds a MaintainableCollectionDefinition then there are no other MaintainableFieldDefinitions within the same maintainableItems list. Is that a right assumption? 2. For the MaintainableFieldDefintions that are not inside the MaintainableCollectionDefinition the code does a simple transform node to Uif-inputField and does not use transformMaintainableFieldsProperty() as is done with MaintainableFieldDefintions in a collection definition. Shouldn't all MaintainableFieldDefintions use the same transformMaintainableFieldsProperty(). 3. For onBlur function conversion from KNS to KRAD should the parameter field name under webUILeaveFieldFunctionParameters property be mapped differently in case of MaintainableCollectionDefinition (e.g #line.<fieldname> ? )
          Hide
          Daniel Seibert (Inactive) added a comment -

          RE: Sona's Question 1: This is a bug, it should not assume that there are no additional MaintainableFieldDefinitions or MaintainableCollectionDefinitions in the list.
          Test resource MaintenanceDefinitionSample.xml demonstrates this case. In that example, "documentNumber" MaintenanceFieldDefinition is being skipped.

          Show
          Daniel Seibert (Inactive) added a comment - RE: Sona's Question 1: This is a bug, it should not assume that there are no additional MaintainableFieldDefinitions or MaintainableCollectionDefinitions in the list. Test resource MaintenanceDefinitionSample.xml demonstrates this case. In that example, "documentNumber" MaintenanceFieldDefinition is being skipped.
          Hide
          Daniel Seibert (Inactive) added a comment -

          Question 2: I think it is OK with doing the simple transformation to Uif-InputField in that case.
          The KNS property "maintainableFields" is a property of MaintainableCollectionDefinition bean. It holds the list of "MaintainableFIeldDefinition" beans.
          In the case of the "MaintainableFieldDefinitions not in a collection, they are in the "maintainableItems" property list (not "maintainableFields")

          Show
          Daniel Seibert (Inactive) added a comment - Question 2: I think it is OK with doing the simple transformation to Uif-InputField in that case. The KNS property "maintainableFields" is a property of MaintainableCollectionDefinition bean. It holds the list of "MaintainableFIeldDefinition" beans. In the case of the "MaintainableFieldDefinitions not in a collection, they are in the "maintainableItems" property list (not "maintainableFields")
          Hide
          Sona Sona (Inactive) added a comment -

          From the skype chat
          sona.muthuswamy: Dan, I looked at couple of examples in KFS like

          <bean parent="MaintainableFieldDefinition" p:name="continuationAccountNumber" p:webUILeaveFieldFunction="onblur_accountNumber">
          <property name="webUILeaveFieldFunctionParameters">
          <list>
          <value>continuationFinChrtOfAcctCd</value>
          </list>
          </property>
          </bean>

          which is under maintainableItems (not collection) and the current logic will turn this into a simple inputField
          [12/31/2013 11:08:54 AM] sona.muthuswamy: using the genericTransform
          [12/31/2013 11:09:03 AM] sona.muthuswamy: so things like webUILeaveFieldFunction will be ignored
          [12/31/2013 11:09:17 AM] Dan Seibert: I noticed a few other bugs that may or may not be already known:
          1. When tranforming MaintainableFieldDefinition, the name attribute is the only one being transformed.
          2. looks like only -parentBeans are created in the output, missing the child beans that reference them
          [12/31/2013 11:09:49 AM] sona.muthuswamy: My guess is that we should be coverting all MaintainableFieldDefinitions using a single method irrespective of where they come from
          [12/31/2013 11:11:10 AM] Dan Seibert: I agree, that way as we add support for these other missing sub-attributes/properties it's in one place
          [12/31/2013 11:13:57 AM] Dan Seibert: Martin will probably have some insights on refactoring these transformMaintainableSection methods

          Show
          Sona Sona (Inactive) added a comment - From the skype chat sona.muthuswamy: Dan, I looked at couple of examples in KFS like <bean parent="MaintainableFieldDefinition" p:name="continuationAccountNumber" p:webUILeaveFieldFunction="onblur_accountNumber"> <property name="webUILeaveFieldFunctionParameters"> <list> <value>continuationFinChrtOfAcctCd</value> </list> </property> </bean> which is under maintainableItems (not collection) and the current logic will turn this into a simple inputField [12/31/2013 11:08:54 AM] sona.muthuswamy: using the genericTransform [12/31/2013 11:09:03 AM] sona.muthuswamy: so things like webUILeaveFieldFunction will be ignored [12/31/2013 11:09:17 AM] Dan Seibert: I noticed a few other bugs that may or may not be already known: 1. When tranforming MaintainableFieldDefinition, the name attribute is the only one being transformed. 2. looks like only -parentBeans are created in the output, missing the child beans that reference them [12/31/2013 11:09:49 AM] sona.muthuswamy: My guess is that we should be coverting all MaintainableFieldDefinitions using a single method irrespective of where they come from [12/31/2013 11:11:10 AM] Dan Seibert: I agree, that way as we add support for these other missing sub-attributes/properties it's in one place [12/31/2013 11:13:57 AM] Dan Seibert: Martin will probably have some insights on refactoring these transformMaintainableSection methods
          Hide
          Sona Sona (Inactive) added a comment -

          I have added a patch file which contains the fix for the first 2 issues I mentioned

          1. Looking at the conversion script transformMaintainableSectionDefinitionBean(), it assumes that if it finds a MaintainableCollectionDefinition then there are no other MaintainableFieldDefinitions within the same maintainableItems list. Is that a right assumption?

          This was not the right assumption. Added a fix for it to use the new transformMaintainableItems() in transformMaintainableSectionDefinitionBeanWithCollection

          2. For the MaintainableFieldDefintions that are not inside the MaintainableCollectionDefinition the code does a simple transform node to Uif-inputField and does not use transformMaintainableFieldsProperty() as is done with MaintainableFieldDefintions in a collection definition. Shouldn't all MaintainableFieldDefintions use the same transformMaintainableFieldsProperty().

          Removed the genericBeanTransform and used transformMaintainableItems() instead.

          The patch will also fix the issue that Dan reported - 1.When transforming MaintainableFieldDefinition, the name attribute is the only one being transformed. I have created a review for it too.
          https://fisheye.kuali.org/cru/rice-325#CFR-36140

          I am still waiting on a response for my third question.

          3. For onBlur function conversion from KNS to KRAD should the parameter field name under webUILeaveFieldFunctionParameters property be mapped differently in case of MaintainableCollectionDefinition (e.g #line.<fieldname> ? )

          Show
          Sona Sona (Inactive) added a comment - I have added a patch file which contains the fix for the first 2 issues I mentioned 1. Looking at the conversion script transformMaintainableSectionDefinitionBean(), it assumes that if it finds a MaintainableCollectionDefinition then there are no other MaintainableFieldDefinitions within the same maintainableItems list. Is that a right assumption? This was not the right assumption. Added a fix for it to use the new transformMaintainableItems() in transformMaintainableSectionDefinitionBeanWithCollection 2. For the MaintainableFieldDefintions that are not inside the MaintainableCollectionDefinition the code does a simple transform node to Uif-inputField and does not use transformMaintainableFieldsProperty() as is done with MaintainableFieldDefintions in a collection definition. Shouldn't all MaintainableFieldDefintions use the same transformMaintainableFieldsProperty(). Removed the genericBeanTransform and used transformMaintainableItems() instead. The patch will also fix the issue that Dan reported - 1.When transforming MaintainableFieldDefinition, the name attribute is the only one being transformed. I have created a review for it too. https://fisheye.kuali.org/cru/rice-325#CFR-36140 I am still waiting on a response for my third question. 3. For onBlur function conversion from KNS to KRAD should the parameter field name under webUILeaveFieldFunctionParameters property be mapped differently in case of MaintainableCollectionDefinition (e.g #line.<fieldname> ? )

            People

            • Assignee:
              Sona Sona (Inactive)
              Reporter:
              Claus Niesen
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 day Original Estimate - 1 day
                1d
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 4 hours
                1d 4h

                  Agile

                    Structure Helper Panel