Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-6549

Backport OPENIDM-6457: CREATE request with _fields for relationships are not returned in the response

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: OpenIDM 4.5.0, OpenIDM 5.0.0
    • Fix Version/s: OpenIDM 4.5.1
    • Component/s: Module - Relationships
    • Labels:
      None

      Description

      With this request

      
      POST managed/user/?_action=create&_fields=*,organisations/*
      { 
      "userName":"ta",
      "givenName":"him", 
      "sn":"him", 
      "mail":"him@example.com", 
      "telephoneNumber":"555- 123-1234",
      "password":"Passw0rd", 
      "description":"A user", 
      "_id":"oh",
      "organisations":[{"_ref":"ORG"}]
      }
      
      

      The organisation relationship is not returned in the response,

      {
        "_id": "oh",
        "_rev": "0",
        "userName": "ta",
        "givenName": "him",
        "sn": "him",
        "mail": "him@example.com",
        "telephoneNumber": "555- 123-1234",
        "description": "A user",
        "accountStatus": "active",
        "effectiveRoles": [],
        "effectiveAssignments": []
      }
      

      but relationship was created :

      GET managed/user/oh/?_fields=*,organisations/*
      {
        "_id": "oh",
        "_rev": "0",
        "userName": "ta",
        "givenName": "him",
        "sn": "him",
        "mail": "him@example.com",
        "telephoneNumber": "555- 123-1234",
        "description": "A user",
        "accountStatus": "active",
        "effectiveRoles": [],
        "effectiveAssignments": [],
        "organisations": [
          {
            "_ref": "ORG",
            "_refProperties": {
              "_id": "b0d32286-b91f-474e-be2f-cf670fa4969d",
              "_rev": "0"
            },
            "_refError": true,
            "_refErrorMessage": "Resource 'ORG' not found"
          }
        ]
      }
      

      On 4.0, the CREATE response, for the same CREATE request :

      {
        "_id": "oh",
        "_rev": "2",
        "userName": "ta",
        "givenName": "him",
        "sn": "him",
        "mail": "him@example.com",
        "telephoneNumber": "555- 123-1234",
        "description": "A user",
        "accountStatus": "active",
        "effectiveRoles": [],
        "effectiveAssignments": [],
        "organisations": [
          {
            "_ref": "ORG",
            "_refProperties": {
              "_id": "952f82ec-ba2b-4cb4-9669-8d1f590cf660",
              "_rev": "2"
            },
            "_refError": true,
            "_refErrorMessage": "Resource 'ORG' not found"
          }
        ]
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              patrickdiligent patrick diligent
              Reporter:
              patrickdiligent patrick diligent
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: