Bug 33349 - Patron attributes don't have identifying info in the staff interface
Summary: Patron attributes don't have identifying info in the staff interface
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: paxed
QA Contact: Nick Clemens
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-28 06:32 UTC by paxed
Modified: 2023-12-28 20:43 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.05.00


Attachments
Bug 33349: Patron Attributes don't have identifying information in intranet (3.95 KB, patch)
2023-03-28 06:35 UTC, paxed
Details | Diff | Splinter Review
Bug 33349: Patron Attributes don't have identifying information in intranet (4.00 KB, patch)
2023-03-28 10:55 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 33349: Patron Attributes don't have identifying information in intranet (4.05 KB, patch)
2023-03-30 13:19 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description paxed 2023-03-28 06:32:43 UTC
Patron Attributes have no identifying info in the template page, no stable ID to style or effect with javascript, so when new patron attributes are added or removed, their order may change, requiring extra work to make sure CSS and javascript don't change the wrong patron attributes.
Comment 1 paxed 2023-03-28 06:35:13 UTC
Created attachment 148792 [details] [review]
Bug 33349: Patron Attributes don't have identifying information in intranet

    Bug 33349: Patron Attributes don't have identifying information in intranet
    
    Patron Attributes have no identifying info in the template page, no stable ID to
    style or effect with javascript, so when new patron attributes are added or
    removed, their order may change, requiring extra work to make sure CSS and
    javascript don't change the wrong patron attributes.
    
    Test plan:
    
    0) in intranet:
    1) create patron attribute types with different codes:
       "TESTPA", "test2 PA", and "At%tr:X"
    2) add those patron attributes to a patron, with some values
    3) in a browser, go to a patron information page, and inspect
       the page source where the patron attributes are
    4) note how the PA entries have no identifying information usable
       to css or javascript
    5) apply patch
    6) inspect the page source, note how the patron attributes have
       data-pa_code -value with the following values:
       "TESTPA", "test2PA", and "AttrX"
       (The attribute codes are sanitized to remove possibly problematic
       characters; those shouldn't be used in PA codes anyway)
    7) Go to the page where you edit the patron's Additional attributes
       and identifiers, and repeat 6 for that page.
Comment 2 Owen Leonard 2023-03-28 10:55:11 UTC
Created attachment 148811 [details] [review]
Bug 33349: Patron Attributes don't have identifying information in intranet

Patron Attributes have no identifying info in the template page, no stable ID to
style or effect with javascript, so when new patron attributes are added or
removed, their order may change, requiring extra work to make sure CSS and
javascript don't change the wrong patron attributes.

Test plan:

0) in intranet:
1) create patron attribute types with different codes:
   "TESTPA", "test2 PA", and "At%tr:X"
2) add those patron attributes to a patron, with some values
3) in a browser, go to a patron information page, and inspect
   the page source where the patron attributes are
4) note how the PA entries have no identifying information usable
   to css or javascript
5) apply patch
6) inspect the page source, note how the patron attributes have
   data-pa_code -value with the following values:
   "TESTPA", "test2PA", and "AttrX"
   (The attribute codes are sanitized to remove possibly problematic
   characters; those shouldn't be used in PA codes anyway)
7) Go to the page where you edit the patron's Additional attributes
   and identifiers, and repeat 6 for that page.

Signed-off-by: Pasi Kallinen <pasi.kallinen@koha-suomi.fi>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Nick Clemens 2023-03-30 13:19:30 UTC
Created attachment 148987 [details] [review]
Bug 33349: Patron Attributes don't have identifying information in intranet

Patron Attributes have no identifying info in the template page, no stable ID to
style or effect with javascript, so when new patron attributes are added or
removed, their order may change, requiring extra work to make sure CSS and
javascript don't change the wrong patron attributes.

Test plan:

0) in intranet:
1) create patron attribute types with different codes:
   "TESTPA", "test2 PA", and "At%tr:X"
2) add those patron attributes to a patron, with some values
3) in a browser, go to a patron information page, and inspect
   the page source where the patron attributes are
4) note how the PA entries have no identifying information usable
   to css or javascript
5) apply patch
6) inspect the page source, note how the patron attributes have
   data-pa_code -value with the following values:
   "TESTPA", "test2PA", and "AttrX"
   (The attribute codes are sanitized to remove possibly problematic
   characters; those shouldn't be used in PA codes anyway)
7) Go to the page where you edit the patron's Additional attributes
   and identifiers, and repeat 6 for that page.

Signed-off-by: Pasi Kallinen <pasi.kallinen@koha-suomi.fi>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Tomás Cohen Arazi 2023-03-31 10:38:33 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 5 Matt Blenkinsop 2023-04-11 11:27:30 UTC
Enhancement - not backporting to 22.11.x

Nice work everyone!