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)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 1 Oct 2021 17:32:46 +0000 (13:32 -0400)
commit5abd74c805cecb13c740cbcdf7764bfd1eb4cda8
tree5fc1b10ddab5ad0a4eac9f41ea092de409cdfab3
parentc09ac22e4e28874991b8337516ddaefd72e6fbfb
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>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt