Bug 39514 - If one basket has uncertain prices, all baskets are displayed in red
Summary: If one basket has uncertain prices, all baskets are displayed in red
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Nick Clemens (kidclamp)
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-01 14:50 UTC by Caroline Cyr La Rose
Modified: 2026-01-05 18:26 UTC (History)
9 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the display of baskets in acquisitions so that only baskets with uncertain prices are shown in red. Previously, if one basket had an uncertain price, all the baskets in the page were shown in red, even those without uncertain prices, making it hard to know where to go to fix the price.
Version(s) released in:
26.05.00
Circulation function:


Attachments
Bug 39514: Only mark the affected rows as problematic (2.43 KB, patch)
2025-10-09 13:00 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 39514: Only mark the affected rows as problematic (2.49 KB, patch)
2025-10-09 13:30 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 39514: Only mark the affected rows as problematic (2.58 KB, patch)
2025-12-05 07:19 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2025-04-01 14:50:53 UTC
To recreate:
1. Go to Acquisitions
2. Click 'Search' in the vendor search
3. Click 'Add to basket' next to 'My basket'
4. Click 'From a new (empty) record'
5. Fill out the form
   - Title: enter a title
   - Koha item type: choose an item type
   5.1. Click 'Add item'
   - Fund: choose a fund
   - Uncertain price: check
6. Click 'Save'
7. Go back to Acquisitions
8. Click 'Search' in the vendor search
9. Click 'New' > 'Basket'
10. Enter a basket name
11. Click 'Save'
12. Go back to Acquistions
13. Click 'Search' in the vendor search
--> Notice the empty basket is also in bold red, even if it doesn't have uncertain prices
14. Click 'Add to basket'
--> Notice everything is in bold and some in red
Comment 1 holly 2025-10-06 19:09:37 UTC
Cancelled orders with uncertain prices also cause all baskets for the vendor to display in red.
See 36684
Comment 2 Nick Clemens (kidclamp) 2025-10-09 13:00:53 UTC
Created attachment 187657 [details] [review]
Bug 39514: Only mark the affected rows as problematic

Before this patch we were setting a variable and nebver unsetting it

Now we can add the conditional directly to the row, so don't need a variable

To test:
1. Go to Acquisitions
2. Click 'Search' in the vendor search
3. Click 'Add to basket' next to 'My basket'
4. Click 'From a new (empty) record'
5. Fill out the form
   - Title: enter a title
   - Koha item type: choose an item type
   5.1. Click 'Add item'
   - Fund: choose a fund
   - Uncertain price: check
6. Click 'Save'
7. Go back to Acquisitions
8. Click 'Search' in the vendor search
9. Click 'New' > 'Basket'
10. Enter a basket name
11. Click 'Save'
12. Go back to Acquistions
13. Click 'Search' in the vendor search
--> Notice the empty basket is also in bold red, even if it doesn't have uncertain prices
14. Click 'Add to basket'
--> Notice everything is in bold and some in red
15. Apply patch, reload
16. Only affected basket is in red
Comment 3 Biblibre Sandboxes 2025-10-09 13:30:28 UTC
Created attachment 187662 [details] [review]
Bug 39514: Only mark the affected rows as problematic

Before this patch we were setting a variable and nebver unsetting it

Now we can add the conditional directly to the row, so don't need a variable

To test:
1. Go to Acquisitions
2. Click 'Search' in the vendor search
3. Click 'Add to basket' next to 'My basket'
4. Click 'From a new (empty) record'
5. Fill out the form
   - Title: enter a title
   - Koha item type: choose an item type
   5.1. Click 'Add item'
   - Fund: choose a fund
   - Uncertain price: check
6. Click 'Save'
7. Go back to Acquisitions
8. Click 'Search' in the vendor search
9. Click 'New' > 'Basket'
10. Enter a basket name
11. Click 'Save'
12. Go back to Acquistions
13. Click 'Search' in the vendor search
--> Notice the empty basket is also in bold red, even if it doesn't have uncertain prices
14. Click 'Add to basket'
--> Notice everything is in bold and some in red
15. Apply patch, reload
16. Only affected basket is in red

Signed-off-by: Samuel <sam.sowanick@corvallisoregon.com>
Comment 4 Marcel de Rooy 2025-12-05 07:19:12 UTC
Created attachment 190191 [details] [review]
Bug 39514: Only mark the affected rows as problematic

Before this patch we were setting a variable and nebver unsetting it

Now we can add the conditional directly to the row, so don't need a variable

To test:
1. Go to Acquisitions
2. Click 'Search' in the vendor search
3. Click 'Add to basket' next to 'My basket'
4. Click 'From a new (empty) record'
5. Fill out the form
   - Title: enter a title
   - Koha item type: choose an item type
   5.1. Click 'Add item'
   - Fund: choose a fund
   - Uncertain price: check
6. Click 'Save'
7. Go back to Acquisitions
8. Click 'Search' in the vendor search
9. Click 'New' > 'Basket'
10. Enter a basket name
11. Click 'Save'
12. Go back to Acquistions
13. Click 'Search' in the vendor search
--> Notice the empty basket is also in bold red, even if it doesn't have uncertain prices
14. Click 'Add to basket'
--> Notice everything is in bold and some in red
15. Apply patch, reload
16. Only affected basket is in red

Signed-off-by: Samuel <sam.sowanick@corvallisoregon.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Lucas Gass (lukeg) 2025-12-17 20:26:14 UTC
Nice work everyone!

Pushed to main for 26.05
Comment 6 Kristi Krueger 2025-12-17 20:49:04 UTC
Have to ask...any chance for a backport on this one?
Comment 7 David Nind 2026-01-05 18:26:53 UTC
Thanks for the release note Caroline!