Details
-
Bug
-
Status: Closed (View Workflow)
-
TBD
-
Resolution: Done
-
ERM Sprint 96
-
Bienenvolk
Description
Overview:
When setting Coverage or Custom Coverage dates for PCIs or Entitlements, the dates are being submitted to the backend incorrectly formatted leading to errors.
Affected screens include:
/erm/agreements/<agreement uuid>/line/<entitlement uuid>/edit
/erm/agreements/<agreement uuid>/edit
/erm/eresources/<pci UUID>/edit
Steps to Reproduce:
- Create an agreement and add a journal as an agreement line
- Edit agreement and add custom coverage to the agreement line
- Click Save
Expected Results:
Custom coverage added to agreement line
Actual Results:
Error
{ "total": 1, "errors": [ { "code": "nullable", "object": "org.olf.erm.SubscriptionAgreement", "i18n_code": "org.olf.erm.SubscriptionAgreement.items[0].coverage[0].startDate.nullable", "message": "Property [startDate] of class [class org.olf.erm.HoldingsCoverage] cannot be null" } ] }
Additional Information:
Looking at the console I can see that the date is being submitted in the entered format rather than in the correct YYYY-MM-DD format
{ "id": "4cb8590a-bc4f-445f-abe2-cf22cb5cd988", "customProperties": {}, "contacts": [], "tags": [], "inwardRelationships": [], "linkedLicenses": [], "docs": [], "items": [ { "id": "d81c5e76-c96f-4f64-bad6-d8c65951261c", "coverage": [ { "_delete": false, "startDate": "09/01/2020" <--- incorrect format } ], "poLines": [], "activeFrom": "2002-01-01", "activeTo": "2020-09-30" } ], "periods": [ { "id": "a4da3e1e-1049-4259-a241-d8b02d5415e4", "owner": { "id": "4cb8590a-bc4f-445f-abe2-cf22cb5cd988" }, "startDate": "2020-09-01" } ], "historyLines": [], "name": "OS Test Agreement 1", "orgs": [], "usageDataProviders": [], "agreementStatus": "active", "supplementaryDocs": [], "outwardRelationships": [], "externalLicenseDocs": [], "currentPeriod": { "id": "a4da3e1e-1049-4259-a241-d8b02d5415e4", "startDate": "2020-09-01", "owner": { "id": "4cb8590a-bc4f-445f-abe2-cf22cb5cd988" } }, "startDate": "2020-09-01", "endDate": null, "cancellationDeadline": null, "alternateNames": [], "relatedAgreements": [] }
URL:
Interested parties: