From 19277dda03700cfedaf3e5cd0f217f552339a6cd 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 --- 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 f19d9d9..261c471 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 @@ -923,7 +923,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.1.4