Details
-
Bug
-
Status: Closed (View Workflow)
-
TBD
-
Resolution: Done
-
-
ERM Sprint 88
-
Bienenvolk
Description
The new agreement line note (ERM-779) is not saved (or if it is saved, is not retrieved) if the agreement line is based on an eHoldings resource.
To recreate:
Add a eHoldings resource to an Agreement - e.g. (but substituting an appropriate Agreement ID / label)
curl 'https://folio-snapshot-okapi.aws.indexdata.com/erm/sas/ef4b01dd-4e62-4711-a404-d5cf6104f222' -X PUT -H 'authority: folio-snapshot-okapi.aws.indexdata.com' -H 'sec-fetch-dest: empty' -H 'x-okapi-tenant: diku' -H 'x-okapi-token: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWt1X2FkbWluIiwidXNlcl9pZCI6IjRmOTAyZWE1LWJjOGQtNWYzMS05YzQ1LTU3MTQ5NWZkOGFiZiIsImlhdCI6MTU4NzA2MTU2OCwidGVuYW50IjoiZGlrdSJ9.5T5FNp10cO89hmBfVgh2rSk-urMkGjzHG8XYGf11uOY' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 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 'referer: https://folio-snapshot.aws.indexdata.com/eholdings/resources/19-1125-32090' -H 'accept-language: en,en-GB;q=0.9,en-US;q=0.8' --data-binary '{"items":[{"type":"external","authority":"EKB-TITLE","reference":"19-1125-32090","label":"OS Test Agreement"}]}' --compressed
Then edit the agreement line to add a note to the agreement line:
curl 'https://folio-snapshot-okapi.aws.indexdata.com/erm/sas/ef4b01dd-4e62-4711-a404-d5cf6104f222' -X PUT -H 'authority: folio-snapshot-okapi.aws.indexdata.com' -H 'accept: text/plain' -H 'sec-fetch-dest: empty' -H 'x-okapi-tenant: diku' -H 'x-okapi-token: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWt1X2FkbWluIiwidXNlcl9pZCI6IjRmOTAyZWE1LWJjOGQtNWYzMS05YzQ1LTU3MTQ5NWZkOGFiZiIsImlhdCI6MTU4NzA2MTU2OCwidGVuYW50IjoiZGlrdSJ9.5T5FNp10cO89hmBfVgh2rSk-urMkGjzHG8XYGf11uOY' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36' -H 'content-type: application/json' -H 'origin: https://folio-snapshot.aws.indexdata.com' -H 'sec-fetch-site: same-site' -H 'sec-fetch-mode: cors' -H 'referer: https://folio-snapshot.aws.indexdata.com/erm/agreements/ef4b01dd-4e62-4711-a404-d5cf6104f222/edit?filters=agreementStatus.Active%2CagreementStatus.Draft%2CagreementStatus.In%20negotiation%2CagreementStatus.Requested&query=os&sort=name' -H 'accept-language: en,en-GB;q=0.9,en-US;q=0.8' --data-binary '{"id":"ef4b01dd-4e62-4711-a404-d5cf6104f222","customProperties":{},"contacts":[],"tags":[],"inwardRelationships":[],"linkedLicenses":[],"docs":[],"items":[{"id":"00519c1f-6a95-466f-9199-9cd18618847c","activeFrom":null,"activeTo":null,"note":"test note"}],"periods":[{"id":"8ff2beaa-dd6d-4208-a211-50d2586a6614","startDate":"2020-04-01","owner":{"id":"ef4b01dd-4e62-4711-a404-d5cf6104f222"}}],"historyLines":[],"name":"OS Test Agreement","orgs":[],"usageDataProviders":[],"agreementStatus":"active","supplementaryDocs":[],"outwardRelationships":[],"externalLicenseDocs":[],"currentPeriod":{"id":"8ff2beaa-dd6d-4208-a211-50d2586a6614","startDate":"2020-04-01","owner":{"id":"ef4b01dd-4e62-4711-a404-d5cf6104f222"}},"startDate":"2020-04-01","endDate":null,"cancellationDeadline":null,"relatedAgreements":[]}' --compressed
You can see this includes a note in the agreement line:
"items": [ { "id": "00519c1f-6a95-466f-9199-9cd18618847c", "activeFrom": null, "activeTo": null, "note": "test note" } ]
Then fetching the entitlements:
curl 'https://folio-snapshot-okapi.aws.indexdata.com/erm/entitlements?filters=owner%3Def4b01dd-4e62-4711-a404-d5cf6104f222&perPage=100&sort=resource.name&stats=true' -H 'authority: folio-snapshot-okapi.aws.indexdata.com' -H 'accept: application/json' -H 'sec-fetch-dest: empty' -H 'x-okapi-tenant: diku' -H 'x-okapi-token: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkaWt1X2FkbWluIiwidXNlcl9pZCI6IjRmOTAyZWE1LWJjOGQtNWYzMS05YzQ1LTU3MTQ5NWZkOGFiZiIsImlhdCI6MTU4NzA2MTU2OCwidGVuYW50IjoiZGlrdSJ9.5T5FNp10cO89hmBfVgh2rSk-urMkGjzHG8XYGf11uOY' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36' -H 'content-type: application/json' -H 'origin: https://folio-snapshot.aws.indexdata.com' -H 'sec-fetch-site: same-site' -H 'sec-fetch-mode: cors' -H 'referer: https://folio-snapshot.aws.indexdata.com/erm/agreements/ef4b01dd-4e62-4711-a404-d5cf6104f222?filters=agreementStatus.Active%2CagreementStatus.Draft%2CagreementStatus.In%20negotiation%2CagreementStatus.Requested&query=os&sort=name' -H 'accept-language: en,en-GB;q=0.9,en-US;q=0.8' --compressed
See that the response doesn't include the note:
{ "results": [ { "id": "00519c1f-6a95-466f-9199-9cd18618847c", "type": "external", "authority": "EKB-TITLE", "reference": "19-1125-32090", "explanation": null, "startDate": null, "endDate": null, "contentUpdated": null, "haveAccess": true, "owner": { "id": "ef4b01dd-4e62-4711-a404-d5cf6104f222" }, "customCoverage": false, "coverage": [ { "startDate": "1922-10-01", "summary": "v*/i*/1922-10-01 - v*/i*/*" } ], "reference_object": { "label": "Harvard Business Review", "type": "Journal", "provider": "EBSCO" } } ], "pageSize": 100, "page": 1, "totalPages": 1, "meta": {}, "totalRecords": 1, "total": 1 }
TestRail: Results
Attachments
Issue Links
- relates to
-
ERM-779 Agreements: Agreement lines: Add new field - "Note"
-
- Closed
-