[Bug 30987] New: Adding relationship to PatronQuickAddFields causes it to be added 2x
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 Bug ID: 30987 Summary: Adding relationship to PatronQuickAddFields causes it to be added 2x Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com While working on Bug 29303 I noticed a small problem. If you add relationship to the PatronQuickAddFields system preference it will be added to the quick form two times. It looks like it is due to some JS that is no longer needed: if ( $("#memberentry_guarantor").length ) { $("#memberentry_guarantor").appendTo("#quick_add_form"); } -- 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=30987 --- Comment #1 from Lucas Gass <lucas@bywatersolutions.com> --- This is still a bug but I am completely wrong about the JS I mentioned. It is not the cause. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 --- Comment #2 from Lucas Gass <lucas@bywatersolutions.com> --- If you add relationship to the QuickAddFields, go to the quick add form, and press "+ Add guarantor" the relationship field will appear 3 times. -- 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=30987 --- Comment #3 from Lucas Gass <lucas@bywatersolutions.com> --- Still valid. -- 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=30987 --- Comment #4 from Lucas Gass <lucas@bywatersolutions.com> --- The problem here seems to be that we have 2 ways of adding the Relationship field. 1. If borrowerRelationship is NOT empty we assume the field should be added. 2. It can also be added via PatronQuickAddFields I think we need to remove the logic that automatically adds the field if borrowerRelationship is NOT empty: 104 my @relations = split /\|/, C4::Context->preference('borrowerRelationship'), -1; 105 @relations = ('') unless @relations; 106 my $empty_relationship_allowed = grep {$_ eq ""} @relations; 107 $template->param( empty_relationship_allowed => $empty_relationship_allowed ); We can rely on BorrowerUnwantedField, BorrowerMandatoryField, and PatronQuickAddFields to setup this field in the desired way. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 --- Comment #5 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 162461 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162461&action=edit Bug 30987: Fix relationship fields for patron full and quick add forms To test: 1. APPLY PATACH and restart services. 2. Find the borrowerRelationship system preference. The description should no longer include the words "Leave empty to deactivate." 3. Populate the system preference with at least 1 choice. 4. Find a patron category with can_be_guarantee set to 'Yes'. 5. Quick add a patron of that type, making sure the relationship field shows in the Patron guarantor section. ( You have to +Add gaurantor before this field will show ) 6. The values in the dropdown should refelct the borrowerRelationship values. 7. With BorrowerMandatoryField make relationship mandatory. 8. Try step 5 again, this time the Relationship field should be mandatory. 9. Remove the field from BorrowerMandatoryField and add it to BorrowerUnwantedField. 10. Do step 5 again, the relationship field should not show on the quick add form. -- 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=30987 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | Patch complexity|--- |Small patch -- 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=30987 Myka Kennedy Stephens <mkstephens@fosgail.org> 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=30987 Myka Kennedy Stephens <mkstephens@fosgail.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162461|0 |1 is obsolete| | --- Comment #6 from Myka Kennedy Stephens <mkstephens@fosgail.org> --- Created attachment 162860 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162860&action=edit Bug 30987: Fix relationship fields for patron full and quick add forms To test: 1. APPLY PATACH and restart services. 2. Find the borrowerRelationship system preference. The description should no longer include the words "Leave empty to deactivate." 3. Populate the system preference with at least 1 choice. 4. Find a patron category with can_be_guarantee set to 'Yes'. 5. Quick add a patron of that type, making sure the relationship field shows in the Patron guarantor section. ( You have to +Add gaurantor before this field will show ) 6. The values in the dropdown should refelct the borrowerRelationship values. 7. With BorrowerMandatoryField make relationship mandatory. 8. Try step 5 again, this time the Relationship field should be mandatory. 9. Remove the field from BorrowerMandatoryField and add it to BorrowerUnwantedField. 10. Do step 5 again, the relationship field should not show on the quick add form. Signed-off-by: Myka Kennedy Stephens <mkstephens@fosgail.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 Myka Kennedy Stephens <mkstephens@fosgail.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mkstephens@fosgail.org --- Comment #7 from Myka Kennedy Stephens <mkstephens@fosgail.org> --- Patch works as described. Great work! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm there is also an additional issue here: the one that is there first always appears as mandatory. QA please? :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #162860|0 |1 is obsolete| | --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 165005 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165005&action=edit Bug 30987: Fix relationship fields for patron full and quick add forms To test: 1. APPLY PATACH and restart services. 2. Find the borrowerRelationship system preference. The description should no longer include the words "Leave empty to deactivate." 3. Populate the system preference with at least 1 choice. 4. Find a patron category with can_be_guarantee set to 'Yes'. 5. Quick add a patron of that type, making sure the relationship field shows in the Patron guarantor section. ( You have to +Add gaurantor before this field will show ) 6. The values in the dropdown should refelct the borrowerRelationship values. 7. With BorrowerMandatoryField make relationship mandatory. 8. Try step 5 again, this time the Relationship field should be mandatory. 9. Remove the field from BorrowerMandatoryField and add it to BorrowerUnwantedField. 10. Do step 5 again, the relationship field should not show on the quick add form. Signed-off-by: Myka Kennedy Stephens <mkstephens@fosgail.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Status|Signed Off |Passed QA --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Good fix, works as described and QA scripts happy. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- How do we deactivate the feature if leaving it empty is no longer an option? --> I guess we are referring to the *Unwanted* prefs then? What happens with libraries who left it empty, do we need to handle that somehow? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- As we check the category in order to display the relationship or not, should we remove "relationship" as an option from PatronQuickAddFields? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |24.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Katrin Fischer from comment #12)
As we check the category in order to display the relationship or not, should we remove "relationship" as an option from PatronQuickAddFields?
*ping* -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 --- Comment #15 from Lucas Gass <lucas@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #12)
As we check the category in order to display the relationship or not, should we remove "relationship" as an option from PatronQuickAddFields?
In my opinion, yes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Lucas Gass from comment #15)
(In reply to Katrin Fischer from comment #12)
As we check the category in order to display the relationship or not, should we remove "relationship" as an option from PatronQuickAddFields?
In my opinion, yes.
Just running out - could you file a bug OR follow-up and remove additional_work_needed? Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |36719 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36719 [Bug 36719] Remove relationship from *borrowerunwanted sys prefs -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 --- Comment #17 from Lucas Gass <lucas@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #16)
(In reply to Lucas Gass from comment #15)
(In reply to Katrin Fischer from comment #12)
As we check the category in order to display the relationship or not, should we remove "relationship" as an option from PatronQuickAddFields?
In my opinion, yes.
Just running out - could you file a bug OR follow-up and remove additional_work_needed? Thanks!
Filed Bug 36719, add will add a patch asap. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Version(s)|24.05.00 |24.05.00,23.11.06 released in| | Status|Pushed to main |Pushed to stable --- Comment #18 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|24.05.00,23.11.06 |24.05.00,23.11.06,23.05.12 released in| | --- Comment #19 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 23.05.x for upcoming 23.05.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|martin.renvoize@ptfs-europe | |.com | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30987 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED CC| |wainuiwitikapark@catalyst.n | |et.nz Resolution|--- |FIXED --- Comment #20 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 unless requested -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org