Bug 30121 - Cannot hide non-patron guarantor relationship via BorrowerUnwantedFields
Summary: Cannot hide non-patron guarantor relationship via BorrowerUnwantedFields
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Lucas Gass (lukeg)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-17 15:19 UTC by Andrew Fuerste-Henry
Modified: 2022-09-01 22:27 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 30121: Add relationship to borrwers.json (3.97 KB, patch)
2022-02-17 16:05 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 30121: Add relationship to borrwers.json (4.03 KB, patch)
2022-03-23 00:42 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 30121: Add relationship to borrowers.json (4.03 KB, patch)
2022-03-23 00:43 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 30121: (follow-up) exclude relationship from PatronQuickAddFields (1.25 KB, patch)
2022-03-29 01:45 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2022-02-17 15:19:31 UTC
The options in the BorrowerUnwantedFields syspref don't include borrowers.relationship, which contains the relationship value for a non-patron guarantor. We should be able to hide this field if desired.
Comment 1 Lucas Gass (lukeg) 2022-02-17 16:05:42 UTC Comment hidden (obsolete)
Comment 2 Fridolin Somers 2022-03-23 00:42:39 UTC Comment hidden (obsolete)
Comment 3 Fridolin Somers 2022-03-23 00:43:12 UTC
Created attachment 132042 [details] [review]
Bug 30121: Add relationship to borrowers.json

This patch addes the realtionship field to borrowers.json and therefore the various borrower related system preferences.
- BorrowerUnwantedField
- BorrowerMandatoryField
- PatronDuplicateMatchingAddFields
- PatronQuickAddFields

- PatronSelfModificationBorrowerUnwantedField
- PatronSelfModificationMandatoryField
- PatronSelfRegistrationBorrowerMandatoryField
- PatronSelfRegistrationBorrowerUnwantedField

To test:
1. Apply patch
2. Test adding and removing the relationship field from the various system preferences listed above, making sure it works correctly for each.

Note: I belive for the self registration prefs that contactname, contactfirstname, and relationship should be excluded as choices. If so, I can provide a follow-up to exclude each of them.
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 4 Anneli Österman 2022-03-24 09:38:49 UTC
Relationship option appears in PatronQuickAddFields but unchecking it doesn't work when adding kid or juvenile via Quick add new patron. The Relationship field is still mandatory (required) under the surname field.

The relationship filed disappears if I emtpy  borrowerRelationship but that is not a good option because then the relationship field disappers from the Patron guarantor also.

(Sorry, I didn't know what to choose to the Status)
Comment 5 Lucas Gass (lukeg) 2022-03-29 01:43:34 UTC
(In reply to Anneli Österman from comment #4)
> Relationship option appears in PatronQuickAddFields but unchecking it
> doesn't work when adding kid or juvenile via Quick add new patron. The
> Relationship field is still mandatory (required) under the surname field.
> 
> The relationship filed disappears if I emtpy  borrowerRelationship but that
> is not a good option because then the relationship field disappers from the
> Patron guarantor also.
> 
> (Sorry, I didn't know what to choose to the Status)

Yes, that is a good catch. The field is not called relationship in the quick add field, instead it is called new_guarantor_relationship. 

So when we check relationship we get two fields new_guarantor_relationship and relationship. 

I think in this case we want to exclude relation ship for the PatronQuickAddFields pref.
Comment 6 Lucas Gass (lukeg) 2022-03-29 01:45:41 UTC
Created attachment 132378 [details] [review]
Bug 30121: (follow-up) exclude relationship from PatronQuickAddFields
Comment 7 Andrew Fuerste-Henry 2022-08-01 18:13:05 UTC
(In reply to Lucas Gass from comment #5)
> (In reply to Anneli Österman from comment #4)
> > Relationship option appears in PatronQuickAddFields but unchecking it
> > doesn't work when adding kid or juvenile via Quick add new patron. The
> > Relationship field is still mandatory (required) under the surname field.
> > 
> > The relationship filed disappears if I emtpy  borrowerRelationship but that
> > is not a good option because then the relationship field disappers from the
> > Patron guarantor also.
> > 
> > (Sorry, I didn't know what to choose to the Status)
> 
> Yes, that is a good catch. The field is not called relationship in the quick
> add field, instead it is called new_guarantor_relationship. 
> 
> So when we check relationship we get two fields new_guarantor_relationship
> and relationship. 
> 
> I think in this case we want to exclude relation ship for the
> PatronQuickAddFields pref.

I'm still seeing this issue with the follow-up patch applied. "Relationship" shows in the Quick Add fields and is required even though it's not in BorrowerMandatory or PatronQuickAdd system preferences.
Comment 8 Lucas Gass (lukeg) 2022-09-01 22:27:31 UTC
This patch must be reworked as the borrowers.json no longer exists in master.