From 381a290cab686ba130ed47e67b1107f4c86acef7 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 f19d9d984a..261c47154f 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.11.0