Uploaded image for project: 'ERM Platform'
  1. ERM Platform
  2. ERM-841

Duplicate license: Files are not copied to the duplicated license record

    XMLWordPrintable

Details

    • ERM Sprint 92
    • Bienenvolk
    • Q2 2020

    Description

      When a user attempts to duplicate a license including core or supplementary documents an error is generated

      CURL

      curl 'https://folio-snapshot-stable-okapi.aws.indexdata.com/licenses/licenses/11d26b2e-4cfc-4350-bade-8048b9e40b1e/clone' \
        -H 'authority: folio-snapshot-stable-okapi.aws.indexdata.com' \
        -H 'x-okapi-tenant: diku' \
        -H 'x-okapi-token: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWt1X2FkbWluIiwidXNlcl9pZCI6ImVmOTJiOGUzLTdlZTQtNTEyNC1iYWZmLWE0YWQxMDI4MDRiZiIsImlhdCI6MTU5MjIyNjU2NCwidGVuYW50IjoiZGlrdSJ9.xhzpWb9Jm8DrHk5C6WhvjAwLViqbDbNUXieP9TTqGAc' \
        -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36' \
        -H 'content-type: application/json' \
        -H 'accept: */*' \
        -H 'origin: https://folio-snapshot.aws.indexdata.com' \
        -H 'sec-fetch-site: same-site' \
        -H 'sec-fetch-mode: cors' \
        -H 'sec-fetch-dest: empty' \
        -H 'referer: https://folio-snapshot.aws.indexdata.com/licenses/11d26b2e-4cfc-4350-bade-8048b9e40b1e?filters=status.active&sort=name' \
        -H 'accept-language: en,en-GB;q=0.9,en-US;q=0.8' \
        --data-binary '{"coreDocs":true,"supplementaryDocs":true}' \
        --compressed
      

      Response:

      {"total":2,"_embedded":{"errors":[{"message":"Property [fileObject] of class [class com.k_int.web.toolkit.files.FileUpload] cannot be null","path":"","_links":{"self":{"href":"https://folio-snapshot-stable-okapi.aws.indexdata.com:8080"}}},{"message":"Property [fileObject] of class [class com.k_int.web.toolkit.files.FileUpload] cannot be null","path":"","_links":{"self":{"href":"https://folio-snapshot-stable-okapi.aws.indexdata.com:8080"}}}]}}
      

      The license being duplicated is:

      {
        "id": "11d26b2e-4cfc-4350-bade-8048b9e40b1e",
        "endDateSemantics": {
          "id": "2c9180a672b60c010172b60e03fe0007"
        },
        "dateCreated": "2020-06-15T11:05:55Z",
        "links": [],
        "customProperties": {},
        "contacts": [],
        "tags": [],
        "lastUpdated": "2020-06-15T11:13:51Z",
        "docs": [
          {
            "id": "265fcb1e-7b9a-45ad-bce9-3c7ff8125f7b",
            "dateCreated": "2020-06-15T11:08:54Z",
            "lastUpdated": "2020-06-15T11:08:54Z",
            "location": "FC1",
            "fileUpload": {
              "id": "5f00f5d1-342f-468f-b7c8-87c977b84e29",
              "contentType": "text/plain",
              "size": 612,
              "modified": "2020-06-15T11:08:54Z",
              "name": "trusted_source_test_package_kbart_update_5.txt"
            },
            "url": "http://google.com",
            "name": "Test Core Doc",
            "note": "test core doc note"
          }
        ],
        "name": "OS Test License",
        "status": {
          "id": "2c9180a672b60c010172b60e041f000c",
          "value": "active",
          "label": "Active"
        },
        "supplementaryDocs": [
          {
            "id": "c557170c-e4eb-41c6-a45c-45d90a80a7a1",
            "dateCreated": "2020-06-15T11:13:51Z",
            "lastUpdated": "2020-06-15T11:13:51Z",
            "atType": {
              "id": "2c9180a672b60c010172b60e04620015",
              "value": "consortium_authorization_statement",
              "label": "Consortium authorization statement"
            },
            "location": "FC1",
            "fileUpload": {
              "id": "dae41d87-c025-4fa7-aa95-d2856803352e",
              "contentType": "text/plain",
              "size": 612,
              "modified": "2020-06-15T11:13:51Z",
              "name": "trusted_source_test_package_kbart_update_5.txt"
            },
            "url": "http://google.com",
            "name": "Supp doc 1",
            "note": "asdf"
          }
        ],
        "_links": {
          "linkedResources": {
            "href": "/licenses/licenseLinks?filter=owner.id%3d11d26b2e-4cfc-4350-bade-8048b9e40b1e"
          }
        },
        "openEnded": false,
        "amendments": [],
        "orgs": [],
        "type": {
          "id": "2c9180a672b60c010172b60e043e0010",
          "value": "local",
          "label": "Local"
        },
        "alternateNames": []
      }
      

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                ostephens Owen Stephens
                gosguthorpe Gill Osguthorpe
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases