[Bug 20687] New: Multiple invitations to share lists prevents some users from accepting
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 Bug ID: 20687 Summary: Multiple invitations to share lists prevents some users from accepting Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Lists Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl To recreate: 1 - Create a private list in the opac 2 - Invite 2 patrons to the list 3 - Try to accept from the patron you first shared to 4 - You will get a failure message about expiration of the link It seems we only get the latest invitation when trying to accept: opac/opac-shareshelf.pl line 135: # We could have used ->find with the share id, but we don't want to change # the url sent to the patron my $shared_shelf = Koha::Virtualshelfshares->search( { shelfnumber => $param->{shelfnumber}, }, { order_by => { -desc => 'sharedate' }, limit => 1, } ); -- 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=20687 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |9032 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9032 [Bug 9032] Share a list -- 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=20687 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- 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=20687 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 74949 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=74949&action=edit Bug 20687 - Check all share keys for a given list This patch gets all the shares for a list and iterates through to find the correct one when accepting from a link To test: 1 - Create a private list in the opac 2 - Invite 2 patrons to the list 3 - Try to accept from the patron you first shared to 4 - You will get a failure message about expiration of the link 5 - Apply patch 6 - Now try to accept the first share 7 - It works! Success! -- 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=20687 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- 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=20687 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Just reading the code: should not we search using the invitekey? There is definitely something wrong. Marcel maybe? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #2)
Just reading the code: should not we search using the invitekey? There is definitely something wrong. Marcel maybe?
I wrote the original code, but the author of bug 14544 made some changes :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |BLOCKED --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Working on this one now -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Nick: Commit title does not start with 'Bug XXXXX: ' - d63a082 !! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 75047 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75047&action=edit Bug 20687: Check all share keys for a given list This patch gets all the shares for a list and iterates through to find the correct one when accepting from a link To test: 1 - Create a private list in the opac 2 - Invite 2 patrons to the list 3 - Try to accept from the patron you first shared to 4 - You will get a failure message about expiration of the link 5 - Apply patch 6 - Now try to accept the first share 7 - It works! Success! Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 75048 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75048&action=edit Bug 20687: (follow-up) Look for invitekey in show_accept and fix error codes We should check the invitekey in show_accept by passing it along in the search call. On the way I fixed some error checking: if the list number is invalid, or the list is public or you are the owner, or if the key is not found, we should set the right error code; the template contains those messages. Test plan: [1] Share a list and accept a correct invitation with another user. [2] Try to accept some invalid proposals: wrong key, wrong list. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Tested invalid key, wrong list, owner, public list, expiry. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #74949|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|Trivial patch |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |14544 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14544 [Bug 14544] Move the list related code to Koha::Virtualshelves -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |11943 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Left only one (known) problem: double accepts (bug 11943). Will try to add something there ;) Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11943 [Bug 11943] AcceptShare should check for double accepts -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|11943 | See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=11943 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11943 [Bug 11943] Prevent double accepts in Koha::Virtualshelfshare -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 Kyle M Hall <kyle@bywatersolutions.com> 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=20687 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75047|0 |1 is obsolete| | Attachment #75048|0 |1 is obsolete| | --- Comment #9 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 75124 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75124&action=edit Bug 20687: Check all share keys for a given list This patch gets all the shares for a list and iterates through to find the correct one when accepting from a link To test: 1 - Create a private list in the opac 2 - Invite 2 patrons to the list 3 - Try to accept from the patron you first shared to 4 - You will get a failure message about expiration of the link 5 - Apply patch 6 - Now try to accept the first share 7 - It works! Success! Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 --- Comment #10 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 75125 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75125&action=edit Bug 20687: (follow-up) Look for invitekey in show_accept and fix error codes We should check the invitekey in show_accept by passing it along in the search call. On the way I fixed some error checking: if the list number is invalid, or the list is public or you are the owner, or if the key is not found, we should set the right error code; the template contains those messages. Test plan: [1] Share a list and accept a correct invitation with another user. [2] Try to accept some invalid proposals: wrong key, wrong list. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Tested invalid key, wrong list, owner, public list, expiry. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 18.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Pushed to stable for 17.11.6 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #13 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.05.x for v17.05.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20687 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