Bug 38183

Summary: Can't set suggestion manager when there are multiple tabs
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: AcquisitionsAssignee: Lucas Gass (lukeg) <lucas>
Status: RESOLVED FIXED QA Contact: Jonathan Druart <jonathan.druart>
Severity: major    
Priority: P5 - low CC: dcook, emily.lamancusa, felicity.brown, fridolin.somers, heather, jonathan.druart, kbecker, martin.renvoize, phil
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.05
Circulation function:
Bug Depends on: 35329    
Bug Blocks: 38192, 38659    
Attachments: Bug 38183: Get the active tab number from data-attribute
Bug 38183: Get the active tab number from data-attribute
Bug 38183: Get the active tab number from data-attribute

Description Lucas Gass (lukeg) 2024-10-15 23:11:04 UTC
To recreate:

1. Have more than 1 staff member who can manage suggestions 
2. Create some suggestions
3. Move some suggestions to different statuses (Pending/Accepted/Rejected) so you have multiple tabs on the "Suggestions management" page.
4. Go to the first tab, check some suggestions, and click "Select manager" under "Update manager".
5. Pick a new manager, notice nothing changes on that tab. 
6. Now look at the last tab in your list of tabs, see the suggestion manager has been set incorrectly to the last tab. 

You may also notice another JS error in the console. I filed Bug 38182 about that.
Comment 1 Lucas Gass (lukeg) 2024-10-15 23:51:34 UTC Comment hidden (obsolete)
Comment 2 Lucas Gass (lukeg) 2024-10-16 12:53:03 UTC
*** Bug 38111 has been marked as a duplicate of this bug. ***
Comment 3 Phil Ringnalda 2024-10-17 02:10:59 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2024-10-17 10:12:40 UTC
Created attachment 172859 [details] [review]
Bug 38183: Get the active tab number from data-attribute

To test:

1. Have more than 1 staff member who can manage suggestions
2. Create some suggestions
3. Move some suggestions to different statuses (Pending/Accepted/Rejected) so you have multiple tabs on the "Suggestions management" page.
4. Go to the first tab, check some suggestions, and click "Select manager" under "Update manager".
5. Pick a new manager, notice nothing changes on that tab.
6. Now look at the last tab in your list of tabs, see the suggestion manager has been set incorrectly to the last tab.
7. APPLY PATCH
8. Try 4-5 again. The manager should be selected correctly.
9. Try setting the manaager from every tab, making sure it works right.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Jonathan Druart 2024-10-17 10:13:30 UTC
Just got hit by that one. I had another approach but I will adjust the on top of yours.

bug 38192
Comment 6 Katrin Fischer 2024-10-18 12:27:51 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 7 Lucas Gass (lukeg) 2024-10-25 21:26:03 UTC
Backported to 24.05.x for upcoming 24.05.05
Comment 8 Fridolin Somers 2024-11-15 15:47:37 UTC
Depends on Bug 35329 not in 23.11.x
Comment 9 Lucas Gass (lukeg) 2024-12-30 21:46:55 UTC
Fixed a bug, nothing to document.