OFBiz
  1. OFBiz
  2. OFBIZ-4838

Party Manager Party StatusId Update Fails

    Details

    • Type: Bug Bug
    • Status: Patch Available
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: Release 10.04, Release Branch 11.04, Trunk
    • Fix Version/s: None
    • Component/s: party
    • Labels:
      None
    • Environment:

      demo-trunk

      Description

      Party Manager does not update the party status id correctly.
      To reproduce:
      First:
      In Party Manager lookup party id "Company"
      Click "Update" In Profile > Party Group Information
      Note: Status Id drop-down field displays Enabled
      Click "Save"
      Then:
      In Web Tools Interactive version lookup Party party_id = "Company"
      Expect: StatusId = "Enabled"
      Actual: StatusId = NULL

      PartyServices setPartyStatus is not updating the party status.
      The question before fixing, is there any reason to allow null status id's on a party?
      Shouldn't every party either be Enabled or Disabled?

        Activity

        Hide
        Tom Burns added a comment -

        The suggested resolution assumes these requirements:
        1. Party status changed is limited to Enabled and Disabled (see StatusItem statusTypeId value="PARTY_STATUS")
        2. Legacy party data with null status_id's must be supported.

        Three patches follow:

        1. Party Entity Set Status Enabled
        a) Allows the drop down in Edit Group Information to display null values.
        If nulls are not displayed then the application is displaying incorrect data.
        Displaying nulls allows a user to change the status to Enabled.
        b) In PartyServices.java > setPartyStatus nulls are set to Enabled AND STORED.
        Note this will be triggered on any change to the party, not just changes to status.

        2. Party Group Status Change sets all party entries in the demo data to Enabled. This makes the demo data consistent with the StatusItem limitation for party.
        Note in PartyManager "Create Party Group" sets status to Enabled by default.

        Other concerns resulting from the analysis of, but not addressed in, this issue may be bugs or required improvements. Notes to be attached.

        3. A throwaway test for the setPartyStatus service.

        Show
        Tom Burns added a comment - The suggested resolution assumes these requirements: 1. Party status changed is limited to Enabled and Disabled (see StatusItem statusTypeId value="PARTY_STATUS") 2. Legacy party data with null status_id's must be supported. Three patches follow: 1. Party Entity Set Status Enabled a) Allows the drop down in Edit Group Information to display null values. If nulls are not displayed then the application is displaying incorrect data. Displaying nulls allows a user to change the status to Enabled. b) In PartyServices.java > setPartyStatus nulls are set to Enabled AND STORED. Note this will be triggered on any change to the party, not just changes to status. 2. Party Group Status Change sets all party entries in the demo data to Enabled. This makes the demo data consistent with the StatusItem limitation for party. Note in PartyManager "Create Party Group" sets status to Enabled by default. Other concerns resulting from the analysis of, but not addressed in, this issue may be bugs or required improvements. Notes to be attached. 3. A throwaway test for the setPartyStatus service.
        Hide
        Tom Burns added a comment -

        This file describes some issues arising from analysis of OFBIZ-4838.

        Show
        Tom Burns added a comment - This file describes some issues arising from analysis of OFBIZ-4838 .
        Hide
        Tom Burns added a comment -

        OFBIZ-4838 Party Group Status Change.patch has been tested on both 10.4 and 11.04 branches as well as the trunk.

        OFBIZ-4838 Party Entity Set Status Enabled.patch only applies to the trunk due to the different numbers of party entities in different versions.

        In the trunk after applying Party Group Status Change.patch
        The COUNT from PARTY
        EQUALS
        select COUNT from PARTY WHERE status_id='PARTY_ENABLED';
        EQUALS
        127

        Summary of Party XML Entities
        Version Count XML Count DB
        10.4 140 110
        11.4 144 114
        Trunk 159 127

        Separate versions of Party Entity Set Status Enabled.patch for 10.4 and 1.4 can be provided if needed.

        Show
        Tom Burns added a comment - OFBIZ-4838 Party Group Status Change.patch has been tested on both 10.4 and 11.04 branches as well as the trunk. OFBIZ-4838 Party Entity Set Status Enabled.patch only applies to the trunk due to the different numbers of party entities in different versions. In the trunk after applying Party Group Status Change.patch The COUNT from PARTY EQUALS select COUNT from PARTY WHERE status_id='PARTY_ENABLED'; EQUALS 127 Summary of Party XML Entities Version Count XML Count DB 10.4 140 110 11.4 144 114 Trunk 159 127 Separate versions of Party Entity Set Status Enabled.patch for 10.4 and 1.4 can be provided if needed.
        Hide
        Jacopo Cappellato added a comment -

        This issue has been originally reported by Tom Burns.

        Show
        Jacopo Cappellato added a comment - This issue has been originally reported by Tom Burns.

          People

          • Assignee:
            Unassigned
            Reporter:
            Jacopo Cappellato
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development