Uploaded image for project: 'OpenICF'
  1. OpenICF
  2. OPENICF-791

Error/Warning isn't displayed when "Uid" missing at record

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: csvfile-connector-1.5.3.0
    • Fix Version/s: csvfile-connector-1.5.4.0
    • Component/s: CSV File Connector
    • Labels:
    • Environment:
      Linux Mint 16.04, OpenIDM version "6.0.0-SNAPSHOT" (revision: 60671c1), CSV File Connector "1.5.3.0-SNAPSHOT" (Implementation-Build: 107)

      Description

      When get request on data when some a record doesn't "Uid" so Error/Warning message is not displayed.

      Steps to reproduce for first case:

      • For the sample sync-with-csv
      1. Edit csvConnectorData.csv on:
        "description", "uid", "username", "firstname", "lastname", "email", "mobileTelephoneNumber", "roles"
        "Created By CSV", "bjensen", "bjensen@example.com", "Barbara", "Jensen", "bjensen@example.com", "1234567", "openidm-authorized"
        "Created By CSV", "scarter", "scarter@example.com", "Steven", "Carter", "scarter@example.com", "1234567", "openidm-admin,openidm-authorized"
        "Test",,,"test","lastName_test12","foo@bar.com","1","openidm-authorized"
        
      2. Running the sample
        ./startup.sh -p samples/sync-with-csv/
        
      3. Send GET request
        curl --header "X-OpenIDM-Password: openidm-admin" --header "X-OpenIDM-Username: openidm-admin" --request GET "http://localhost:8080/openidm/system/csvfile/account/?_queryId=query-all-ids"
        

      Actual result:
      Request returned code 200 and contained:

      {
          "result": [
              {
                  "_id": "bjensen",
                  "name": "bjensen"
              },
              {
                  "_id": "scarter",
                  "name": "scarter"
              },
              {
                  "_id": "scarter",
                  "name": "scarter"
              }
          ],
          "resultCount": 3,
          "pagedResultsCookie": "MA==",
          "totalPagedResultsPolicy": "NONE",
          "totalPagedResults": -1,
          "remainingPagedResults": -1
      }
      

      Expected result:
      Error/Warning message should be displayed. Not only display wrong Uid at content result for the third record.

      Steps to reproduce for case 2:

      • For the sample sync-with-csv. First record doesn't have "Uid"
      1. Edit csvConnectorData.csv on:
        "description", "uid", "username", "firstname", "lastname", "email", "mobileTelephoneNumber", "roles"
        "Test",,,"test","lastName_test12","foo@bar.com","1","openidm-authorized"
        "Created By CSV", "bjensen", "bjensen@example.com", "Barbara", "Jensen", "bjensen@example.com", "1234567", "openidm-authorized"
        "Created By CSV", "scarter", "scarter@example.com", "Steven", "Carter", "scarter@example.com", "1234567", "openidm-admin,openidm-authorized"
        
      2. Running the sample
        ./startup.sh -p samples/sync-with-csv/
        
      3. Send GET request
        curl --header "X-OpenIDM-Password: openidm-admin" --header "X-OpenIDM-Username: openidm-admin" --request GET "http://localhost:8080/openidm/system/csvfile/account/?_queryId=query-all-ids"
        

      Actual result:
      Returned code 400.

      {
          "code": 400,
          "reason": "Bad Request",
          "message": "The Attribute set must contain a 'Uid'."
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                katie.gonzalez Katie Gonzalez
                Reporter:
                miroslav.meca Miroslav Meca
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: