Bug 28986: Remove (All) notation to correctly select rule for editing
authorNick Clemens <nick@bywatersolutions.com>
Thu, 9 Sep 2021 15:21:10 +0000 (15:21 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 20 Sep 2021 10:06:59 +0000 (12:06 +0200)
commitbb6f2c2ed082ba26db19cd8ac5c8aaeec7a3b8e3
tree0884a198e1a38e70ef39a3cb11e324358977fb02
parent95dc733f6fc283d710edb17049942cd2de0de109
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>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt