Requisition Approve does not fail if one of used adjustment reasons is removed from Stock Management after initiate

Description

Steps to reproduce

1. Initiate a requisition
2. Remove valid reason assignments for one reason using DELETE /api/validReasons/{id} , i.e. for TRANSFER IN the ids are: 8cd4d7f3-a5e1-4f12-a404-1d9a9a8d38f0, 8cf6d7f3-a5e1-4f12-a404-1d9a9a8d38f0, acaacf09-60e5-4884-a210-6bcf3c7b8cb5 and 1d0bf168-0b62-4dd1-8a6f-bfbc255718f3
3. Go back to the initiated requisition
4. To any line item add reason removed in #2 step
5. Submit and Authorize Requisition
6. Try to Approve requisition, request does not fail but it should

Environment

None

Attachments

1

QAlity Plus - Test Management

Checklists

Activity

Show:
Łukasz Lewczyński
April 10, 2018 at 6:01 AM

Recently I executed the test case and I got the expected error message:

Mateusz Kwiatkowski
March 27, 2018 at 8:53 AM

this may be a regression, I'm not sure how this should work exacly, test case that I've linked to this bug says that approve should fail after steps from description, but as wrote we have validation in Stock Management that checks some other resource...... but at the end we don't support removing reasons from the UI so I think it is a minor problem.

Sam Im
March 26, 2018 at 9:43 PM

is this a regression? Please add the expected behavior.

Mateusz Kwiatkowski
March 26, 2018 at 1:03 PM

So maybe test case was invalid......

Łukasz Lewczyński
March 26, 2018 at 12:38 PM

From what I found when event is validated by the stock management service we check if reason is in the stock_card_line_item_reasons table. We only check if there is a row in valid reasons table if event is about physical inventory.

Won't Fix
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Labels

Priority

Time Assistant

Created March 26, 2018 at 10:28 AM
Updated February 8, 2023 at 1:29 PM
Resolved April 10, 2018 at 8:32 AM