From c2257a3bb3c1dbe8a6c4a15e572e3616fa6394cc 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 72245c49e8..a9968b22fb 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 @@ -924,7 +924,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