Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-136253

Omitting the externalReferenceCode on headless postAccount adds an account with an empty ERC

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: No Longer Reproducible
    • Affects Version/s: Master
    • Fix Version/s: Master
    • Component/s: User Management
    • Labels:
      None

      Description

       Steps to reproduce: 

      1. Go to Headless API page (http://localhost:8080/o/api)
      2. Go to REST Applications > account-rest/v1.0
      3. Select the postAccount endpoint (/v1.0/accounts)
      4. Add an account containing only the name field on the JSON (Account1)
      5. Check the Accounts portlet to see the account name
      6. Repeat step 3 with a different account name (Account2)
      7. Check the Accounts portlet again

      JSON example:

      {
        "name": "Account1"
      }

       Expected Result:

      2 accounts should be added. External reference code should be ignored since it was omitted on the JSON.

       

       Actual Result:

      The first account (Account1) was updated with the name of the second account (Account2) instead of creating a new one.

       

       Notes:

      Omitting the ERC field on the JSON will add an account with an empty ERC ("") during the
      addOrUpdateAccountEntry call. 

       

       Reproduced In:

      master: 6acb96a2033a58cd385f8a40b31af85a93eb4985

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              support-lep@liferay.com SE Support
              Reporter:
              erick.monteiro Erick Monteiro
              Participants of an Issue:
              Recent user:
              Melody Wu
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                17 weeks ago

                  Packages

                  Version Package
                  Master