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

createPartyGroupRoleAndContactMechs service not working

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Trunk
    • None
    • sfa
    • None

    Description

      While researched on ticket OFBIZ-11896 identified that groovy version of createPartyGroupRoleAndContactMechs service (converted from mini lang at rev 8af7cf877583acf100d1229260e62fe7f4c92563 ) is not working. Identify these two reasons,

      1. resolvePartyGroupMap called incorrectly
      2. resolvePostalAddressMap and resolveTelecomNumberMap implemented incorrectly as 'postalAddress' and 'telecomNumber' map processor not available into PartyMapProcs.xml.

      There may be more reasons along with these two reasons.

      Attachments

        1. OFBIZ-11986.patch
          0.7 kB
          sourabh jain

        Issue Links

          Activity

            sourabh.jain sourabh jain added a comment -

            I have added the patch for the fix.

            OFBIZ-11986.patch
            Please let me know if any modification is needed.

            sourabh.jain sourabh jain added a comment - I have added the patch for the fix. OFBIZ-11986 .patch Please let me know if any modification is needed.

            Commit 7b01534208ca83e4c890791821cad54a89ea4a23 in ofbiz-framework's branch refs/heads/trunk from Jacques Le Roux
            [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=7b01534 ]

            Fixed: createPartyGroupRoleAndContactMechs service not working (OFBIZ-11986)

            While researched on ticket OFBIZ-11896 identified that groovy version of
            createPartyGroupRoleAndContactMechs service (converted from mini lang at rev
            8af7cf877583acf100d1229260e62fe7f4c92563 ) is not working.

            Identify these two reasons,
            resolvePartyGroupMap called incorrectly
            resolvePostalAddressMap and resolveTelecomNumberMap implemented incorrectly
            as 'postalAddress' and 'telecomNumber' map processor not available into PartyMapProcs.xml.

            There may be more reasons along with these two reasons.

            Thanks: Akash Jain for report, Sourabh Jain for incomplete patch (missed 2nd
            point from Akash

            jira-bot ASF subversion and git services added a comment - Commit 7b01534208ca83e4c890791821cad54a89ea4a23 in ofbiz-framework's branch refs/heads/trunk from Jacques Le Roux [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=7b01534 ] Fixed: createPartyGroupRoleAndContactMechs service not working ( OFBIZ-11986 ) While researched on ticket OFBIZ-11896 identified that groovy version of createPartyGroupRoleAndContactMechs service (converted from mini lang at rev 8af7cf877583acf100d1229260e62fe7f4c92563 ) is not working. Identify these two reasons, resolvePartyGroupMap called incorrectly resolvePostalAddressMap and resolveTelecomNumberMap implemented incorrectly as 'postalAddress' and 'telecomNumber' map processor not available into PartyMapProcs.xml. There may be more reasons along with these two reasons. Thanks: Akash Jain for report, Sourabh Jain for incomplete patch (missed 2nd point from Akash

            Commit 70ff1c500665ae400c077f0e0c9f875afa6d4b3d in ofbiz-framework's branch refs/heads/trunk from Jacques Le Roux
            [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=70ff1c5 ]

            Fixed: createPartyGroupRoleAndContactMechs service not working (OFBIZ-11986)

            As Akash Jain reported:

            <<While researched on ticket OFBIZ-11896 identified that groovy version of
            createPartyGroupRoleAndContactMechs service (converted from mini lang at rev
            8af7cf877583acf100d1229260e62fe7f4c92563 ) is not working.
            Identify these two reasons,
            resolvePartyGroupMap called incorrectly
            resolvePostalAddressMap and resolveTelecomNumberMap implemented incorrectly
            as 'postalAddress' and 'telecomNumber' map processor
            not available into PartyMapProcs.xml.

            There may be more reasons along with these two reasons.>>

            He was so true to say the later!

            There are also some intentionally or automated formattings.

            Thanks: Akash for report, Sourabh Jain for shy tentative

            jira-bot ASF subversion and git services added a comment - Commit 70ff1c500665ae400c077f0e0c9f875afa6d4b3d in ofbiz-framework's branch refs/heads/trunk from Jacques Le Roux [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=70ff1c5 ] Fixed: createPartyGroupRoleAndContactMechs service not working ( OFBIZ-11986 ) As Akash Jain reported: <<While researched on ticket OFBIZ-11896 identified that groovy version of createPartyGroupRoleAndContactMechs service (converted from mini lang at rev 8af7cf877583acf100d1229260e62fe7f4c92563 ) is not working. Identify these two reasons, resolvePartyGroupMap called incorrectly resolvePostalAddressMap and resolveTelecomNumberMap implemented incorrectly as 'postalAddress' and 'telecomNumber' map processor not available into PartyMapProcs.xml. There may be more reasons along with these two reasons.>> He was so true to say the later! There are also some intentionally or automated formattings. Thanks: Akash for report, Sourabh Jain for shy tentative

            Thanks Akashk and Sourabh,

            Sourabh, you missed the 2nd point from Akash. Actually you missed much more. Actually OFBIZ-11413 was a total mess, not your fault . OFBIZ-11572 which reuses createPartyGroupRoleAndContactMechs has the same issue. I did not even try to explain you how to cope with these issues because I had to struggle to undersand what the problems were :/.

            The crux of the problems was the call to createPartyContactMechs as a service. Before it was a simple-method call. And how to call a service and a simple-method is different (parameters vs minilang context). I'll not get into all details but for the email address in case of the service an emailAddressContext Map is expected not an emailAddress String. This of course entails more changes.

            Sincerely If I had knew I'd not have started that work . Anyway it now works.

            If you have the guts (be ready ), the work is still not complete: createPartyGroupRoleAndContactMechs (account), createPersonRoleAndContactMechs (lead) and createPartyContactMechs (used by both) should be converted to Groovy

            I have created OFBIZ-12034 for that an will put some more information there later...

            This said it's a pity nobody tested the feature by creating an account and a lead from the UI. It's easy to do and to check.

            jleroux Jacques Le Roux added a comment - Thanks Akashk and Sourabh, Sourabh, you missed the 2nd point from Akash. Actually you missed much more. Actually OFBIZ-11413 was a total mess, not your fault . OFBIZ-11572 which reuses createPartyGroupRoleAndContactMechs has the same issue. I did not even try to explain you how to cope with these issues because I had to struggle to undersand what the problems were :/. The crux of the problems was the call to createPartyContactMechs as a service. Before it was a simple-method call. And how to call a service and a simple-method is different (parameters vs minilang context). I'll not get into all details but for the email address in case of the service an emailAddressContext Map is expected not an emailAddress String. This of course entails more changes. Sincerely If I had knew I'd not have started that work . Anyway it now works. If you have the guts (be ready ), the work is still not complete: createPartyGroupRoleAndContactMechs (account), createPersonRoleAndContactMechs (lead) and createPartyContactMechs (used by both) should be converted to Groovy I have created OFBIZ-12034 for that an will put some more information there later... This said it's a pity nobody tested the feature by creating an account and a lead from the UI. It's easy to do and to check.

            Commit cf7164fc64280eb8747073622dea3e0bc4d31ca6 in ofbiz-framework's branch refs/heads/trunk from Olivier Heintz
            [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=cf7164f ]

            fixed: createPartyGroupRoleAndContactMechs service not working (OFBIZ-11986)

            Service is used for create employee service, and email address is not mandatory, so emailAddressContext should be empty if parameters.emailAddress is empty.

            Correction done is to call createPerson before creating emailAddressContext to be able to put set partyId in the if not empty parameters.emailAddress

            jira-bot ASF subversion and git services added a comment - Commit cf7164fc64280eb8747073622dea3e0bc4d31ca6 in ofbiz-framework's branch refs/heads/trunk from Olivier Heintz [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=cf7164f ] fixed: createPartyGroupRoleAndContactMechs service not working ( OFBIZ-11986 ) Service is used for create employee service, and email address is not mandatory, so emailAddressContext should be empty if parameters.emailAddress is empty. Correction done is to call createPerson before creating emailAddressContext to be able to put set partyId in the if not empty parameters.emailAddress

            Thanks Olivier!

            jleroux Jacques Le Roux added a comment - Thanks Olivier!

            People

              jleroux Jacques Le Roux
              akash.jain Akash Jain
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: