Bugzilla – Attachment 124718 Details for
Bug 28986
Parent itemtype not selected when editing circ rules
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28986: Remove (All) notation to correctly select rule for editing
Bug-28986-Remove-All-notation-to-correctly-select-.patch (text/plain), 1.94 KB, created by
Andrew Fuerste-Henry
on 2021-09-09 16:59:58 UTC
(
hide
)
Description:
Bug 28986: Remove (All) notation to correctly select rule for editing
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2021-09-09 16:59:58 UTC
Size:
1.94 KB
patch
obsolete
>From b1159c70d3c08942a922d22e8f7880665bb0fcbd Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 9 Sep 2021 15:21:10 +0000 >Subject: [PATCH] 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> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >index 95a8e53ac1..172e546f8a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >@@ -1133,6 +1133,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() ) { >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28986
:
124717
|
124718
|
124796