If a patron is renewed from the circulation module, the librarian should be redirected to the circulation module. This works correctly if the renew is done from the patron module (members). This is caused by a typo in the template: desintation vs destination
Created attachment 42906 [details] [review] Bug 14910: Redirect to the circulation module after a renew iIf a patron is renewed from the circulation module, the librarian should be redirected to the circulation module. This works correctly if the renew is done from the patron module (members). This is caused by a typo in the template: desintation vs destination. This patch also removes the cardnumber parameter to the setstatus.pl script, it is not needed given that borrowernumber is always passed. This has a good side-effect, it will fix bug 14691. The cardnumber does not exist anymore, so no need to escape it :) Test plan: 0/ Do not apply this patch 1/ Create a patron with a cardnumber with a quote (rm'me) and another one without a quote (rmme) 2/ Go on the checkouts page (circ/circulation.pl) 3/ Renew the 2 patrons => With rm'me you are redirected to the circ module - ok => With rmme you are redirected to the member module - nok 4/ Go on the patron detail page (members/moremember.pl) 5/ Renew the 2 patrons => you are redirected to the member module - ok 6/ Delete the patrons => Nothing happend with rm'me, there is a JS error on the page - nok => rmme is deleted - ok 7/ Apply the patch and recreate rmme 8/ Repeat 2, 3, 4, 5 => You are redirected to the correct module 9/ Delete the patrons => They are successfully deleted
Created attachment 42937 [details] [review] [Signed-off] Bug 14910: Redirect to the circulation module after a renew iIf a patron is renewed from the circulation module, the librarian should be redirected to the circulation module. This works correctly if the renew is done from the patron module (members). This is caused by a typo in the template: desintation vs destination. This patch also removes the cardnumber parameter to the setstatus.pl script, it is not needed given that borrowernumber is always passed. This has a good side-effect, it will fix bug 14691. The cardnumber does not exist anymore, so no need to escape it :) Test plan: 0/ Do not apply this patch 1/ Create a patron with a cardnumber with a quote (rm'me) and another one without a quote (rmme) 2/ Go on the checkouts page (circ/circulation.pl) 3/ Renew the 2 patrons => With rm'me you are redirected to the circ module - ok => With rmme you are redirected to the member module - nok 4/ Go on the patron detail page (members/moremember.pl) 5/ Renew the 2 patrons => you are redirected to the member module - ok 6/ Delete the patrons => Nothing happend with rm'me, there is a JS error on the page - nok => rmme is deleted - ok 7/ Apply the patch and recreate rmme 8/ Repeat 2, 3, 4, 5 => You are redirected to the correct module 9/ Delete the patrons => They are successfully deleted Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch>
*** Bug 14691 has been marked as a duplicate of this bug. ***
I think there is a bug hiding in this patch - I try renewing a patron from the sample database: localhost:8080/cgi-bin/koha/members/moremember.pl?borrowernumber=41 Gloria Odom (23529000054503) it works ok without this patch, but with the patch I get redirected to: http://localhost:8080/cgi-bin/koha/members/moremember.pl?41&was_renewed=1 With the message: This patron does not exist. Looks like we are missing the borrowernumber part in the URL?
Created attachment 42999 [details] [review] Bug 14910: Redirect to the circulation module after a renew iIf a patron is renewed from the circulation module, the librarian should be redirected to the circulation module. This works correctly if the renew is done from the patron module (members). This is caused by a typo in the template: desintation vs destination. This patch also removes the cardnumber parameter to the setstatus.pl script, it is not needed given that borrowernumber is always passed. This has a good side-effect, it will fix bug 14691. The cardnumber does not exist anymore, so no need to escape it :) Test plan: 0/ Do not apply this patch 1/ Create a patron with a cardnumber with a quote (rm'me) and another one without a quote (rmme) 2/ Go on the checkouts page (circ/circulation.pl) 3/ Renew the 2 patrons => With rm'me you are redirected to the circ module - ok => With rmme you are redirected to the member module - nok 4/ Go on the patron detail page (members/moremember.pl) 5/ Renew the 2 patrons => you are redirected to the member module - ok 6/ Delete the patrons => Nothing happend with rm'me, there is a JS error on the page - nok => rmme is deleted - ok 7/ Apply the patch and recreate rmme 8/ Repeat 2, 3, 4, 5 => You are redirected to the correct module 9/ Delete the patrons => They are successfully deleted
(In reply to Katrin Fischer from comment #4) > I think there is a bug hiding in this patch - I try renewing a patron from > the sample database: > > localhost:8080/cgi-bin/koha/members/moremember.pl?borrowernumber=41 > Gloria Odom (23529000054503) > > it works ok without this patch, but with the patch I get redirected to: > http://localhost:8080/cgi-bin/koha/members/moremember.pl?41&was_renewed=1 > With the message: This patron does not exist. > Looks like we are missing the borrowernumber part in the URL? Erk, last minute change! Thanks for catching that!
(In reply to Jonathan Druart from comment #5) > Test plan: > 0/ Do not apply this patch > 1/ Create a patron with a cardnumber with a quote (rm'me) and another > one without a quote (rmme) > 2/ Go on the checkouts page (circ/circulation.pl) > 3/ Renew the 2 patrons > => With rm'me you are redirected to the circ module - ok > => With rmme you are redirected to the member module - nok I can reproduce this without the patch. But after I apply the patch, I get this: rm'me: No JS popup confirmation, but redirected to the circ module rmme: JS popup confirmation, but redirected to the member module For rmme I get this error in the Firebug Console: SyntaxError: expected expression, got ',' firstDay: , For rm'me I get two errors: SyntaxError: expected expression, got ',' firstDay: , SyntaxError: missing ; before statement ...owernumber=6450&cardnumber=rm'me&desintation=circ&reregistration=y'
Magnus, could you confirm you have correctly cleared your browser cache?
(In reply to Jonathan Druart from comment #8) > Magnus, could you confirm you have correctly cleared your browser cache? Ah, not necessarily. I'll have another go.
Created attachment 43006 [details] [review] Bug 14910: Redirect to the circulation module after a renew iIf a patron is renewed from the circulation module, the librarian should be redirected to the circulation module. This works correctly if the renew is done from the patron module (members). This is caused by a typo in the template: desintation vs destination. This patch also removes the cardnumber parameter to the setstatus.pl script, it is not needed given that borrowernumber is always passed. This has a good side-effect, it will fix bug 14691. The cardnumber does not exist anymore, so no need to escape it :) Test plan: 0/ Do not apply this patch 1/ Create a patron with a cardnumber with a quote (rm'me) and another one without a quote (rmme) 2/ Go on the checkouts page (circ/circulation.pl) 3/ Renew the 2 patrons => With rm'me you are redirected to the circ module - ok => With rmme you are redirected to the member module - nok 4/ Go on the patron detail page (members/moremember.pl) 5/ Renew the 2 patrons => you are redirected to the member module - ok 6/ Delete the patrons => Nothing happend with rm'me, there is a JS error on the page - nok => rmme is deleted - ok 7/ Apply the patch and recreate rmme 8/ Repeat 2, 3, 4, 5 => You are redirected to the correct module 9/ Delete the patrons => They are successfully deleted Signed-off-by: Magnus Enger <magnus@libriotech.no> Followed the test plan, works as advertised. (I did have some problems initially, but that was caused by me not using the interface in English...)
Created attachment 43032 [details] [review] [PASSED QA] Bug 14910: Redirect to the circulation module after a renew iIf a patron is renewed from the circulation module, the librarian should be redirected to the circulation module. This works correctly if the renew is done from the patron module (members). This is caused by a typo in the template: desintation vs destination. This patch also removes the cardnumber parameter to the setstatus.pl script, it is not needed given that borrowernumber is always passed. This has a good side-effect, it will fix bug 14691. The cardnumber does not exist anymore, so no need to escape it :) Test plan: 0/ Do not apply this patch 1/ Create a patron with a cardnumber with a quote (rm'me) and another one without a quote (rmme) 2/ Go on the checkouts page (circ/circulation.pl) 3/ Renew the 2 patrons => With rm'me you are redirected to the circ module - ok => With rmme you are redirected to the member module - nok 4/ Go on the patron detail page (members/moremember.pl) 5/ Renew the 2 patrons => you are redirected to the member module - ok 6/ Delete the patrons => Nothing happend with rm'me, there is a JS error on the page - nok => rmme is deleted - ok 7/ Apply the patch and recreate rmme 8/ Repeat 2, 3, 4, 5 => You are redirected to the correct module 9/ Delete the patrons => They are successfully deleted Signed-off-by: Magnus Enger <magnus@libriotech.no> Followed the test plan, works as advertised. (I did have some problems initially, but that was caused by me not using the interface in English...) Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Patch pushed to master. Thanks Jonathan!
Pushed to 3.20.x will be in 3.20.5
Pushed to 3.18.x, is in 3.18.12.