From 200bb51bc73cac36b55cc84ac1bf1efd2f111316 Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Fri, 25 Jan 2019 11:55:47 +0000 Subject: [PATCH] Bug 20581: (follow-up) Fix dependency requirement Since this bug is now dependent on Bug 20600 (Provide the ability for users to filter ILL requests) we need to make the status filtering aware of the custom statuses. This patch does that. --- koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt index f96175b860..b124e8bda9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -577,9 +577,14 @@ prep: function(tableData, oData) { var uniques = {}; tableData.forEach(function(row) { - var resolvedName = getStatusName( - oData[0].capabilities[row.status].name - ); + var resolvedName; + if (row.status_alias) { + resolvedName = row.status_alias.lib; + } else { + resolvedName = getStatusName( + oData[0].capabilities[row.status].name + ); + } uniques[resolvedName] = 1 }); Object.keys(uniques).sort().forEach(function(unique) { -- 2.11.0