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

--- Comment #1 from Andrew Fuerste-Henry <[email protected]> ---
Created attachment 212231
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212231&action=edit
Bug 44212: Link SIP2 account login to the patron record

The "Staff userid for SIP2 authentication" field on SIP2 accounts shows
the userid of the associated patron as plain text. This patch makes it a
link to the patron's details page.

It adds:
- Koha::SIP2::Account->patron, returning the patron whose userid matches
  the account's login_id
- a 'patron' embed on GET /sip2/accounts and /sip2/accounts/{id}
- patronEmbedName on the login_id attribute so the accounts list and
  account details link the login to moremember.pl
- a patronLinkShowsValue option for patronAutoComplete attributes, used
  here so the link text stays the userid rather than the patron name

The generic patronAutoComplete display in ShowElement.vue and
ResourceList.vue now falls back to the raw value when the embedded patron
is missing or redacted (no patron_id), so an account whose login_id
matches no visible patron still shows its userid instead of a blank.

Test plan:
1. Go to Administration > SIP2 > Accounts
2. Create or edit an account whose login is an existing patron's userid
3. Note the login shows as plain text in the list and on the account page
4. Apply the patch, run yarn build and restart_all
5. The list and the account page now show the userid as a link
6. Click it: you land on the patron's details page
7. Edit the account and save: confirm it still saves correctly
8. prove t/db_dependent/Koha/SIP2/Accounts.t
   prove t/db_dependent/api/v1/sip2_accounts.t

Co-Authored-By: Claude Opus 5.5 <[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