[Bug 44212] New: Link to SIP patron in SIP account
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44212 Bug ID: 44212 Summary: Link to SIP patron in SIP account Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: SIP2 Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Depends on: 43465 Target Milestone: --- The "Staff userid for SIP2 authentication" field shows the userid for the associated patron record. This should be a link to the patron account details. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43465 [Bug 43465] Patrons linked to SIP2 accounts should have a badge -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44212 hebah@bywatersolutions.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hebah@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44212 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |andrew@bywatersolutions.com |ity.org | Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44212 --- Comment #1 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- 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 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44212 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |44213 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44213 [Bug 44213] List account permissions on SIP account page -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44212 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44212 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #212231|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44212 --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 212241 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212241&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 <noreply@anthropic.com> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44212 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- I've signed off, but have a question/observation. Step 5 of the test plan says "The list and the account page now show the userid as a link". Before the patch on the list of accounts page, the userid was already linked, and linked to the SIP2 account page (in the example below, term1 linked to the SIP2 account page). After the patch there is no change to this. On the SIP2 account page after the patch, the staff userid is now linked to the patron account. Testing notes (using KTD): 1. I linked the SIP account to koha_sip (53) 2. Before the patch: - For the list of accounts: . Column: Staff userid for SIP2 authentication . Value: term1 ==> term1 is linked to the SIP2 account, not the patron account - On the SIP2 account page: term1 has no link 3. After the patch: - No change to the page listing the SIP2 accounts, still shows as term1 and is linked to the SIP2 account - On the SIP2 account page for term1, term1 is linked to the patron account (koha_sip (53)) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44212 --- Comment #4 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to David Nind from comment #3)
I've signed off, but have a question/observation.
Step 5 of the test plan says "The list and the account page now show the userid as a link".
Before the patch on the list of accounts page, the userid was already linked, and linked to the SIP2 account page (in the example below, term1 linked to the SIP2 account page). After the patch there is no change to this.
On the SIP2 account page after the patch, the staff userid is now linked to the patron account.
This was the intent. Do you feel it's confusing to have the userid be the display text for links to two different locations? In the account details page we could leave the userid as plain text and add something like "(link to patron)" after it. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org