Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-7929

Scrum find Total Backlog Item is not working in non-English language

Details

    Description

      The Find form for Product Backlog Item does not work in language other than English when no "statusId" or "custRequestTypeId" are selected.

      Step to reproduce :

      • Hit the search button, the find action is performed and return a non-empty list.
      • Set your language preference to a non english language (french for example).
      • Click again on the "Total Backlog" tab, and hit the "Rechercher" button.
      • No results are found.

      Where does the problem come from ?
      The results displayed are from a list named "backlogList" which is built in the following script : FindProductBacklogItem.groovy .
      In this script, there were a check on the parameter "custRequestTypeId" and on the parameter "statusId".
      But the value was hardcoded :

      if("Any".equals(parameters.custRequestTypeId))
      

      and

      if(!"Any".equals(parameters.statusId))
      

      Obviously, when the form is in another language than english, those conditions aren't valid anymore (for exemple, "Any" is "Dont" in French")

      Attachments

        1. OFBIZ-7929.patch
          3 kB
          Montalbano Florian
        2. OFBIZ-7929.patch
          3 kB
          Montalbano Florian
        3. OFBIZ-7929.patch
          9 kB
          Montalbano Florian
        4. OFBIZ-7929.patch
          8 kB
          Montalbano Florian
        5. OFBIZ-7929_15.12.patch
          10 kB
          Montalbano Florian

        Activity

          I removed the option based on "uiLabelMap.CommonAny" in the form for both the "custRequestTypeId" and the "statusId". And I set the "allow-empty" attribute of the drop-down to "true".

          Please tell me what you think about that solution (I'm not sure about the "allow-empty" thing).

          Florian M Montalbano Florian added a comment - I removed the option based on "uiLabelMap.CommonAny" in the form for both the "custRequestTypeId" and the "statusId". And I set the "allow-empty" attribute of the drop-down to "true". Please tell me what you think about that solution (I'm not sure about the "allow-empty" thing).

          Found two ugly things in the patch so I'm updating it (sorry for the first one, I was too careless).

          • Used UtilValidate.isEmpty instead of "".equals
          • Removed the useless line at the start of the file (when removing the ?: part of the condition, I forgot to remove the remaining part of the line)
          Florian M Montalbano Florian added a comment - Found two ugly things in the patch so I'm updating it (sorry for the first one, I was too careless). Used UtilValidate.isEmpty instead of "".equals Removed the useless line at the start of the file (when removing the ?: part of the condition, I forgot to remove the remaining part of the line)

          Well done, thanks Florian

          Your patch is in
          trunk r1754051
          older branches need a modified patch, could you handle it?

          jleroux Jacques Le Roux added a comment - Well done, thanks Florian Your patch is in trunk r1754051 older branches need a modified patch, could you handle it?
          lektran Scott Gray added a comment - - edited

          A couple of minor points:
          1. It isn't necessary to use UtilValidate.isEmpty() in groovy for String values, you can simply use: if (parameters.custRequestTypeId). Google "Groovy Truth" for more info
          2. I notice there are actually 4 instances of

          <option key="${uiLabelMap.CommonAny}" description=" "/>

          in the file, but only two have been fixed.

          lektran Scott Gray added a comment - - edited A couple of minor points: 1. It isn't necessary to use UtilValidate.isEmpty() in groovy for String values, you can simply use: if (parameters.custRequestTypeId). Google "Groovy Truth" for more info 2. I notice there are actually 4 instances of <option key= "${uiLabelMap.CommonAny}" description= " " /> in the file, but only two have been fixed.

          Thanks for review and comment Scott

          jleroux Jacques Le Roux added a comment - Thanks for review and comment Scott

          Hi Florian

          Could you provide an updated patch for trunk (including fixes for Scott's comment) and patches for the active branches (I guess one will be enough, it's only about paths changes)? TIA

          jleroux Jacques Le Roux added a comment - Hi Florian Could you provide an updated patch for trunk (including fixes for Scott's comment) and patches for the active branches (I guess one will be enough, it's only about paths changes)? TIA

          Thank you for your review and advice !
          I put it all in this new version of the patch :

          • Changed UtilValidate test to Groovy Truth test on string
          • Changed the big first test by a test on "noConditionFind"
          • Added some commentaries
          • Harmonization of hte if test
          • Removed the uiLabelMap.CommonAny in the file (the two others belonged to another form --> "FindTotalBacklog")
          • Added a "noConditionFind" field to this form --> "FindTotalBacklog"

          Both forms seem to work fine. I hope I didn't forget anything this time ; )

          The second form can be accessed by :

          • Scrum component
          • Administration Tab
          • All Backlog subTab

          If those change are fine, I'll create a patch for the other versions.

          Florian M Montalbano Florian added a comment - Thank you for your review and advice ! I put it all in this new version of the patch : Changed UtilValidate test to Groovy Truth test on string Changed the big first test by a test on "noConditionFind" Added some commentaries Harmonization of hte if test Removed the uiLabelMap.CommonAny in the file (the two others belonged to another form --> "FindTotalBacklog") Added a "noConditionFind" field to this form --> "FindTotalBacklog" Both forms seem to work fine. I hope I didn't forget anything this time ; ) The second form can be accessed by : Scrum component Administration Tab All Backlog subTab If those change are fine, I'll create a patch for the other versions.

          Thanks Florian, reopening...

          jleroux Jacques Le Roux added a comment - Thanks Florian, reopening...

          Florian, your patch looks good to me (not tested yet), but it does not apply via Eclipse because I guess you did not create your patch from an up to date trunk HEAD svn working copy, please update and create another one, thanks!

          jleroux Jacques Le Roux added a comment - Florian, your patch looks good to me (not tested yet), but it does not apply via Eclipse because I guess you did not create your patch from an up to date trunk HEAD svn working copy, please update and create another one, thanks!

          Patch created from an up-to-date OFBiz trunk version

          Florian M Montalbano Florian added a comment - Patch created from an up-to-date OFBiz trunk version

          Thanks Florian, your patch is in trunk at revision: 1754656. Please provide the patches for the other branches (as said already, I guess one will apply to all)

          jleroux Jacques Le Roux added a comment - Thanks Florian, your patch is in trunk at revision: 1754656. Please provide the patches for the other branches (as said already, I guess one will apply to all)

          Patch for the release 15.12 .
          Is it ok or should I do the release 14.12 too ?

          Florian M Montalbano Florian added a comment - Patch for the release 15.12 . Is it ok or should I do the release 14.12 too ?

          Yes please does not apply on R14

          jleroux Jacques Le Roux added a comment - Yes please does not apply on R14

          OK wait, works with a fuzz of 10, checking

          jleroux Jacques Le Roux added a comment - OK wait, works with a fuzz of 10, checking

          Thanks Florian,

          Your 2nd patch is committed for both branches at 1754709

          jleroux Jacques Le Roux added a comment - Thanks Florian, Your 2nd patch is committed for both branches at 1754709

          People

            jleroux Jacques Le Roux
            Florian M Montalbano Florian
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: