Bug 36684 - Cancelling an item with uncertain prices leaves the basket marked as a problem
Summary: Cancelling an item with uncertain prices leaves the basket marked as a problem
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Laura Escamilla
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-24 15:37 UTC by Laura Escamilla
Modified: 2024-05-01 18:27 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 36684: Prevent users from cancelling an order if it has uncertain prices (3.90 KB, patch)
2024-04-24 15:55 UTC, Laura Escamilla
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Laura Escamilla 2024-04-24 15:37:00 UTC
Issue:
When a basket contains an item with an uncertain price, it is flagged as a 'problem.' Baskets cannot be finalized if they include items with uncertain prices. However, if you cancel an order for an item with an uncertain price, the basket still remains marked as a 'problem,' but it can be closed out. This situation might confuse some users who may wonder why their basket is labeled as a problem. This confusion arises because the active items do not display uncertain prices, and there is no way to ascertain whether canceled items were initially marked as uncertain before their cancellation.

Suggested resolution:
Prevent users from cancelling items with uncertain prices until the uncertain price is cleared/resolved.
Comment 1 Laura Escamilla 2024-04-24 15:55:00 UTC
Created attachment 165481 [details] [review]
Bug 36684: Prevent users from cancelling an order if it has uncertain prices

To test:
1. Create a basket
    1. Add an item to the basket from an existing record
        1. When adding the item, under accounting details select “Uncertain price”. Save the item.
        2. Notice that under the RRP tax exc. column the price has an “Uncertain” label. Under the ‘Cancel order’ column you also have the ability to “Cancel order”
        3. Cancel the order. A new “Cancelled orders” table will appear under the “Orders” table. The item in the “Cancelled orders” table is greyed out and does not show any information regarding the “Uncertain price” label.
        4. The basket remains a “problem” basket despite it not having any active items with uncertain prices.
2. Apply the patch and restart_all
3. Create a new basket
    1. Add an item to the basket from an existing record
        1. When adding the item, under accounting details select “Uncertain price”. Save the item.
        2. Notice that under the RRP tax exc. column the price has an “Uncertain” label.
        3. Under the ‘Cancel order’ column you now see a message that says, “Can’t cancel order because it contains uncertain prices.”
        4. Click on the “Uncertain prices” tab and uncheck the ‘Uncertain’ box. Save and head back to your basket.
        5. You are now able to “Cancel order” since the item no longer has an uncertain price.
    2. Add a second item to the basket from an existing record.
        1. Do not select “Uncertain price”. Save the item.
        2. Under the ‘Cancel order’ column you have the ability to “Cancel order”
4. Sign off and have an amazing day! :D
Comment 2 Andrew Fuerste-Henry 2024-05-01 18:27:53 UTC
I don't understand your proposed solution. Is there something inherently undesirable about cancelling an order with an uncertain price? Why should we require the user to clear the uncertain price if they're just going to cancel the order?

I would suggest an alternate solution: if an order with an uncertain price is cancelled, we could automatically clear the uncertain price flag before cancelling the order. We'd prevent the unclearable "problem" on the basket without creating more work for the user.

If you prefer your current solution, you need to deal with the "Cancel order and delete catalog record" button. As your patch stands, I'm still able to click "cancel order and delete record," which still hits your described issue of leaving the basket flagged as a problem.