From b12aeb39e7e3d103688c903dfee5ee74ee35edbe Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 22 Apr 2019 19:03:29 +0000 Subject: [PATCH] Bug 21946: (follow-up) Correct dropdown when editing rule Signed-off-by: Liz Rea --- koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 3 +++ 1 file changed, 3 insertions(+) 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 8cf98852d2..4b9743ea03 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 @@ -946,7 +946,10 @@ // select the corresponding option $(current_column).find("select option").each(function(){ opt = $(this).text().toLowerCase(); + 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,''); + console.log("opt "+opt); + console.log("itm "+itm.toLowerCase() ); if ( opt == itm.toLowerCase() ) { $(this).attr('selected', 'selected'); } -- 2.11.0