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

Relationship expansion returns nothing on notification endpoint

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.5.0
    • 6.5.0
    • module - Notifications
    • None

    Description

      Target details are missing in the response from the notification endpoint when a link-expanded target field is requested.

      Steps to reproduce:
      1. start IDM
      2. create a user

      curl -X POST \
        'http://localhost:8080/openidm/managed/user?_action=create' \
        -H 'Content-Type: application/json' \
        -H 'X-OpenIDM-Password: openidm-admin' \
        -H 'X-OpenIDM-Username: openidm-admin' \
        -d '{
      	"_id": "testuser",
              "userName": "tuser",
              "givenName": "Testy",
              "sn": "Testuser",
              "mail": "testuser@fr.com"
      }'
      
      {
          "_id": "testuser",
          "_rev": "000000002ccedd57",
          "userName": "tuser",
          "givenName": "Testy",
          "sn": "Testuser",
          "mail": "testuser@fr.com",
          "accountStatus": "active",
          "effectiveRoles": [],
          "effectiveAssignments": []
      }
      

      3. patch the user

      curl -X PATCH \
        http://localhost:8080/openidm/managed/user/testuser \
        -H 'Content-Type: application/json' \
        -H 'X-OpenIDM-Password: openidm-admin' \
        -H 'X-OpenIDM-Username: openidm-admin' \
        -d '[
      	{
      		"operation":"replace",
      		"field":"/sn",
      		"value" : "testing"
      	}
      ]'
      
      {
          "_id": "testuser",
          "_rev": "00000000b2bbf327",
          "userName": "tuser",
          "givenName": "Testy",
          "sn": "testing",
          "mail": "testuser@fr.com",
          "accountStatus": "active",
          "effectiveRoles": [],
          "effectiveAssignments": []
      }
      

      4. get notification ID

      curl -X GET \
        'http://localhost:8080/openidm/managed/user/testuser?_fields=_notifications' \
        -H 'X-OpenIDM-Password: openidm-admin' \
        -H 'X-OpenIDM-Username: openidm-admin'
      
      {
          "_id": "testuser",
          "_rev": "00000000b2bbf327",
          "_notifications": [
              {
                  "_ref": "internal/notification/0c0d8fd9-2619-4ce1-aa05-b0d896277525",
                  "_refResourceCollection": "internal/notification",
                  "_refResourceId": "0c0d8fd9-2619-4ce1-aa05-b0d896277525",
                  "_refProperties": {
                      "_id": "3f10ddd6-c24c-4d75-a1ac-6975fb46282e",
                      "_rev": "00000000292ea59c"
                  }
              }
          ]
      }
      

      5. request target link expansion

      curl -X GET \
        'http://localhost:8080/openidm/notification/0c0d8fd9-2619-4ce1-aa05-b0d896277525?_fields=target/*' \
        -H 'X-OpenIDM-Password: openidm-admin' \
        -H 'X-OpenIDM-Username: openidm-admin'
      
      {
          "_id": "0c0d8fd9-2619-4ce1-aa05-b0d896277525",
          "_rev": "0000000047646488"
      }
      

      Attachments

        Issue Links

          Activity

            People

              ben.apple Ben Apple
              ben.apple Ben Apple
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: