Bug 34519 - Add a template plugin for ExtendedAttributeTypes to fetch searchable patron attributes
Summary: Add a template plugin for ExtendedAttributeTypes to fetch searchable patron a...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Nick Clemens
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 33428
Blocks: 26916
  Show dependency treegraph
 
Reported: 2023-08-11 14:15 UTC by Nick Clemens
Modified: 2024-02-08 01:39 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00


Attachments
Bug 34519: Add a template plugin for fetch searchable patron attributes (11.89 KB, patch)
2023-08-11 14:37 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 34519: Unit tests (3.00 KB, patch)
2023-08-11 14:37 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 34519: Ensure we always have an array (1.05 KB, patch)
2023-08-11 16:43 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 34519: Ensure we always have an array (1.10 KB, patch)
2023-08-18 11:30 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Bug 34519: Add a template plugin for fetch searchable patron attributes (11.94 KB, patch)
2023-08-18 12:13 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Bug 34519: Unit tests (3.05 KB, patch)
2023-08-18 12:13 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Bug 34519: Ensure we always have an array (1.10 KB, patch)
2023-08-18 12:13 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Bug 34519: (follow-up) fix QA tool complaints (3.64 KB, patch)
2023-08-18 12:17 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 34519: Add a template plugin for fetch searchable patron attributes (11.97 KB, patch)
2023-10-23 13:22 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 34519: Unit tests (3.05 KB, patch)
2023-10-23 13:22 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 34519: Ensure we always have an array (1.10 KB, patch)
2023-10-23 13:22 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 34519: (follow-up) fix QA tool complaints (3.63 KB, patch)
2023-10-23 13:22 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 34519: Add a template plugin for fetch searchable patron attributes (12.03 KB, patch)
2023-11-05 00:58 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 34519: Unit tests (3.11 KB, patch)
2023-11-05 00:58 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 34519: Ensure we always have an array (1.16 KB, patch)
2023-11-05 00:58 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 34519: (follow-up) fix QA tool complaints (3.69 KB, patch)
2023-11-05 00:58 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2023-08-11 14:15:43 UTC
Currently we fetch the searchable attributes in several scripts

Moving to a plugin allows us to make a single call from the patron search template
Comment 1 Nick Clemens 2023-08-11 14:37:50 UTC
Created attachment 154375 [details] [review]
Bug 34519: Add a template plugin for fetch searchable patron attributes

This patch moves code form scripts to a template plguin and unifies the calls

To test:
1 - Add a searchable patron attribute type
2 - Add values to several patrons and test patron searching from
    Patrons home
    Patrons search results
    Holds request screen
    Article request screen
    Patron search sidebar
3 - Apply patch
4 - Confirm results are the same
Comment 2 Nick Clemens 2023-08-11 14:37:52 UTC
Created attachment 154376 [details] [review]
Bug 34519: Unit tests
Comment 3 Nick Clemens 2023-08-11 16:43:32 UTC
Created attachment 154384 [details] [review]
Bug 34519: Ensure we always have an array
Comment 4 Janusz Kaczmarek 2023-08-18 11:04:24 UTC
There are no results when searching with patron extended attribute from:
- Holds request screen, and 
- Article request screen.
Comment 5 Nick Clemens 2023-08-18 11:20:07 UTC
Follow-up added to 33428 which should restore the attribute searching on the other screens
Comment 6 Janusz Kaczmarek 2023-08-18 11:30:23 UTC
Created attachment 154641 [details] [review]
Bug 34519: Ensure we always have an array

Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Comment 7 Janusz Kaczmarek 2023-08-18 12:13:34 UTC
Created attachment 154646 [details] [review]
Bug 34519: Add a template plugin for fetch searchable patron attributes

This patch moves code form scripts to a template plguin and unifies the calls

To test:
1 - Add a searchable patron attribute type
2 - Add values to several patrons and test patron searching from
    Patrons home
    Patrons search results
    Holds request screen
    Article request screen
    Patron search sidebar
3 - Apply patch
4 - Confirm results are the same

Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Comment 8 Janusz Kaczmarek 2023-08-18 12:13:37 UTC
Created attachment 154647 [details] [review]
Bug 34519: Unit tests

Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Comment 9 Janusz Kaczmarek 2023-08-18 12:13:39 UTC
Created attachment 154648 [details] [review]
Bug 34519: Ensure we always have an array

Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Comment 10 Nick Clemens 2023-08-18 12:17:22 UTC
Created attachment 154649 [details] [review]
Bug 34519: (follow-up) fix QA tool complaints
Comment 11 Katrin Fischer 2023-10-21 08:46:43 UTC
Hi Nick, can you please rebase?

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 34519: Add a template plugin for fetch searchable patron attributes
error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc).
error: could not build fake ancestor
Patch failed at 0001 Bug 34519: Add a template plugin for fetch searchable patron attributes
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-34519-Add-a-template-plugin-for-fetch-searchab-vtceflb2.patch
Comment 12 Nick Clemens 2023-10-23 13:22:21 UTC
Created attachment 157649 [details] [review]
Bug 34519: Add a template plugin for fetch searchable patron attributes

This patch moves code form scripts to a template plguin and unifies the calls

To test:
1 - Add a searchable patron attribute type
2 - Add values to several patrons and test patron searching from
    Patrons home
    Patrons search results
    Holds request screen
    Article request screen
    Patron search sidebar
3 - Apply patch
4 - Confirm results are the same

Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Comment 13 Nick Clemens 2023-10-23 13:22:23 UTC
Created attachment 157650 [details] [review]
Bug 34519: Unit tests

Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Comment 14 Nick Clemens 2023-10-23 13:22:25 UTC
Created attachment 157651 [details] [review]
Bug 34519: Ensure we always have an array

Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Comment 15 Nick Clemens 2023-10-23 13:22:27 UTC
Created attachment 157652 [details] [review]
Bug 34519: (follow-up) fix QA tool complaints
Comment 16 Katrin Fischer 2023-11-05 00:58:37 UTC
Created attachment 158423 [details] [review]
Bug 34519: Add a template plugin for fetch searchable patron attributes

This patch moves code form scripts to a template plguin and unifies the calls

To test:
1 - Add a searchable patron attribute type
2 - Add values to several patrons and test patron searching from
    Patrons home
    Patrons search results
    Holds request screen
    Article request screen
    Patron search sidebar
3 - Apply patch
4 - Confirm results are the same

Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Katrin Fischer 2023-11-05 00:58:40 UTC
Created attachment 158424 [details] [review]
Bug 34519: Unit tests

Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 18 Katrin Fischer 2023-11-05 00:58:43 UTC
Created attachment 158425 [details] [review]
Bug 34519: Ensure we always have an array

Signed-off-by: Janusz Kaczmarek <januszop@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 19 Katrin Fischer 2023-11-05 00:58:45 UTC
Created attachment 158426 [details] [review]
Bug 34519: (follow-up) fix QA tool complaints

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 20 Tomás Cohen Arazi 2023-11-08 20:55:27 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 21 Fridolin Somers 2023-11-11 01:30:53 UTC
Depends on Bug 33428 not in 23.05.x