[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
Mon Aug 29 10:04:32 CEST 2022


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

Emmi Takkinen <emmi.takkinen at koha-suomi.fi> changed:

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

--- Comment #3 from Emmi Takkinen <emmi.takkinen at koha-suomi.fi> ---
Created attachment 139939
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139939&action=edit
Bug 31470: Use class "relationship" instead of id "relationship" in members.js

In members.js line 112 variable guarantor_relationship is selected with
id "relationship". Correct selector should however be class
"relationship" since id "relationship" is used in auth-finder-search.inc,
not in memberentry.pl.

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. We use script 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.

To test:
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".

Sponsored-by: Koha-Suomi O

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


More information about the Koha-bugs mailing list