Bug 20148 - Don't allow adding same user multiple times to a basket or an order
Summary: Don't allow adding same user multiple times to a basket or an order
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: P5 - low trivial (vote)
Assignee: paxed
QA Contact: Testopia
URL:
Whiteboard:
Keywords:
: 20237 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-02-07 07:54 UTC by paxed
Modified: 2018-03-27 09:43 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Bug 20148: Adding same user multiple times to acq basket (1.44 KB, patch)
2018-02-07 07:55 UTC, paxed
Details | Diff | Splinter Review
Bug 20148: Adding same user multiple times to acq basket (1.48 KB, patch)
2018-02-16 21:23 UTC, Roch D'Amour
Details | Diff | Splinter Review
Bug 20148: Adding same user multiple times to acq basket (1.48 KB, patch)
2018-02-16 21:24 UTC, Roch D'Amour
Details | Diff | Splinter Review
Bug 20148: Adding same user multiple times to acq basket (1.54 KB, patch)
2018-02-18 10:34 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20148: Prevent adding same user multiple times to acq basket (1.55 KB, patch)
2018-02-18 10:36 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 20148: Prevent adding same user multiple times to an order (1.12 KB, patch)
2018-02-18 18:11 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description paxed 2018-02-07 07:54:22 UTC
When adding a user to manage acquisitions basket, it is possible to add the same user multiple times.
Comment 1 paxed 2018-02-07 07:55:40 UTC
Created attachment 71273 [details] [review]
Bug 20148: Adding same user multiple times to acq basket

When adding a user to manage acquisitions basket, it is possible
to add the same user multiple times. Prevent that.

Test plan:

1) Go to Home -> Acquisitions -> [bookseller] -> [basket]
2) On the "Add user" in the Managed by-part, and try adding
   the same user multiple times.
3) Apply patch
4) Repeat 1 and 2. You should now get an error message saying
   the user is already in the list.
Comment 2 Roch D'Amour 2018-02-16 21:23:45 UTC
Created attachment 71862 [details] [review]
Bug 20148: Adding same user multiple times to acq basket

When adding a user to manage acquisitions basket, it is possible
to add the same user multiple times. Prevent that.

Test plan:

1) Go to Home -> Acquisitions -> [bookseller] -> [basket]
2) On the "Add user" in the Managed by-part, and try adding
   the same user multiple times.
3) Apply patch
4) Repeat 1 and 2. You should now get an error message saying
   the user is already in the list.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Comment 3 Roch D'Amour 2018-02-16 21:24:28 UTC
Created attachment 71863 [details] [review]
Bug 20148: Adding same user multiple times to acq basket

When adding a user to manage acquisitions basket, it is possible
to add the same user multiple times. Prevent that.

Test plan:

1) Go to Home -> Acquisitions -> [bookseller] -> [basket]
2) On the "Add user" in the Managed by-part, and try adding
   the same user multiple times.
3) Apply patch
4) Repeat 1 and 2. You should now get an error message saying
   the user is already in the list.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Comment 4 Katrin Fischer 2018-02-18 10:34:56 UTC
Created attachment 71898 [details] [review]
Bug 20148: Adding same user multiple times to acq basket

When adding a user to manage acquisitions basket, it is possible
to add the same user multiple times. Prevent that.

Test plan:

1) Go to Home -> Acquisitions -> [bookseller] -> [basket]
2) On the "Add user" in the Managed by-part, and try adding
   the same user multiple times.
3) Apply patch
4) Repeat 1 and 2. You should now get an error message saying
   the user is already in the list.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2018-02-18 10:36:50 UTC
Created attachment 71899 [details] [review]
Bug 20148: Prevent adding same user multiple times to acq basket

When adding a user to manage acquisitions basket, it is possible
to add the same user multiple times. Prevent that.

Test plan:

1) Go to Home -> Acquisitions -> [bookseller] -> [basket]
2) On the "Add user" in the Managed by-part, and try adding
   the same user multiple times.
3) Apply patch
4) Repeat 1 and 2. You should now get an error message saying
   the user is already in the list.

Signed-off-by: Pasi Kallinen <pasi.kallinen@joensuu.fi>
Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2018-02-18 10:38:39 UTC
Hi paxed, thx for the bug fix! Please make sure your patch subject describes the change (see https://wiki.koha-community.org/wiki/Commit_messages). 
I've amended it a little to do that.
I am going to file another bug for adding users to get notified on receive - same problem there.
Comment 7 Jonathan Druart 2018-02-18 18:11:15 UTC
Created attachment 71915 [details] [review]
Bug 20148: Prevent adding same user multiple times to an order

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Jonathan Druart 2018-02-18 18:11:20 UTC
*** Bug 20237 has been marked as a duplicate of this bug. ***
Comment 9 Jonathan Druart 2018-02-18 19:50:43 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 10 Nick Clemens 2018-03-23 12:48:53 UTC
Awesome work all! Pushed to stable for 17.11.04
Comment 11 Fridolin SOMERS 2018-03-27 09:43:49 UTC
Pushed to 17.05.x for v17.05.10