[Koha-bugs] [Bug 35145] Add ability to order patron attributes

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Nov 29 17:00:24 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35145

Owen Leonard <oleonard at myacpl.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #159193|0                           |1
        is obsolete|                            |

--- Comment #5 from Owen Leonard <oleonard at myacpl.org> ---
Created attachment 159344
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159344&action=edit
Bug 35145: Add ability to order patron attribute types

Here is a summary of the changes:
 - Added the new column 'number' to 'borrower_attribute_types' table
     ---> Created an atomic update file
          (bug_35145_order_patron_attributes.pl)
     ---> Updated the kohastructure.sql file
 - Added the new column 'number' for
   '/cgi-bin/koha/admin/patron-attr-types.pl' table
     ---> The table now defaults to sorting based on the 'number' column
 - Added the field 'Appear in position' in the patron attribute types
   create/edit form
 - Changed the order of patron attribute types in the patron create/edit
   form (OPAC and staff interfcce) so it's now sorted by the assigned
   number

TEST PLAN
1) Go to 'Koha administration > Patron attribute types > + New patron
   attribute type'
2) Fill out the form
    ---> Code: Enter any code, for example 'WEIGHT'
    ---> Description: Enter any description
    ---> Display in OPAC: Check
    ---> Editable in OPAC: Check
    ---> Class: Keep it empty
3) Click 'Save'
4) Repeat to add a second code with a code alphabetically "before" the
   previous one, for example SURNAME
5) Optionally, add more to really view the order
6) Go to 'Koha administration > System preferences'
7) Search for 'selfreg'
8) Set 'PatronSelfRegistration' to 'Allow'
9) Set a category in 'PatronSelfRegistrationDefaultCategory'
10) Click on the 'Save all OPAC preferences' button
11) Go to the OPAC and click on the 'Create an account' button
12) Go to the bottom of the form
    ---> Note that the patron attribute fields are presented in
         alphabetical order of code
13) Apply the patch
14) Perform an atomic update (./installer/data/mysql/updatedatabase.pl)
15) Return to 'Koha administration > Patron attribute types'
    ---> Notice the new 'number' column in the tables
16) Choose one of the attribute types you created earlier and click on
    the 'edit' button
    ---> You should now see the 'Appear in position' field
17) Enter a number in the 'Appear in position' field and click on
    'Save'
18) Repeat the last two steps for each attribute type you created
    ---> Notice that the patron attribute types tables are sorted by
         number by default
19) In the staff interface, go to 'Patrons > + New patron'
    ---> In the 'Additional attributes and identifiers' section, notice
         that the fields are in the given number order
20) In the OPAC, return to the patron creation form (step 11)
    ---> At the end of the form, notice that the fields are in the
         given number order

Signed-off-by: Owen Leonard <oleonard at myacpl.org>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list