OFBiz
  1. OFBiz
  2. OFBIZ-4787

Party Manager Default Country in Update

    Details

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

      demo-trunk

      Description

      In Party Manager > Profile > Contact Information > Update the "Country" drop down always defaults to "United States".
      This is misleading if the Country is not "United States".
      If a user were to change some other address element he/she would have to also re-set "Country" to keep it from being changed to "United States".

      To reproduce:
      In Party Manager lookup a party with a "Postal Address" say "DemoSupplier"*
      In Contact Information > Postal Address Click "Update"
      In the Country field select any country but "United States" say Switzerland
      Click "Save"

      Note -
      Expect drop down default after save = "Switzerland"
      Actual drop down default after save = "United States"

      Click "Go Back"
      Expect "Postal Address" country = "Switzerland"
      Actual "Postal Address" country = "Switzerland"

      Click
      Click "Update"
      Expect drop down default to be "Switzerland"
      Actual "United States"

      • Note:
        Select any party but Company.
        It's Country can not be changed because a foreign missing parameter on a call to updateEftAccount.
        This may be a separate issue.

        Activity

        Hide
        Jacques Le Roux added a comment -

        Thank you for the compliment. Actually it's not that hidden. If you look at the examples: https://demo-trunk.ofbiz.apache.org/example/control/FormWidgetExamples#DropDownFieldsExampleForm_geoId_title

        But I must say a clear example with Freemarker was missing indeed.

        Looking forwar for eCommerce and Facility. A Jira for each would be better...

        Show
        Jacques Le Roux added a comment - Thank you for the compliment. Actually it's not that hidden. If you look at the examples: https://demo-trunk.ofbiz.apache.org/example/control/FormWidgetExamples#DropDownFieldsExampleForm_geoId_title But I must say a clear example with Freemarker was missing indeed. Looking forwar for eCommerce and Facility. A Jira for each would be better...
        Hide
        Tom Burns added a comment -

        I will create a new issue for "It's country..."

        Your patch is a hidden gem. The lack of context sensitivity in drop downs is a major OFBiz usability issue in my mind and the Country / State presentation is a poster child for the problem.
        I'll open a new improvement issue for eCommerce and Facility since you have closed this one.

        Tom

        Show
        Tom Burns added a comment - I will create a new issue for "It's country..." Your patch is a hidden gem. The lack of context sensitivity in drop downs is a major OFBiz usability issue in my mind and the Country / State presentation is a poster child for the problem. I'll open a new improvement issue for eCommerce and Facility since you have closed this one. Tom
        Hide
        Jacques Le Roux added a comment -

        Tom,

        Please open a new Jira for "It's Country can not be changed because a foreign missing parameter on a call to updateEftAccount."

        Thanks

        Show
        Jacques Le Roux added a comment - Tom, Please open a new Jira for "It's Country can not be changed because a foreign missing parameter on a call to updateEftAccount." Thanks
        Hide
        Jacques Le Roux added a comment -

        Thanks for detailled report Tom,

        I did not use your patch. 2 years ago I introduced setDependentDropdownValuesJs.ftl to handle Dependent Dropdowns. But I did not provide any examples of its uses in Freemarker templates.

        In trunk at revision 1310953 I have committed a fix for the issue you reported using setDependentDropdownValuesJs.ftl.
        Also in R11.04 at r1310955.

        I would really appreciate if you could use the same and fix also the other EditContactMech.ftl (eCommerce and Facility). It will also a good opportunity for you to learn how to use it (it's quite simple actually see r1310953

        Show
        Jacques Le Roux added a comment - Thanks for detailled report Tom, I did not use your patch. 2 years ago I introduced setDependentDropdownValuesJs.ftl to handle Dependent Dropdowns. But I did not provide any examples of its uses in Freemarker templates. In trunk at revision 1310953 I have committed a fix for the issue you reported using setDependentDropdownValuesJs.ftl. Also in R11.04 at r1310955. I would really appreciate if you could use the same and fix also the other EditContactMech.ftl (eCommerce and Facility). It will also a good opportunity for you to learn how to use it (it's quite simple actually see r1310953
        Hide
        Tom Burns added a comment -

        Patch is a work around.
        In editcontactmech.ftl the inclusion of the Common Screen handling for Country drop down is removed and replaced with the logic form countries.ftl.
        An alternative would be to add logic to the Common Screen however it is used throughout the code base and require a lot more testing.

        Show
        Tom Burns added a comment - Patch is a work around. In editcontactmech.ftl the inclusion of the Common Screen handling for Country drop down is removed and replaced with the logic form countries.ftl. An alternative would be to add logic to the Common Screen however it is used throughout the code base and require a lot more testing.

          People

          • Assignee:
            Jacques Le Roux
            Reporter:
            Tom Burns
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development