REST call returns values with inconsistent order

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Issue Summary

      The order of the values returned from the following REST call is inconsistent. 

       /rest/usermanagement/1/group/user/direct  

      This is the case with the following conditions:

      • start-indext=0
      • max-results=10 
      • One or more of the results include an upper case letter. 

      Steps to Reproduce

      1. In Crowd ensure a group exists that includes few users. Ensure that an upper case username is present. 
      2. Ensure that the group belongs to a directory that is configured to operate with an Application.
      3. Using Postman or Curl run the following REST call
        /rest/usermanagement/1/group/user/direct?groupname=confluence-users&start-index=0&max-results=2

      Expected Results

      When the result of the REST call does not include an upper case username, the results are ordered alphabetically.

      /rest/usermanagement/1/group/user/direct?groupname=confluence-users&start-index=0&max-results=2 
      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <users expand="user">
          <user name="admin">
              <link href="http://localhost:8095/tccrowd/rest/usermanagement/1/user?username=admin" rel="self"/>
          </user>
          <user name="confluence_user1">
              <link href="http://localhost:8095/tccrowd/rest/usermanagement/1/user?username=confluence_user1" rel="self"/>
          </user>
      </users>

      When the result of the REST call  include an upper case username, the results should also be ordered the same way as it is ordered above. 

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <users expand="user">
          
          <user name="admin">
              <link href="http://localhost:8095/tccrowd/rest/usermanagement/1/user?username=admin" rel="self"/>
          </user>
          <user name="confluence_user1">
              <link href="http://localhost:8095/tccrowd/rest/usermanagement/1/user?username=confluence_user1" rel="self"/>
          </user>
      <user name="Faridi">
              <link href="http://localhost:8095/tccrowd/rest/usermanagement/1/user?username=Faridi" rel="self"/>
          </user>
          <user name="test">
              <link href="http://localhost:8095/tccrowd/rest/usermanagement/1/user?username=test" rel="self"/>
          </user>
          <user name="test12345">
              <link href="http://localhost:8095/tccrowd/rest/usermanagement/1/user?username=test12345" rel="self"/>
          </user>
      </users>
      

      Actual Results

      When the result of the REST call  include an upper case username, the results should also be ordered the same way as it is ordered above. 

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <users expand="user">
          <user name="Faridi">
              <link href="http://localhost:8095/tccrowd/rest/usermanagement/1/user?username=Faridi" rel="self"/>
          </user>
          <user name="admin">
              <link href="http://localhost:8095/tccrowd/rest/usermanagement/1/user?username=admin" rel="self"/>
          </user>
          <user name="confluence_user1">
              <link href="http://localhost:8095/tccrowd/rest/usermanagement/1/user?username=confluence_user1" rel="self"/>
          </user>
          <user name="test">
              <link href="http://localhost:8095/tccrowd/rest/usermanagement/1/user?username=test" rel="self"/>
          </user>
          <user name="test12345">
              <link href="http://localhost:8095/tccrowd/rest/usermanagement/1/user?username=test12345" rel="self"/>
          </user>
      </users>
      

      Workaround

      At the moment there is no known workaround

       

              Assignee:
              Unassigned
              Reporter:
              Ahmad Faridi (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: