[Koha-bugs] [Bug 17307] Some edit buttons/ links for patrons do not work without a categorycode in the URL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17307 Katrin Fischer changed: What|Removed |Added Attachment #55760|0 |1 is obsolete|| --- Comment #10 from Katrin Fischer --- Created attachment 55805 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55805&action=edit [PASSED QA] Bug 17307: Smaller counter-patch Given that the issue is trying to call a method on something that isn't an object, because the category code doesn't exist, then why is it even trying to change the expiry date? A simple postfix if fixes it. Applied counter-patch by M. Tompsett. All three patron 'Edit' links mentioned in previous patch's test plan work fine. Signed-off-by: Andreas Roussos Signed-off-by: Benjamin Rokseth Signed-off-by: Katrin Fischer -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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 17307] Some edit buttons/ links for patrons do not work without a categorycode in the URL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17307 Katrin Fischer changed: What|Removed |Added Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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 17307] Some edit buttons/ links for patrons do not work without a categorycode in the URL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17307 Benjamin Rokseth changed: What|Removed |Added Attachment #55732|0 |1 is obsolete|| --- Comment #9 from Benjamin Rokseth --- Created attachment 55760 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55760&action=edit Bug 17307: Smaller counter-patch Given that the issue is trying to call a method on something that isn't an object, because the category code doesn't exist, then why is it even trying to change the expiry date? A simple postfix if fixes it. Applied counter-patch by M. Tompsett. All three patron 'Edit' links mentioned in previous patch's test plan work fine. Signed-off-by: Andreas Roussos Signed-off-by: Benjamin Rokseth -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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 17307] Some edit buttons/ links for patrons do not work without a categorycode in the URL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17307 Héctor Eduardo Castro Avalos changed: What|Removed |Added CC||hector.hecax...@gmail.com --- Comment #8 from Héctor Eduardo Castro Avalos --- Good Catch, Andreas -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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 17307] Some edit buttons/ links for patrons do not work without a categorycode in the URL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17307 Andreas Roussos changed: What|Removed |Added Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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 17307] Some edit buttons/ links for patrons do not work without a categorycode in the URL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17307 Andreas Roussos changed: What|Removed |Added Attachment #55698|0 |1 is obsolete|| --- Comment #7 from Andreas Roussos --- Created attachment 55732 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55732&action=edit Bug 17307: Smaller counter-patch Given that the issue is trying to call a method on something that isn't an object, because the category code doesn't exist, then why is it even trying to change the expiry date? A simple postfix if fixes it. Signed-off-by: Andreas Roussos Applied counter-patch by M. Tompsett. All three patron 'Edit' links mentioned in previous patch's test plan work fine. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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 17307] Some edit buttons/ links for patrons do not work without a categorycode in the URL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17307 --- Comment #6 from Andreas Roussos --- (In reply to M. Tompsett from comment #5) [snip] > While this is all true, that's not what the block of code is trying to do. > Patron's should have an expiry date for their account. The problem is not > the lack of category code, the problem is the lack of expiry date. This code > is trying to correct the expiry date based on the category code. However, > given that we don't know what the category code is, the program shouldn't > even be trying to set the dateexpiry at all. So, in the case that there is > no category found, which is also possible by passing a BAD one, we should > not set the dateexpiry. In short, set the dateexpiry to the function call > *IF* there is a patron_category. Hence, my counter patch. Feel free to sign > off on it and obsolete yours, Andreas, if you think it is better. > > I don't think fixing all the templates to pass category code is the correct > way to handle the problem. I agree with your analysis above; the code shouldn't be trying to set an expiry date if no patron_category can be found, so it makes more sense to fix this in members/memberentry.pl rather than in the templates. I've obsoleted my patch and will sign off on yours. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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 17307] Some edit buttons/ links for patrons do not work without a categorycode in the URL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17307 Andreas Roussos changed: What|Removed |Added Attachment #55623|0 |1 is obsolete|| -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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 17307] Some edit buttons/ links for patrons do not work without a categorycode in the URL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17307 M. Tompsett changed: What|Removed |Added CC||mtomp...@hotmail.com --- Comment #5 from M. Tompsett --- (In reply to Andreas Roussos from comment #1) > 373 unless ($newdata{'dateexpiry'}){ > 374 my $patron_category = Koha::Patron::Categories->find( > $newdata{categorycode} ); > 375 $newdata{'dateexpiry'} = $patron_category->get_expiry_date( > $newdata{dateenrolled} ); > 376 } Let's look at this block of code. > The problem in line 375 is that the value of the $patron_category > variable is undefined, because at line 374 $newdata{categorycode} > comes from $input->param(), as per the comment at line 168. Since > no 'categorycode' value is passed in the URL, the call to > Koha::Patron::Categories->find() fails. > > So, it seems that the easy fix is to add the categorycode in the URL. > It's trivial to fix so I'll provide a patch soon. While this is all true, that's not what the block of code is trying to do. Patron's should have an expiry date for their account. The problem is not the lack of category code, the problem is the lack of expiry date. This code is trying to correct the expiry date based on the category code. However, given that we don't know what the category code is, the program shouldn't even be trying to set the dateexpiry at all. So, in the case that there is no category found, which is also possible by passing a BAD one, we should not set the dateexpiry. In short, set the dateexpiry to the function call *IF* there is a patron_category. Hence, my counter patch. Feel free to sign off on it and obsolete yours, Andreas, if you think it is better. I don't think fixing all the templates to pass category code is the correct way to handle the problem. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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 17307] Some edit buttons/ links for patrons do not work without a categorycode in the URL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17307 --- Comment #4 from M. Tompsett --- Created attachment 55698 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55698&action=edit Bug 17307: Smaller counter-patch Given that the issue is trying to call a method on something that isn't an object, because the category code doesn't exist, then why is it even trying to change the expiry date? A simple postfix if fixes it. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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 17307] Some edit buttons/ links for patrons do not work without a categorycode in the URL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17307 Andreas Roussos changed: What|Removed |Added Patch complexity|--- |Trivial patch 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 http://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 17307] Some edit buttons/ links for patrons do not work without a categorycode in the URL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17307 --- Comment #3 from Andreas Roussos --- Created attachment 55623 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55623&action=edit Bug 17307 - Some edit buttons/links for patrons do not work without a categorycode in the URL In the Staff client, the 'Edit' button in the patron search page doesn't work. This is also true for one of the 'Edit' links in the patron Detail page, and the 'Edit' link in the Norwegian national patron database search page. This reason behind this is a missing categorycode parameter in the URL, and this patch fixes that. Test plan: 0) [PREREQUISITES FOR STEP 3] Enable the Norwegian national patron database search by setting the following sysprefs: NorwegianPatronDBEnable-> Enable NorwegianPatronDBEndpoint -> test NorwegianPatronDBSearchNLAfterLocalHit -> Don't NorwegianPatronDBUsername -> username NorwegianPatronDBPassword -> password 1) Go to Home > Patrons, search for a patron, click on the 'Edit' button (last column). You cannot edit the patron, and you get the following Software error in your browser: Can't call method "get_expiry_date" on an undefined value at [...] 2) Go to the patron's Detail page and click on the 'Edit' link under the 'Library use' heading on the right. You'll get the same error. 3) Manually navigate to /cgi-bin/koha/members/nl-search.pl, then search for the card number of one of your patrons. Click 'Edit' under the 'Existing patrons' heading. You'll get the same error. 4) Apply the patch. 5) Repeat steps 1), 2), and 3). This time the 'Edit' button/links work. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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 17307] Some edit buttons/ links for patrons do not work without a categorycode in the URL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17307 --- Comment #2 from Andreas Roussos --- Edited the bug Summary to reflect that this needs fixing in more than one place. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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 17307] Some edit buttons/ links for patrons do not work without a categorycode in the URL
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17307 Andreas Roussos changed: What|Removed |Added Summary|Edit button in patron |Some edit buttons/links for |search page doesn't work|patrons do not work without |without a category code |a categorycode in the URL -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://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/