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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 5abd74c805)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
parent
2d08f38a00
commit
68b32ac3bd
|
|
@ -1108,6 +1108,7 @@
|
|||
// select the corresponding option
|
||||
$(current_column).find("select option").each(function(){
|
||||
opt = $(this).text().toLowerCase();
|
||||
opt = opt.replace(/ \(all\)$/,""); //If option is a parent, compare without (All)
|
||||
itm = itm.replace(/.*->(.*)/,"$1"); //If item type is part of a group we need to clear the parent description
|
||||
opt = opt.replace(/^\s*|\s*$/g,'');
|
||||
if ( opt == itm.toLowerCase() ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue