Bug 30517: Translation breaks editing parent type circulation rule fix
authorShi Yao Wang <shi-yao.wang@inlibro.com>
Tue, 19 Apr 2022 15:52:42 +0000 (11:52 -0400)
committerWainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
Thu, 15 Dec 2022 11:45:55 +0000 (11:45 +0000)
commitff7176bbda911b5320ab35b796136606ef47f5a0
tree0576b5c831be657707d469da8b9c2bab97831927
parent9f441c39764067dd3975b6130df975d6b15be65c
Bug 30517: Translation breaks editing parent type circulation rule fix

Test plan:
1. Install another language in the staff interface
   1. in commandline: `cd misc/translator/; ./translate install xx-XX`
   2. Check the box of the language in the 'language' system preference
and save
   3. Refresh and you should be able to choose languages
2. Create an item type with a parent
   1. Go to Administration > Item types
   2. Create a new item type or modify an existing one, assigning a parent type (I created a 'Children's books' type and assigned 'Books' as its parent)
3. Create a circulation rule for the parent type (I created All/Books, with 10 checkouts allowed)
4. Create a circulation rule for All/All (I created All/All with 30 checkouts allowed)
5. In English, click on "Edit" next to the parent type rule (All/Books)
--> Note that the item type in the bottom row (the modifiable row) is changed to 'Books (All)'
6. Modify the number of checkouts allowed (e.g. 99)
--> The All/Books rule is modified
7. Switch the interface to the other language
8. Click on "Edit" next to the parent type rule (All/Books)
--> Note that the item type in the bottom row stays on 'All'
9. Modify the number of checkouts allowed (e.g. 88)
--> The All/All rule is modified
10. Apply the patch, translate again and refresh the page
11. Do step 8-9 again and notice it now behaves as it should

Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 2eccae54eee0316e6eb6f2edc54edce2cd269ebe)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 080d763c488d2d534a8784973313e9b1a972639c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz>
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt