To recreate: 1 - Go to Administration -> Item types 2 - Edit a type to have a parent of another type 3 - Go to Administration -> Circulation and fines rules 4 - Add a rule for the child type 5 - Add a rule for the parent type 6 - Click edit on child type, note dropdown in editor correctly selected 7 - Click edit on parent type - note dropdown menu refers to 'All' itemtypes
Created attachment 124717 [details] [review] Bug 28986: Remove (All) notation to correctly select rule for editing This patch updates the JS comparison code to remove the '(All)' hint before comparing to the current value To test: 1 - Go to Administration -> Item types 2 - Edit a type to have a parent of another type 3 - Go to Administration -> Circulation and fines rules 4 - Add a rule for all categories for the child itemtype 5 - Add a rule for all categories for the parent itemtype 6 - Click edit on child type, note itemtype dropdown in editor correctly selected 7 - Click edit on parent type - note itemtype dropdown menu refers to 'All' itemtypes 8 - Apply patch 9 - Reload page and edit parent type rule 10 - Itemtype dropdown is correctly populated
Created attachment 124718 [details] [review] Bug 28986: Remove (All) notation to correctly select rule for editing This patch updates the JS comparison code to remove the '(All)' hint before comparing to the current value To test: 1 - Go to Administration -> Item types 2 - Edit a type to have a parent of another type 3 - Go to Administration -> Circulation and fines rules 4 - Add a rule for all categories for the child itemtype 5 - Add a rule for all categories for the parent itemtype 6 - Click edit on child type, note itemtype dropdown in editor correctly selected 7 - Click edit on parent type - note itemtype dropdown menu refers to 'All' itemtypes 8 - Apply patch 9 - Reload page and edit parent type rule 10 - Itemtype dropdown is correctly populated Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Created attachment 124796 [details] [review] Bug 28986: Remove (All) notation to correctly select rule for editing This patch updates the JS comparison code to remove the '(All)' hint before comparing to the current value To test: 1 - Go to Administration -> Item types 2 - Edit a type to have a parent of another type 3 - Go to Administration -> Circulation and fines rules 4 - Add a rule for all categories for the child itemtype 5 - Add a rule for all categories for the parent itemtype 6 - Click edit on child type, note itemtype dropdown in editor correctly selected 7 - Click edit on parent type - note itemtype dropdown menu refers to 'All' itemtypes 8 - Apply patch 9 - Reload page and edit parent type rule 10 - Itemtype dropdown is correctly populated Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Without refactoring the table logic here totally this looks like it is the best least-effort-fix we can do right now. I wonder at what state the new GUI for managing these circ rules is, the code here is very hacky and we cannot forever do this sort of one off fixes. Anyway passing QA since as I said, this is seemingly the best we can do right now without having the new editing page for circ rules or doing total refactoring.
Pushed to master for 21.11, thanks to everybody involved!
Pushed to 21.05.x for 21.05.05
Pushed to 20.11.x for 20.11.11
Missing dependencies for 20.05.x, it shouldn't be affected, no backport. Item type parent is only since 20.11.x