[Koha-bugs] [Bug 31470] Incorrect selector for relationship dropdown used in members.js
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Feb 8 14:47:39 CET 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31470
Laura <Laura.escamilla at bywatersolutions.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |Laura.escamilla at bywatersolu
| |tions.com
Status|Needs Signoff |Signed Off
--- Comment #9 from Laura <Laura.escamilla at bywatersolutions.com> ---
(In reply to Emmi Takkinen from comment #7)
> Created attachment 144570 [details] [review]
> Bug 31470: Add id "relationship" to memberentrygen.tt, change id
> "relationship" in auth-finder-search.inc
>
> In members.js line 112 variable guarantor_relationship is selected
> with id "relationship". However id "relationship" is used in
> auth-finder-search.inc, not in memberentrygen.tt.
>
> One way to see what kind of effect incorrect selector has (and how I
> originally stumbled into this), is to add into "IntranetUserJS" a line
> which changes non-patron guarantors relationship default selected value as
> other than empty. Script has to change "relationship" instead of
> "new_guarantor_relationship" because selector input for patron guarantors
> relationship actually uses default selected value from non-patron guarantors
> relationship.
>
> This patch changes two things. Firstly it adds id "relationship" to
> memberentrygen.tt so that member.js can fetch correct value
> to variable guarantor_relatioship. Secondly it changes id "relationship"
> in auth-finder-search.tt as "special_relationship" to avoid confusion.
>
> To test memberentrygen.tt:
> 1. Make sure you have some value(s) in syspref "borrowerRelationship" e.g.
> "guarantor".
> 2. Add following line to "IntranetUseJS": $('.relationship
> option:eq(1)').attr('selected', 'selected');
> 3. Add guarantee patron and note that non-patron guarantors relationship is
> now "guarantor".
> 4. Add patron guarantor and note that relationship value is empty.
> 5. Apply this patch and refresh page.
> 6. Repeat step 4.
> => Note that now relationship value is "guarantor".
>
> To test auth-finder-search.inc:
> 1. Add authority e.g. Chronological Term
> 2. Modify field 551$a, click "Tag editor" icon from right
> 3. Searc pop-up is opened.
> => Make sure that field "Special relationship" is highlighted
> when you hover mouse over label.
> => Make sure that after performing a search, search value in
> "Special relationship" field persists.
>
> Sponsored-by: Koha-Suomi Oy
Signed-off-by: Laura Escamilla <laura.escamilla at bywatersolutions.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list