Bugzilla – Attachment 162215 Details for
Bug 36105
Add option to filter for "No status alias"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36105: Add 'No status alias' option
Bug-36105-Add-No-status-alias-option.patch (text/plain), 3.56 KB, created by
Pedro Amorim
on 2024-02-15 15:18:43 UTC
(
hide
)
Description:
Bug 36105: Add 'No status alias' option
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-02-15 15:18:43 UTC
Size:
3.56 KB
patch
obsolete
>From 0f6bb228dbe5fddf72883e89c9506f5b0e475571 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 15 Feb 2024 15:18:38 +0000 >Subject: [PATCH] Bug 36105: Add 'No status alias' option > >1) Install FreeForm and enable ILLModule, run: >bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh) >2) Visit /cgi-bin/koha/admin/authorised_values.pl add search for 'alias', click on ILL_STATUS_ALIAS >3) Click on the 'New authorized value for ILL_STATUS_ALIAS' button and add 'alias_code' in authorized value and 'Alias Description' in Description >4) Visit /cgi-bin/koha/ill/ill-requests.pl and create a new FreeForm request >5) After created, click 'Manage request', and then click the 'Edit request' button >6) Edit the Status and select 'Alias Description', click 'Submit' >7) Create a second request but do not set a status alias this time >7) Visit /cgi-bin/koha/ill/ill-requests.pl and select 'Alias description' on the 'Status aliases:' left-side filter >8) Notice the correct record is returned. >9) Now repeat 7) and select 'No status alias'. Notice the request with an empty status_alias is returned >10) Repeat 7 but select 'All status aliases'. Notice both requests are returned >--- > .../prog/en/includes/ill-list-table-strings.inc | 1 + > koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js | 9 +++++++-- > 2 files changed, 8 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/ill-list-table-strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/ill-list-table-strings.inc >index c3cbf09df1b..f0b0d8194e1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/ill-list-table-strings.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/ill-list-table-strings.inc >@@ -5,6 +5,7 @@ > var ill_manage_select_backend_first = _("Select a backend first"); > var ill_all_statuses = _("All statuses"); > var ill_all_status_aliases = _("All status aliases"); >+ var ill_no_status_alias = _("No status alias"); > var ill_status_aliases = _("Status aliases"); > </script> > <!-- / ill-list-table-strings.inc --> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >index 456899abfbf..f63e34757f2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/ill-list-table.js >@@ -119,7 +119,11 @@ $(document).ready(function() { > subquery_and.push( {"me.status":{"=": status }}); > } > if(status_alias){ >- subquery_and.push({"me.status_alias":{"=": status_alias }}); >+ if (status_alias === 'null' ){ >+ subquery_and.push({ "me.status_alias": { "=": null } }); >+ }else{ >+ subquery_and.push({ "me.status_alias": { "=": status_alias } }); >+ } > } > > filters.push({"-and": subquery_and}); >@@ -479,7 +483,8 @@ $(document).ready(function() { > return '<li><label for="illfilter_status_alias">'+ill_status_aliases+':</label> <select name="illfilter_status_alias" id="illfilter_status_alias"></select></li>'; > }); > $('#illfilter_status_alias').append( >- '<option value="">'+ill_all_status_aliases+'</option>' >+ '<option value="">'+ill_all_status_aliases+'</option>'+ >+ '<option value="null">'+ill_no_status_alias+'</option>' > ); > status_aliases.sort((a, b) => a.str.localeCompare(b.str)).forEach(function (status_alias) { > $('#illfilter_status_alias').append( >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36105
:
162215
|
162238
|
162464
|
162588