Bug 39543 - Error modal when trying to add two controlling licences to an agreement duplicates error message
Summary: Error modal when trying to add two controlling licences to an agreement dupli...
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: ERM (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial
Assignee: Andrew Auld
QA Contact: Lisette Scheer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-03 10:28 UTC by Andrew Auld
Modified: 2025-04-03 13:31 UTC (History)
6 users (show)

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


Attachments
Screenshot of error modal (47.65 KB, image/png)
2025-04-03 10:28 UTC, Andrew Auld
Details
Bug 39543: Remove duplicated code in agreements controlling licence error message Test plan 1) Enable ERMModule sys pref 2) Add an agreement record 3) Add two licence records 4) Edit the agreement record and associate both license records to the agreement (1.66 KB, patch)
2025-04-03 10:45 UTC, Andrew Auld
Details | Diff | Splinter Review
Bug 39543: Error modal when trying to add two controlling licences to an agreement duplicates error message (1.96 KB, patch)
2025-04-03 11:48 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 39543: Error modal when trying to add two controlling licences to an agreement duplicates error message (2.02 KB, patch)
2025-04-03 13:31 UTC, Lisette Scheer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Auld 2025-04-03 10:28:36 UTC
Created attachment 180488 [details]
Screenshot of error modal

If you try to add two licences with the status 'controlling' to an agreement record, the error modal duplicates the error message 'Only one controlling license is allowed'.
Comment 1 Andrew Auld 2025-04-03 10:45:24 UTC Comment hidden (obsolete)
Comment 2 Andrew Auld 2025-04-03 10:47:21 UTC
Sorry for the duff formatting on the test plan:

Test Plan:
1) Enable ERMModule sys pref
2) Add an agreement record
3) Add two licence records
4) Edit the agreement record and associate both license records to the agreement
5) Try to set both licenses to status 'controlling'
6) Note error modal duplicates the error message 'Only one controlling license is allowed'
7) Apply the patch, run yarn js:build and then hard refresh the browser
8) Repeat steps 1 to 5 and enjoy the single error message!
Comment 3 Magnus Enger 2025-04-03 11:48:14 UTC
Created attachment 180491 [details] [review]
Bug 39543: Error modal when trying to add two controlling licences to an agreement duplicates error message

If you try to add two licences with the status 'controlling' to an
agreement record, the error modal duplicates the error message
'Only one controlling license is allowed'.

Test Plan:
1) Enable ERMModule sys pref
2) Add an agreement record
3) Add two licence records
4) Edit the agreement record and associate both license records to the agreement
5) Try to set both licenses to status 'controlling'
6) Note error modal duplicates the error message 'Only one controlling license is allowed'
7) Apply the patch, run yarn js:build and then hard refresh the browser
8) Repeat steps 1 to 5 and enjoy the single error message!

Signed-off-by: Magnus Enger <magnus@libriotech.no>
I took the liberty of fixing up the commit message a bit.
Comment 4 Lisette Scheer 2025-04-03 13:31:07 UTC
Created attachment 180526 [details] [review]
Bug 39543: Error modal when trying to add two controlling licences to an agreement duplicates error message

If you try to add two licences with the status 'controlling' to an
agreement record, the error modal duplicates the error message
'Only one controlling license is allowed'.

Test Plan:
1) Enable ERMModule sys pref
2) Add an agreement record
3) Add two licence records
4) Edit the agreement record and associate both license records to the agreement
5) Try to set both licenses to status 'controlling'
6) Note error modal duplicates the error message 'Only one controlling license is allowed'
7) Apply the patch, run yarn js:build and then hard refresh the browser
8) Repeat steps 1 to 5 and enjoy the single error message!

Signed-off-by: Magnus Enger <magnus@libriotech.no>
I took the liberty of fixing up the commit message a bit.
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>