[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Marcel de Rooy changed: What|Removed |Added Status|BLOCKED |Failed QA --- Comment #15 from Marcel de Rooy --- QA Comment: Thx for your patch ! Koha::Patron->validate_guarantor( \@guarantors, $newdata{'contactname'}, $category ); validate_guarantor is a CLASS method ! Should we at least reflect that in the code by renaming to $class ? Or should we default to checking guarantor_relationships when you would pass a patron in $self ? =head3 validate_guarantor Koha::Patron->validate_guarantor(\@guarantors, $contactname, $category ); Validates guarantor patron. =cut Could you elaborate "validate guarantor patron"? Singular ? Having the impression that we do two separate things here? FIrst we check ChildNeedsGuarantor, which is not really validating guarantors, right? And secondly we walk thru all guarantors (which is the name of the sub). How can this test on patron work in all cases? if ( ( $op eq 'cud-save' || $op eq 'cud-insert' ) ) { unless ( $patron && $patron->is_guarantor ) { [etc] } else { push @errors, "ERROR_guarantee_is_guarantor"; } } Test adding a regular patron: [2025/05/30 09:06:36] [WARN] L291 at /usr/share/koha/members/memberentry.pl line 291. Test modify a guarantor: The following fields are wrong. Please fix them. A guarantor cannot be a guarantee. The patron is no guarantee! The test here is WRONG. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Marcel de Rooy changed: What|Removed |Added Status|Signed Off |BLOCKED QA Contact|testo...@bugs.koha-communit |m.de.r...@rijksmuseum.nl |y.org | --- Comment #14 from Marcel de Rooy --- Looking here -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Bug 39014 depends on bug 23486, which changed state. Bug 23486 Summary: TrackLastPatronActivityTriggers should have an option for patron creation https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23486 What|Removed |Added Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 David Nind changed: What|Removed |Added CC||da...@davidnind.com --- Comment #13 from David Nind --- Added my sign-off, in case Magnus's can count as QA -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 David Nind changed: What|Removed |Added Attachment #180298|0 |1 is obsolete|| --- Comment #12 from David Nind --- Created attachment 182290 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182290&action=edit Bug 39014: Add new method validate_guarantor Adding a new guarantee and storing it fails with "Creating a patron" selected in TrackLastPatronActivityTriggers when guarantors are set to be mandatory. The problem comes from Koha::Patron->store called in update_lastseen. Since we validate guarantor in Koha::Patron->store but don't store them in there, new call to store fails because it doesn't receive guarantor info as parameter. As a solution, we should validate guarantors in separated method. Validation can't be moved e.g. to Koha::Patron::Relationship->store since this could lead to situations where guarantee is stored without guarantor. This patch adds new method validate_guarantor and adjusts old guarantor requirements tests to match this new method. To test: 1. Select option "Creating a patron" in "TrackLastPatronActivityTriggers" syspref. 2. Enable syspref "ChildNeedsGuarantor" and make sure you have options in "borrowerRelationship" syspref. 3. Create a guarantee patron, fill all required fields and add guarantor for patron (either add Patron guarantor or fill Non-patron guarantor inputs). 4. Attempt to save patron. => Error box is displayed with text "The following fields are wrong. Please fix them.". => Logs show error "Patron creation failed! - [Child patron needs a guarantor]". 5. Apply this patch. 6. Create a guarantee patron again and save. => Patron should be saved correctly. 7. Create a new guarantee patron but this time don't add patron guarantor or fill non-patron guarantor inputs. 8. Attempt to save patron. => Save should fail with error "A child patron needs a guarantor." 9. Add patron guarantor who can also be a guarantee and save. => Save should fail with error "A guarantor cannot be a guarantee." Also prove t/db_dependent/Koha/Patron.t Sponsored-by: Koha-Suomi Oy Signed-off-by: Magnus Enger Works as advertised. Signed-off-by: David Nind -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Martin Renvoize (ashimema) changed: What|Removed |Added QA Contact|martin.renvoize@openfifth.c |testo...@bugs.koha-communit |o.uk|y.org CC||n...@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Martin Renvoize (ashimema) changed: What|Removed |Added QA Contact|testo...@bugs.koha-communit |martin.renvoize@openfifth.c |y.org |o.uk -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Martin Renvoize (ashimema) changed: What|Removed |Added Depends on||23486 CC||martin.renvoize@openfifth.c ||o.uk Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23486 [Bug 23486] TrackLastPatronActivityTriggers should have an option for patron creation -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Emmi Takkinen changed: What|Removed |Added Attachment #178547|0 |1 is obsolete|| --- Comment #10 from Emmi Takkinen --- Created attachment 179572 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=179572&action=edit Bug 39014: Add new method validate_guarantor Adding a new guarantee and storing it fails with "Creating a patron" selected in TrackLastPatronActivityTriggers when guarantors are set to be mandatory. The problem comes from Koha::Patron->store called in update_lastseen. Since we validate guarantor in Koha::Patron->store but don't store them in there, new call to store fails because it doesn't receive guarantor info as parameter. As a solution, we should validate guarantors in separated method. Validation can't be moved e.g. to Koha::Patron::Relationship->store since this could lead to situations where guarantee is stored without guarantor. This patch adds new method validate_guarantor and adjusts old guarantor requirements tests to match this new method. To test: 1. Select option "Creating a patron" in "TrackLastPatronActivityTriggers" syspref. 2. Enable syspref "ChildNeedsGuarantor" and make sure you have options in "borrowerRelationship" syspref. 3. Create a guarantee patron, fill all required fields and add guarantor for patron (either add Patron guarantor or fill Non-patron guarantor inputs). 4. Attempt to save patron. => Error box is displayed with text "The following fields are wrong. Please fix them.". => Logs show error "Patron creation failed! - [Child patron needs a guarantor]". 5. Apply this patch. 6. Create a guarantee patron again and save. => Patron should be saved correctly. 7. Create a new guarantee patron but this time don't add patron guarantor or fill non-patron guarantor inputs. 8. Attempt to save patron. => Save should fail with error "A child patron needs a guarantor." 9. Add patron guarantor who can also be a guarantee and save. => Save should fail with error "A guarantor cannot be a guarantee." Also prove t/db_dependent/Koha/Patron.t Sponsored-by: Koha-Suomi Oy -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Magnus Enger changed: What|Removed |Added Attachment #179572|0 |1 is obsolete|| --- Comment #11 from Magnus Enger --- Created attachment 180298 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180298&action=edit Bug 39014: Add new method validate_guarantor Adding a new guarantee and storing it fails with "Creating a patron" selected in TrackLastPatronActivityTriggers when guarantors are set to be mandatory. The problem comes from Koha::Patron->store called in update_lastseen. Since we validate guarantor in Koha::Patron->store but don't store them in there, new call to store fails because it doesn't receive guarantor info as parameter. As a solution, we should validate guarantors in separated method. Validation can't be moved e.g. to Koha::Patron::Relationship->store since this could lead to situations where guarantee is stored without guarantor. This patch adds new method validate_guarantor and adjusts old guarantor requirements tests to match this new method. To test: 1. Select option "Creating a patron" in "TrackLastPatronActivityTriggers" syspref. 2. Enable syspref "ChildNeedsGuarantor" and make sure you have options in "borrowerRelationship" syspref. 3. Create a guarantee patron, fill all required fields and add guarantor for patron (either add Patron guarantor or fill Non-patron guarantor inputs). 4. Attempt to save patron. => Error box is displayed with text "The following fields are wrong. Please fix them.". => Logs show error "Patron creation failed! - [Child patron needs a guarantor]". 5. Apply this patch. 6. Create a guarantee patron again and save. => Patron should be saved correctly. 7. Create a new guarantee patron but this time don't add patron guarantor or fill non-patron guarantor inputs. 8. Attempt to save patron. => Save should fail with error "A child patron needs a guarantor." 9. Add patron guarantor who can also be a guarantee and save. => Save should fail with error "A guarantor cannot be a guarantee." Also prove t/db_dependent/Koha/Patron.t Sponsored-by: Koha-Suomi Oy Signed-off-by: Magnus Enger Works as advertised. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Magnus Enger changed: What|Removed |Added Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Emmi Takkinen changed: What|Removed |Added Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Baptiste Wojtkowski (bwoj) changed: What|Removed |Added Status|Needs Signoff |Patch doesn't apply CC||baptiste.wojtkowski@biblibr ||e.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Amanda Campbell changed: What|Removed |Added CC||acampb...@hmcpl.org -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Emmi Takkinen changed: What|Removed |Added Attachment #178546|0 |1 is obsolete|| --- Comment #9 from Emmi Takkinen --- Created attachment 178547 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178547&action=edit Bug 39014: Add new method validate_guarantor Adding a new guarantee and storing it fails with "Creating a patron" selected in TrackLastPatronActivityTriggers when guarantors are set to be mandatory. The problem comes from Koha::Patron->store called in update_lastseen. Since we validate guarantor in Koha::Patron->store but don't store them in there, new call to store fails because it doesn't receive guarantor info as parameter. As a solution, we should validate guarantors in separated method. Validation can't be moved e.g. to Koha::Patron::Relationship->store since this could lead to situations where guarantee is stored without guarantor. This patch adds new method validate_guarantor and adjusts old guarantor requirements tests to match this new method. To test: 1. Select option "Creating a patron" in "TrackLastPatronActivityTriggers" syspref. 2. Enable syspref "ChildNeedsGuarantor" and make sure you have options in "borrowerRelationship" syspref. 3. Create a guarantee patron, fill all required fields and add guarantor for patron (either add Patron guarantor or fill Non-patron guarantor inputs). 4. Attempt to save patron. => Error box is displayed with text "The following fields are wrong. Please fix them.". => Logs show error "Patron creation failed! - [Child patron needs a guarantor]". 5. Apply this patch. 6. Create a guarantee patron again and save. => Patron should be saved correctly. 7. Create a new guarantee patron but this time don't add patron guarantor or fill non-patron guarantor inputs. 8. Attempt to save patron. => Save should fail with error "A child patron needs a guarantor." 9. Add patron guarantor who can also be a guarantee and save. => Save should fail with error "A guarantor cannot be a guarantee." Also prove t/db_dependent/Koha/Patron.t Sponsored-by: Koha-Suomi Oy -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Emmi Takkinen changed: What|Removed |Added Status|Patch doesn't apply |Needs Signoff --- Comment #8 from Emmi Takkinen --- There were some things I forgot to handle in the original patch. Patch is now rebased against current main. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Emmi Takkinen changed: What|Removed |Added Attachment #177619|0 |1 is obsolete|| --- Comment #7 from Emmi Takkinen --- Created attachment 178546 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178546&action=edit Bug 39014: Add new method validate_guarantor Adding a new guarantee and storing it fails with "Creating a patron" selected in TrackLastPatronActivityTriggers when guarantors are set to be mandatory. The problem comes from Koha::Patron->store called in update_lastseen. Since we validate guarantor in Koha::Patron->store but don't store them in there, new call to store fails because it doesn't receive guarantor info as parameter. As a solution, we should validate guarantors in separated method. Validation can't be moved e.g. to Koha::Patron::Relationship->store since this could lead to situations where guarantee is stored without guarantor. This patch adds new method validate_guarantor and adjusts old guarantor requirements tests to match this new method. To test: 1. Select option "Creating a patron" in "TrackLastPatronActivityTriggers" syspref. 2. Enable syspref "ChildNeedsGuarantor" and make sure you have options in "borrowerRelationship" syspref. 3. Create a guarantee patron, fill all required fields and add guarantor for patron (either add Patron guarantor or fill Non-patron guarantor inputs). 4. Attempt to save patron. => Error box is displayed with text "The following fields are wrong. Please fix them.". => Logs show error "Patron creation failed! - [Child patron needs a guarantor]". 5. Apply this patch. 6. Create a guarantee patron again and save. => Patron should be saved correctly. 7. Create a new guarantee patron but this time don't add patron guarantor or fill non-patron guarantor inputs. 8. Attempt to save patron. => Save should fail with error "A child patron needs a guarantor." 9. Add patron guarantor who can also be a guarantee and save. => Save should fail with error "A guarantor cannot be a guarantee." Also prove t/db_dependent/Koha/Patron.t Sponsored-by: Koha-Suomi Oy -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Marcel de Rooy changed: What|Removed |Added Status|Signed Off |Patch doesn't apply CC||m.de.r...@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Jake Deery changed: What|Removed |Added Status|Needs Signoff |Signed Off CC||jake.de...@ptfs-europe.com --- Comment #6 from Jake Deery --- All works as intended, now! Signed off Jake. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Jake Deery changed: What|Removed |Added Attachment #177564|0 |1 is obsolete|| --- Comment #5 from Jake Deery --- Created attachment 177619 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=177619&action=edit Bug 39014: Add new method validate_guarantor Adding a new guarantee and storing it fails with "Creating a patron" selected in TrackLastPatronActivityTriggers when guarantors are set to be mandatory. The problem comes from Koha::Patron->store called in update_lastseen. Since we validate guarantor in Koha::Patron->store but don't store them in there, new call to store fails because it doesn't receive guarantor info as parameter. As a solution, we should validate guarantors in separated method. Validation can't be moved e.g. to Koha::Patron::Relationship->store since this could lead to situations where guarantee is stored without guarantor. This patch adds new method validate_guarantor and adjusts old guarantor requirements tests to match this new method. To test: 1. Select option "Creating a patron" in "TrackLastPatronActivityTriggers" syspref. 2. Enable syspref "ChildNeedsGuarantor" and make sure you have options in "borrowerRelationship" syspref. 3. Create a guarantee patron, fill all required fields and add guarantor for patron (either add Patron guarantor or fill Non-patron guarantor inputs). 4. Attempt to save patron. => Error box is displayed with text "The following fields are wrong. Please fix them.". => Logs show error "Patron creation failed! - [Child patron needs a guarantor]". 5. Apply this patch. 6. Create a guarantee patron again and save. => Patron should be saved correctly. 7. Create a new guarantee patron but this time don't add patron guarantor or fill non-patron guarantor inputs. 8. Attempt to save patron. => Save should fail with error "A child patron needs a guarantor." 9. Add patron guarantor who can also be a guarantee and save. => Save should fail with error "A guarantor cannot be a guarantee." Also prove t/db_dependent/Koha/Patron.t Sponsored-by: Koha-Suomi Oy Signed-off-by: Jake Deery -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Emmi Takkinen changed: What|Removed |Added Attachment #177563|0 |1 is obsolete|| --- Comment #4 from Emmi Takkinen --- Created attachment 177564 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=177564&action=edit Bug 39014: Add new method validate_guarantor Adding a new guarantee and storing it fails with "Creating a patron" selected in TrackLastPatronActivityTriggers when guarantors are set to be mandatory. The problem comes from Koha::Patron->store called in update_lastseen. Since we validate guarantor in Koha::Patron->store but don't store them in there, new call to store fails because it doesn't receive guarantor info as parameter. As a solution, we should validate guarantors in separated method. Validation can't be moved e.g. to Koha::Patron::Relationship->store since this could lead to situations where guarantee is stored without guarantor. This patch adds new method validate_guarantor and adjusts old guarantor requirements tests to match this new method. To test: 1. Select option "Creating a patron" in "TrackLastPatronActivityTriggers" syspref. 2. Enable syspref "ChildNeedsGuarantor" and make sure you have options in "borrowerRelationship" syspref. 3. Create a guarantee patron, fill all required fields and add guarantor for patron (either add Patron guarantor or fill Non-patron guarantor inputs). 4. Attempt to save patron. => Error box is displayed with text "The following fields are wrong. Please fix them.". => Logs show error "Patron creation failed! - [Child patron needs a guarantor]". 5. Apply this patch. 6. Create a guarantee patron again and save. => Patron should be saved correctly. 7. Create a new guarantee patron but this time don't add patron guarantor or fill non-patron guarantor inputs. 8. Attempt to save patron. => Save should fail with error "A child patron needs a guarantor." 9. Add patron guarantor who can also be a guarantee and save. => Save should fail with error "A guarantor cannot be a guarantee." Also prove t/db_dependent/Koha/Patron.t Sponsored-by: Koha-Suomi Oy -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 --- Comment #3 from Emmi Takkinen --- Created attachment 177563 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=177563&action=edit Bug 39014: Add new method validate_guarantor Adding a new guarantee and storing it fails with "Creating a patron" selected in TrackLastPatronActivityTriggers when guarantors are set to be mandatory. The problem comes from Koha::Patron->store called in update_lastseen. Since we validate guarantor in Koha::Patron->store but don't store them in there, new call to store fails because it doesn't receive guarantor info as parameter. As a solution, we should validate guarantors in separated method. Validation can't be moved e.g. to Koha::Patron::Relationship->store since this could lead to situations where guarantee is stored without guarantor. This patch adds new method validate_guarantor and adjusts old guarantor requirements tests to match this new method. To test: 1. Select option "Creating a patron" in "TrackLastPatronActivityTriggers" syspref. 2. Enable syspref "ChildNeedsGuarantor" and make sure you have options in "borrowerRelationship" syspref. 3. Create a guarantee patron, fill all required fields and add guarantor for patron (either add Patron guarantor or fill Non-patron guarantor inputs). 4. Attempt to save patron. => Error box is displayed with text "The following fields are wrong. Please fix them.". => Logs show error "Patron creation failed! - [Child patron needs a guarantor]". 5. Apply this patch. 6. Create a guarantee patron again and save. => Patron should be saved correctly. 7. Create a new guarantee patron but this time don't add patron guarantor or fill non-patron guarantor inputs. 8. Attempt to save patron. => Save should fail with error "A child patron needs a guarantor." 9. Add patron guarantor who can also be a guarantee and save. => Save should fail with error "A guarantor cannot be a guarantee." Also prove t/db_dependent/Koha/Patron.t Sponsored-by: Koha-Suomi Oy -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Emmi Takkinen changed: What|Removed |Added Status|ASSIGNED|Needs Signoff -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Emmi Takkinen changed: What|Removed |Added Status|NEW |ASSIGNED --- Comment #2 from Emmi Takkinen --- I think we need a new method validate_guarantor instead of checking guarantor validity in Koha::Patron->store. This way we can ensure that saving patron doesn't fail if store is called again in another function and we can create tests for this new method. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Emmi Takkinen changed: What|Removed |Added Assignee|koha-b...@lists.koha-commun |emmi.takki...@koha-suomi.fi |ity.org | Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 39014] Storing a guarantee fails due to TrackLastPatronActivityTriggers "creating a patron"
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39014 Emmi Takkinen changed: What|Removed |Added CC||emmi.takki...@koha-suomi.fi --- Comment #1 from Emmi Takkinen --- The problem comes from Koha::Patron->store called in update_lastseen. Since we validate guarantor in Koha::Patron->store but don't store them in there, new call to store fails because it doesn't receive guarantor info as parameter. To test: 1. Select option "Creating a patron" in "TrackLastPatronActivityTriggers" syspref. 2. Enable syspref "ChildNeedsGuarantor" and make sure you have options in "borrowerRelationship" syspref. 3. Create a guarantee patron, fill all required fields and add guarantor for patron. 4. Attempt to save patron. => Error box is displayed with text "The following fields are wrong. Please fix them.". => Logs show error "Patron creation failed! - [Child patron needs a guarantor]". -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/