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

--- Comment #39 from David Nind <[email protected]> ---
Created attachment 203969
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203969&action=edit
Bug 41780: Show firstname and preferred_name in header; handle empty and
matching values

Test Plan

Preconditions:
- Patch applied
- Koha UI manages preferred_name automatically, so to modify it manually or set
it to empty, use SQL queries in the database

Note:
- Depending on other information entered for the patron (e.g., title, middle
name), the final header may include additional names or prefixes.
- This test plan focuses on verifying the behavior of firstname and
preferred_name in the header.

Test Steps:

1. Create a new patron (Patrons > +New patron)
    - Enter First name: Alexandra
    - Fill in all other required information (e.g., surname, card number, etc.)
    - Leave Preferred name empty
    Header expected: Alexandra (plus any other title/name that was entered)

2. Modify the preferred_name via SQL and observe the header behavior:

    a. preferred_name = NULL
        SQL: UPDATE borrowers SET preferred_name = NULL WHERE borrowernumber =
<borrowernumber>;
        Header expected: Alexandra (other title/names may appear if entered)

    b. preferred_name = '' (empty string)
        SQL: UPDATE borrowers SET preferred_name = '' WHERE borrowernumber =
<borrowernumber>;
        Header expected: Alexandra

    c. preferred_name = firstname (same as firstname)
        SQL: UPDATE borrowers SET preferred_name = firstname WHERE
borrowernumber = <borrowernumber>;
        Header expected: Alexandra

    d. preferred_name ≠ firstname (e.g., Alex)
        SQL: UPDATE borrowers SET preferred_name = 'Alex' WHERE borrowernumber
= <borrowernumber>;
        Header expected: Alex | Alexandra (plus other title/names if entered)

    e. firstname = NULL or empty, preferred_name defined
        SQL: UPDATE borrowers SET firstname = NULL, preferred_name = 'Alex'
WHERE borrowernumber = <borrowernumber>;
        OR
        SQL: UPDATE borrowers SET firstname = '', preferred_name = 'Alex' WHERE
borrowernumber = <borrowernumber>;
        Header expected: Alex

Signed-off-by: David Nind <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to