Bug 20581: (follow-up) Fix dependency requirement
authorAndrew Isherwood <andrew.isherwood@ptfs-europe.com>
Fri, 25 Jan 2019 11:55:47 +0000 (11:55 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 22 Feb 2019 14:31:31 +0000 (14:31 +0000)
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.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt

index ca96ad9..730e4c0 100644 (file)
                     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) {