OFBiz
  1. OFBiz
  2. OFBIZ-402

Convert deprecated minilang operations to the set operation.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: SVN trunk
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Linux(CentOS) /Windows

      Description

      Hi Jacopo,

      I converted some files to use <set> operation instead of <field-to-field> operation.
      Yesterday I have seen your commit notification and thought that this contribution would reduce your work load.

      I hope it would be helpful.
      At this time I am sending the patch for Product Component and will send you the patch for remaining Party & Content component ASAP.

      Regards
      Ashish Vijaywargiya

      1. Deprecated_Minilang_Operation_Product.patch.zip
        3 kB
        Ashish Vijaywargiya
      2. Deprecated_Minilang_Operation_Party.patch.zip
        2 kB
        Ashish Vijaywargiya
      3. Deprecated_Minilang_Operation_Content.patch.zip
        3 kB
        Ashish Vijaywargiya
      4. Removed_Deprecated_string-to-field_operation_oct_26.patch.zip
        6 kB
        Ashish Vijaywargiya
      5. Removed_Deperecated_env-to-env_operation_Nov_03.patch.zip
        2 kB
        Ashish Vijaywargiya
      6. Removed_Deprecated_field-to-env_operation_Nov_03.patch.zip
        0.7 kB
        Ashish Vijaywargiya
      7. Removed_Deprecated_env-to-field_operation_Nov_03.patch
        21 kB
        Ashish Vijaywargiya

        Activity

        Hide
        Ashish Vijaywargiya added a comment -

        Jacopo,

        Here is the patch for Party Component.

        Regards
        Ashish Vijaywargiya

        Show
        Ashish Vijaywargiya added a comment - Jacopo, Here is the patch for Party Component. Regards Ashish Vijaywargiya
        Hide
        Ashish Vijaywargiya added a comment -

        Jacopo,

        Here is the Content Patch.
        I have added xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" & xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/simple-methods.xsd" attributes in the <simple-methods> tag.
        I have also changed the <env-to-field> attribute according to new changes in simple-methods.xsd files.

        Please give me your feedback on this patches.

        Regards
        Ashish Vijaywargiya

        Show
        Ashish Vijaywargiya added a comment - Jacopo, Here is the Content Patch. I have added xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" & xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/simple-methods.xsd" attributes in the <simple-methods> tag. I have also changed the <env-to-field> attribute according to new changes in simple-methods.xsd files. Please give me your feedback on this patches. Regards Ashish Vijaywargiya
        Hide
        Jacopo Cappellato added a comment -

        Thanks Ashish,

        it's great to get this kind of contributions: in fact it is clear that the work you did is for "the greater good" of the project and not to do something useful for you.
        I'm closing the issue now even if we have still a lot of work to do in this area: in fact we'll have to migrate all the <env-to-env/>, <field-to-env/>, <env-to-field/> and <string-to-field/> operation to the <set/> operation.

        Your patch is in svn rev. 467397

        Again, thanks.

        Show
        Jacopo Cappellato added a comment - Thanks Ashish, it's great to get this kind of contributions: in fact it is clear that the work you did is for "the greater good" of the project and not to do something useful for you. I'm closing the issue now even if we have still a lot of work to do in this area: in fact we'll have to migrate all the <env-to-env/>, <field-to-env/>, <env-to-field/> and <string-to-field/> operation to the <set/> operation. Your patch is in svn rev. 467397 Again, thanks.
        Hide
        Ashish Vijaywargiya added a comment -

        Jacopo & Others,

        Can anybody of you please reopen this issue ??
        I will submit the patch to use <set> operation instead of <string-to-field/> operation ASAP.(As this is suggested by Jacopo in previeous comment)

        Regards
        Ashish Vijaywargiya

        Show
        Ashish Vijaywargiya added a comment - Jacopo & Others, Can anybody of you please reopen this issue ?? I will submit the patch to use <set> operation instead of <string-to-field/> operation ASAP.(As this is suggested by Jacopo in previeous comment) Regards Ashish Vijaywargiya
        Hide
        Ashish Vijaywargiya added a comment -

        Hi Jacopo,

        Here is the patch to remove the deprecated <string-to-field> operation and now in place the <set> operation will be used.
        Please don't close this issue.Because we have to convert other deprecated operations to use <set> operation.
        I will take a look at this whenever I will get time.

        Please give me your feedback on this patch.

        Thanks for your kind support.
        Regards
        Ashish Vijaywargiya

        Show
        Ashish Vijaywargiya added a comment - Hi Jacopo, Here is the patch to remove the deprecated <string-to-field> operation and now in place the <set> operation will be used. Please don't close this issue.Because we have to convert other deprecated operations to use <set> operation. I will take a look at this whenever I will get time. Please give me your feedback on this patch. Thanks for your kind support. Regards Ashish Vijaywargiya
        Hide
        Jacopo Cappellato added a comment -

        Thanks Ashish,

        your patch is in svn with rev. and 468277 and 468278.

        Show
        Jacopo Cappellato added a comment - Thanks Ashish, your patch is in svn with rev. and 468277 and 468278.
        Hide
        Ashish Vijaywargiya added a comment -

        Hi Jacopo,

        Here is the patch to remove the deprecated env-to-env operation from the Minilang.
        And if something is missing please let me know.

        Thanks for your support and time.
        Regards
        Ashish Vijaywargiya

        Show
        Ashish Vijaywargiya added a comment - Hi Jacopo, Here is the patch to remove the deprecated env-to-env operation from the Minilang. And if something is missing please let me know. Thanks for your support and time. Regards Ashish Vijaywargiya
        Hide
        Ashish Vijaywargiya added a comment -

        Jacopo,

        Here comes the patch to remove the deprecated method field-to-env from the Minilang.
        Please take a look at this.

        Regards
        Ashish Vijaywargiya

        Show
        Ashish Vijaywargiya added a comment - Jacopo, Here comes the patch to remove the deprecated method field-to-env from the Minilang. Please take a look at this. Regards Ashish Vijaywargiya
        Hide
        Jacopo Cappellato added a comment -

        Ashish,

        thanks for the patches, we really appreciate your work.

        In the field-to-env file there was a wrong conversion (DataServices.xml):

        • <field-to-env field-name="userLogin" map-name="parameters" env-name="userLogin"/>
        • <field-to-env field-name="content" map-name="parameters" env-name="currentContent"/>
          + <set field="userLogin" from-field="parameters.userLogin" />
          + <set field="content" from-field="parameters.currentContent" />

        The last line should be instead:

        + <set field="currentContent" from-field="parameters.content" />

        I've fixed it and everything is committed with rev. 470680

        Thanks

        PS: it is not necessary to zip the patch files, unless they are very big... you can just attach them to the Jira issues as they are.

        Show
        Jacopo Cappellato added a comment - Ashish, thanks for the patches, we really appreciate your work. In the field-to-env file there was a wrong conversion (DataServices.xml): <field-to-env field-name="userLogin" map-name="parameters" env-name="userLogin"/> <field-to-env field-name="content" map-name="parameters" env-name="currentContent"/> + <set field="userLogin" from-field="parameters.userLogin" /> + <set field="content" from-field="parameters.currentContent" /> The last line should be instead: + <set field="currentContent" from-field="parameters.content" /> I've fixed it and everything is committed with rev. 470680 Thanks PS: it is not necessary to zip the patch files, unless they are very big... you can just attach them to the Jira issues as they are.
        Hide
        Ashish Vijaywargiya added a comment -

        Thx Jacopo for pointing out my mistake.
        From the next time I will not zip the file.
        The task of <env-to-field /> deprecated method is also at final stage.
        I will send you the patch for it in the next 15 minute.

        Thanks once again.
        Regards
        Ashish Vijaywargiya

        Show
        Ashish Vijaywargiya added a comment - Thx Jacopo for pointing out my mistake. From the next time I will not zip the file. The task of <env-to-field /> deprecated method is also at final stage. I will send you the patch for it in the next 15 minute. Thanks once again. Regards Ashish Vijaywargiya
        Hide
        Ashish Vijaywargiya added a comment -

        Hey Jacopo,

        Here comes the last patch to remove the deprecated <env-to-field /> operation from the minilang.
        Please take a look at this patch.

        If you find some more deprecated operation in minilang to do work on please let me know.
        Thanks for your time and kind support.

        Regards
        Ashish Vijaywargiya

        Show
        Ashish Vijaywargiya added a comment - Hey Jacopo, Here comes the last patch to remove the deprecated <env-to-field /> operation from the minilang. Please take a look at this patch. If you find some more deprecated operation in minilang to do work on please let me know. Thanks for your time and kind support. Regards Ashish Vijaywargiya
        Hide
        Jacopo Cappellato added a comment -

        Thanks Ashish,

        this is awesome.
        Your last patch is in rev. 470730

        I'm closing this issue now, but if I'll find other deprecated operations I'll create a new issue.
        Again, thanks.

        Show
        Jacopo Cappellato added a comment - Thanks Ashish, this is awesome. Your last patch is in rev. 470730 I'm closing this issue now, but if I'll find other deprecated operations I'll create a new issue. Again, thanks.
        Hide
        Jacques Le Roux added a comment -

        FYI

        I just checked before moving annotations
        from
        http://incubator.apache.org/ofbiz/docs/minilang.html
        to
        http://svn.apache.org/repos/asf/ofbiz/trunk/framework/minilang/dtd/simple-methods.xsd

        There are no more any
        env-to-field
        field-to-env
        string-to-field
        field-to-field
        env-to-env
        used in *.xml files of OFBiz but some commented snippets that seem unused and should be perhaps removed.

        Show
        Jacques Le Roux added a comment - FYI I just checked before moving annotations from http://incubator.apache.org/ofbiz/docs/minilang.html to http://svn.apache.org/repos/asf/ofbiz/trunk/framework/minilang/dtd/simple-methods.xsd There are no more any env-to-field field-to-env string-to-field field-to-field env-to-env used in *.xml files of OFBiz but some commented snippets that seem unused and should be perhaps removed.

          People

          • Assignee:
            Jacopo Cappellato
            Reporter:
            Ashish Vijaywargiya
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development