Update po lines when an order is closed with the "Cancelled" reason

CSP Request Details

None

CSP Rejection Details

None

CSP Approved

None

Description

Purpose:
Update po lines when an order is closed with the "Cancelled" reason.

Acceptance criteria:

  • When an order is closed with the "Cancelled" reason, the paymentStatus and receiptStatus of ALL POLs should be updated to "Cancelled" with the following exceptions

    • If Payment status is set to "Payment not required" or "Fully paid" it is NOT changed to canceled

    • If Receipt status is set to "Receipt not required" or "Fully received" it is NOT changed to canceled

  • Schema should have an additional description giving the system values for reasons, so we know we can rely on them. This should not cause any logical change to the schema. Currently reasons for closure can be found in mod-orders-storage/src/main/resources/data/system/reasons-for-closure.

  • Tests should be updated.

see wiki for more detail https://folio-org.atlassian.net/wiki/x/JQhU

Environment

None

Potential Workaround

None

Checklist

hide

TestRail: Results

Activity

Show:

Dennis BridgesMay 4, 2022 at 10:17 PM

test successful in folio-snapshot-2

DamienMay 2, 2022 at 8:39 PM

  The test passes when using a workaround (adding the missing permission to userPermissions; I think this issue is not on our side). I am passing this ticket to   for final verification.

Andrei MakarankaMay 2, 2022 at 3:09 PM

Hi ,

I see an error connected to permission set when run tests.

16:38:19.471 [main] DEBUG com.intuit.karate - response time in milliseconds: 573 1 < 200 1 < Date: Mon, 02 May 2022 14:38:19 GMT 1 < Content-Type: application/json 1 < Transfer-Encoding: chunked 1 < Connection: keep-alive { "pieces": [ ], "totalRecords": 0 } 16:38:19.479 [main] ERROR com.intuit.karate - src/main/resources/thunderjet/mod-orders/features/change-location-when-receiving-piece.feature:79 And match $.totalRecords == 1 match failed: EQUALS $ | not equal (NUMBER:NUMBER) 0 1 src/main/resources/thunderjet/mod-orders/features/change-location-when-receiving-piece.feature:79 16:38:19.479 [main] ERROR com.intuit.karate - src/main/resources/thunderjet/mod-orders/orders.feature:57 Given call read('features/change-location-when-receiving-piece.feature') status code was: 500, expected: 204, response time in milliseconds: 1228, url: https://folio-snapshot-2-okapi.dev.folio.org:443/orders/composite-orders/c94cc472-933a-4adb-8846-6e06bb6d6911, response: { "errors" : [ { "message" : "io.vertx.core.json.DecodeException: Failed to decode:Unrecognized token 'Access': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')\n at [Source: (String)\"Access for user 'test-user' (00000000-1111-5555-9999-999999999992) requires permission: inventory-storage.related-instances.collection.get\"; line: 1, column: 7]", "code" : "genericError", "parameters" : [ ] } ], "total_records" : 1 } src/main/resources/thunderjet/mod-orders/features/change-location-when-receiving-piece.feature:70 match failed: EQUALS $ | not equal (NUMBER:NUMBER) 0 1 src/main/resources/thunderjet/mod-orders/features/change-location-when-receiving-piece.feature:79 src/main/resources/thunderjet/mod-orders/orders.feature:57 status code was: 500, expected: 204, response time in milliseconds: 1228, url: https://folio-snapshot-2-okapi.dev.folio.org:443/orders/composite-orders/c94cc472-933a-4adb-8846-6e06bb6d6911, response: { "errors" : [ { "message" : "io.vertx.core.json.DecodeException: Failed to decode:Unrecognized token 'Access': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')\n at [Source: (String)\"Access for user 'test-user' (00000000-1111-5555-9999-999999999992) requires permission: inventory-storage.related-instances.collection.get\"; line: 1, column: 7]", "code" : "genericError", "parameters" : [ ] } ], "total_records" : 1

Could you please investigate?

Thanks

DamienApril 6, 2022 at 5:48 PM

  OK, thanks, I was just wondering if the whole line should be considered "resolved" if the payment or receipt was, but given your reply they should be considered independently.

Dennis BridgesApril 6, 2022 at 5:45 PM

Yes, essentially "Awaiting" is not a resolution so this would be changed to Cancelled. _____ not required and Fully ____, would already be considered "resolved" so they would not be updated to cancelled. Cancelled would also be considered a resolution status. 

Done

Details

Assignee

Reporter

Tester Assignee

Priority

Story Points

Sprint

Development Team

Thunderjet

Fix versions

Release

Morning Glory (R2 2022)

Affected Institution

MI State University/Library of Michigan

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created January 11, 2022 at 5:27 PM
Updated May 4, 2022 at 10:17 PM
Resolved May 4, 2022 at 10:17 PM
TestRail: Cases
TestRail: Runs

Flag notifications