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

CountPolicy does not work because -count queryIds are missing

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: OpenIDM 5.0.0
    • Fix Version/s: OpenIDM 5.0.0
    • Labels:
    • Environment:
      OpenIDM version "5.0.0-SNAPSHOT" (revision: c8f13df) jenkins-OpenIDM - postcommit-1742 origin/master

      Description

      I tried CountPolicies by documentation and it doesn't work in openidm 5.0.0-SNAPSHOT. It work in openidm 4.0.0 where is maybe problem with estimate parameter but I don't know sure for now (I working on finding it ). I tried it with 120 records.

      Doc:
      https://forgerock.org/openidm/doc/bootstrap/integrators-guide/index.html#paging-query-results

      My query

      curl  --header "X-OpenIDM-Username: openidm-admin"  --header "X-OpenIDM-Password: openidm-admin"  --request GET  "http://localhost:8080/openidm/managed/user?_queryId=query-all-ids&_pageSize=3&_totalPagedResultsPolicy=EXACT" | jq .
      

      and I got result:

      "remainingPagedResults": -1,
        "totalPagedResults": -1,
        "totalPagedResultsPolicy": "NONE",
        "pagedResultsCookie": "3",
        "resultCount": 3,
        "result": [
          {
            "_rev": "2",
            "_id": "b3bc1834-8e0c-46f7-b082-91fe336921f6"
          },
          {
            "_rev": "2",
            "_id": "6e9bad78-413d-4757-ba54-881e8fed0bc7"
          },
          {
            "_rev": "2",
            "_id": "cac41cc1-53c7-44c7-a681-ec5a5470cfed"
          }
        ]
      }
      
      

      but expected result is:

      "remainingPagedResults": -1,
        "totalPagedResults": 120,
        "totalPagedResultsPolicy": "EXACT",
        "pagedResultsCookie": "3",
        "resultCount": 3,
        "result": [
          {
            "_rev": "2",
            "_id": "b3bc1834-8e0c-46f7-b082-91fe336921f6"
          },
          {
            "_rev": "2",
            "_id": "6e9bad78-413d-4757-ba54-881e8fed0bc7"
          },
          {
            "_rev": "2",
            "_id": "cac41cc1-53c7-44c7-a681-ec5a5470cfed"
          }
        ]
      }
      
      

      For ESTIMATE parameter was result same as for EXACT parameter.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                joy.feng Joy Feng [X] (Inactive)
                Reporter:
                vojtech.oczka Vojtěch Oczka
                QA Assignee:
                Vojtěch Oczka
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: