Bug 12965 - can create an item type that already exists
Summary: can create an item type that already exists
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-19 13:41 UTC by Nicole C. Engard
Modified: 2016-06-21 21:38 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 12965: Prevent to erase an existing item type (5.36 KB, patch)
2015-07-10 15:14 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12965: Prevent to erase an existing item type (5.45 KB, patch)
2015-07-11 03:42 UTC, Amit Gupta
Details | Diff | Splinter Review
Bug 12965: Prevent to erase an existing item type (5.59 KB, patch)
2015-08-12 08:34 UTC, Joonas Kylmälä
Details | Diff | Splinter Review
[PASSED QA] Bug 12965: Prevent to erase an existing item type (5.74 KB, patch)
2015-09-01 21:46 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2014-09-19 13:41:12 UTC
If you create an item type that already exists it will overwrite that item type without warning the user.  So if you have a DVD type and create a new DVD type the old type gets overwritten by the new with no warning.
Comment 1 Marc Véron 2014-12-19 16:05:23 UTC
Confirmed for current master 3.19.00.000
Comment 2 Jonathan Druart 2015-07-10 15:14:50 UTC Comment hidden (obsolete)
Comment 3 Amit Gupta 2015-07-11 03:42:37 UTC Comment hidden (obsolete)
Comment 4 Joonas Kylmälä 2015-08-12 08:34:39 UTC Comment hidden (obsolete)
Comment 5 Katrin Fischer 2015-09-01 21:46:53 UTC
Created attachment 42181 [details] [review]
[PASSED QA] Bug 12965: Prevent to erase an existing item type

On creating an item type, if it already exists, it will replace the
existing one.
This patch prevent that and display a message to the interface.

Note: The fields are lost.

Test plan:
1/ Create an item type 'AAA', description 'AAA'
2/ Edit it, update the description with 'BBB'
3/ Create an item type 'AAA' with a description 'CCC' => you should get
a warning "already exists".

Works well, no errors

Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com>
Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Warning message is triggered.
Adding, editing and deleting item types still works.
Comment 6 Tomás Cohen Arazi 2015-09-02 17:48:33 UTC
Patch pushed to master.

Thanks Jonathan!
Comment 7 Chris Cormack 2015-09-22 01:44:15 UTC
Pushed to 3.20.x will be in 3.20.4
Comment 8 Liz Rea 2015-09-22 02:33:09 UTC
Pushed to 3.18.x will be in 3.18.11