[Bug 20953] New: Discharge can be requested several times on OPAC
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 Bug ID: 20953 Summary: Discharge can be requested several times on OPAC Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: fridolin.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org On OPAC, a user can requested a discharge even if one is already pending. This generates several pending discharges in staff interface that can not be deleted. This is because request operation leads to page 'opac-discharge.pl?op=request' and user can refresh this page performing a new request. Perl code must check that operation is allowed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|oleonard@myacpl.org |fridolin.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |20951 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20951 [Bug 20951] Koha::Patron::Discharge is missing use Koha::Patron::Debarments -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 --- Comment #1 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Can not be tested without Bug 20951 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=19990 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 --- Comment #2 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Created attachment 76117 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76117&action=edit Bug 20953: Prevent several discharge requests on OPAC On OPAC, a user can requested a discharge even if one is already pending. This generates several pending discharges in staff interface that can not be deleted. This is because request operation leads to page 'opac-discharge.pl?op=request' and user can refresh this page performing a new request. Perl code must check that operation is allowed. Patch reoganised the code so that the following FIXME is obsolete : 'FIXME looks like $available is not needed' Patch also replaces 'op' arg test to also check undef : input->param("op") // '' Test plan : 1) Set system preference 'useDischarge' to 'Allow' 2) Choose a patron without checkouts nor fines nor restrictions 3) Log at OPAC and go to patron page /cgi-bin/koha/opac-user.pl 4) Click on 'ask for a discharge' tab => You see /cgi-bin/koha/opac-discharge.pl with text 'What is a discharge? ...' 5) Click on 'Ask for a discharge' link => You see /cgi-bin/koha/opac-discharge.pl?op=request with text 'Your discharge request has been sent ...' 6) In a new browser tab/page, go to intranet on /cgi-bin/koha/members/discharges.pl => You see one discharge requets for the patron 7) Come back to OPAC and refresh page => You see /cgi-bin/koha/opac-discharge.pl with text 'Your discharge will be available on this page within a few days.' 8) Come back to intranet and refresh /cgi-bin/koha/opac-discharge.pl => There is still one requets for the patron 9) Come back to OPAC and enter URL /cgi-bin/koha/opac-discharge.pl?op=get => You see /cgi-bin/koha/opac-discharge.pl with text 'Your discharge will be available on this page within a few days.' 10) Come back to intranet and refresh /cgi-bin/koha/opac-discharge.pl => There is still one requets for the patron 11) Click on 'allow' on patron discharge request 12) Come back to OPAC and refresh /cgi-bin/koha/opac-discharge.pl => You see link 'Get your discharge' 13) enter URL /cgi-bin/koha/opac-discharge.pl?op=request => You see same page and no new discharge requets is created 14) Come back to intranet on patron details page 15) Remove the discharge restriction 16) Come back to OPAC and refresh /cgi-bin/koha/opac-discharge.pl => You see text 'What is a discharge?...' 17) enter URL /cgi-bin/koha/opac-discharge.pl?op=get => You see same page and no new discharge requets is created -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 Koha Team Lyon 3 <koha@univ-lyon3.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |koha@univ-lyon3.fr Status|Needs Signoff |Failed QA --- Comment #3 from Koha Team Lyon 3 <koha@univ-lyon3.fr> --- Hello, Tested on a sandbobx (biblibre sandbox n°1) At step n°11, there's an error when clicking on "allow" : Software error: Undefined subroutine &Koha::Patron::Debarments::AddDebarment called at /home/koha/src/Koha/Patron/Discharge.pm line 85. For help, please send mail to the webmaster ([no address given]), giving this error message and the time and date of the error. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #4 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Koha Team Lyon 3 from comment #3)
Hello, Tested on a sandbobx (biblibre sandbox n°1) At step n°11, there's an error when clicking on "allow" :
Software error: Undefined subroutine &Koha::Patron::Debarments::AddDebarment called at /home/koha/src/Koha/Patron/Discharge.pm line 85. For help, please send mail to the webmaster ([no address given]), giving this error message and the time and date of the error.
You need to apply also Bug 20951 to be able to run test plan -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |charles.farmer@inlibro.com --- Comment #5 from Charles Farmer <charles.farmer@inlibro.com> --- Two things: * This bug's dependency is now 'pushed to stable'. The patch in this bug can now be applied alone. * Oddly, there seems to be an issue with generate_as_pdf at the end of the test plan. This is what I get on my system: Undefined subroutine &C4::Letters::GetPreparedLetter called at /.../Koha/Patron/Discharge.pm line 113 Since the issue I mentionned is unrelated to the problem you're trying to solve, I'll open another bug for it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 Charles Farmer <charles.farmer@inlibro.com> 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=20953 Charles Farmer <charles.farmer@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76117|0 |1 is obsolete| | --- Comment #6 from Charles Farmer <charles.farmer@inlibro.com> --- Created attachment 76586 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76586&action=edit Bug 20953: Prevent several discharge requests on OPAC On OPAC, a user can requested a discharge even if one is already pending. This generates several pending discharges in staff interface that can not be deleted. This is because request operation leads to page 'opac-discharge.pl?op=request' and user can refresh this page performing a new request. Perl code must check that operation is allowed. Patch reoganised the code so that the following FIXME is obsolete : 'FIXME looks like $available is not needed' Patch also replaces 'op' arg test to also check undef : input->param("op") // '' Test plan : 1) Set system preference 'useDischarge' to 'Allow' 2) Choose a patron without checkouts nor fines nor restrictions 3) Log at OPAC and go to patron page /cgi-bin/koha/opac-user.pl 4) Click on 'ask for a discharge' tab => You see /cgi-bin/koha/opac-discharge.pl with text 'What is a discharge? ...' 5) Click on 'Ask for a discharge' link => You see /cgi-bin/koha/opac-discharge.pl?op=request with text 'Your discharge request has been sent ...' 6) In a new browser tab/page, go to intranet on /cgi-bin/koha/members/discharges.pl => You see one discharge requets for the patron 7) Come back to OPAC and refresh page => You see /cgi-bin/koha/opac-discharge.pl with text 'Your discharge will be available on this page within a few days.' 8) Come back to intranet and refresh /cgi-bin/koha/opac-discharge.pl => There is still one requets for the patron 9) Come back to OPAC and enter URL /cgi-bin/koha/opac-discharge.pl?op=get => You see /cgi-bin/koha/opac-discharge.pl with text 'Your discharge will be available on this page within a few days.' 10) Come back to intranet and refresh /cgi-bin/koha/opac-discharge.pl => There is still one requets for the patron 11) Click on 'allow' on patron discharge request 12) Come back to OPAC and refresh /cgi-bin/koha/opac-discharge.pl => You see link 'Get your discharge' 13) enter URL /cgi-bin/koha/opac-discharge.pl?op=request => You see same page and no new discharge requets is created 14) Come back to intranet on patron details page 15) Remove the discharge restriction 16) Come back to OPAC and refresh /cgi-bin/koha/opac-discharge.pl => You see text 'What is a discharge?...' 17) enter URL /cgi-bin/koha/opac-discharge.pl?op=get => You see same page and no new discharge requets is created Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76586|0 |1 is obsolete| | --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 76699 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76699&action=edit Bug 20953: Prevent several discharge requests on OPAC On OPAC, a user can requested a discharge even if one is already pending. This generates several pending discharges in staff interface that can not be deleted. This is because request operation leads to page 'opac-discharge.pl?op=request' and user can refresh this page performing a new request. Perl code must check that operation is allowed. Patch reoganised the code so that the following FIXME is obsolete : 'FIXME looks like $available is not needed' Patch also replaces 'op' arg test to also check undef : input->param("op") // '' Test plan : 1) Set system preference 'useDischarge' to 'Allow' 2) Choose a patron without checkouts nor fines nor restrictions 3) Log at OPAC and go to patron page /cgi-bin/koha/opac-user.pl 4) Click on 'ask for a discharge' tab => You see /cgi-bin/koha/opac-discharge.pl with text 'What is a discharge? ...' 5) Click on 'Ask for a discharge' link => You see /cgi-bin/koha/opac-discharge.pl?op=request with text 'Your discharge request has been sent ...' 6) In a new browser tab/page, go to intranet on /cgi-bin/koha/members/discharges.pl => You see one discharge requets for the patron 7) Come back to OPAC and refresh page => You see /cgi-bin/koha/opac-discharge.pl with text 'Your discharge will be available on this page within a few days.' 8) Come back to intranet and refresh /cgi-bin/koha/opac-discharge.pl => There is still one requets for the patron 9) Come back to OPAC and enter URL /cgi-bin/koha/opac-discharge.pl?op=get => You see /cgi-bin/koha/opac-discharge.pl with text 'Your discharge will be available on this page within a few days.' 10) Come back to intranet and refresh /cgi-bin/koha/opac-discharge.pl => There is still one requets for the patron 11) Click on 'allow' on patron discharge request 12) Come back to OPAC and refresh /cgi-bin/koha/opac-discharge.pl => You see link 'Get your discharge' 13) enter URL /cgi-bin/koha/opac-discharge.pl?op=request => You see same page and no new discharge requets is created 14) Come back to intranet on patron details page 15) Remove the discharge restriction 16) Come back to OPAC and refresh /cgi-bin/koha/opac-discharge.pl => You see text 'What is a discharge?...' 17) enter URL /cgi-bin/koha/opac-discharge.pl?op=get => You see same page and no new discharge requets is created Signed-off-by: Charles Farmer <charles.farmer@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Can we attempt to deal with the discharges that may have been created and cannot be removed by staff? Can you provide an update statement Frido? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 --- Comment #9 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Nick Clemens from comment #8)
Can we attempt to deal with the discharges that may have been created and cannot be removed by staff? Can you provide an update statement Frido?
Seems hard, I'd say just add a warning text. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 19990 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |martin.renvoize@ptfs-europe | |.com --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.05.x for 18.05.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 --- Comment #13 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.11.x for 17.11.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 Bug 20953 depends on bug 20951, which changed state. Bug 20951 Summary: Koha::Patron::Discharge is missing use Koha::Patron::Debarments https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20951 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20953 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org