Bug 17208: Checking if classification source or filing rule already exists before...
authorAleisha Amohia <aleishaamohia@hotmail.com>
Fri, 2 Dec 2016 04:08:45 +0000 (04:08 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 23 Dec 2016 11:33:48 +0000 (11:33 +0000)
commit4c5f495f0e0f2b7852908d84764b3be0ac02a90f
tree0f6692d9f5991b40de57d081e4ccb09b62b3fca1
parent8e68e41df448e9bde7baf69ebab2646d2138cca4
Bug 17208: Checking if classification source or filing rule already exists before adding

To test:
1) Go to Admin -> Classification sources
2) Attempt to reproduce bug before applying patch. Notice the message
saying the add was successful, but was not added to the table
3) Apply patch and refresh page (restart plack if necessary)
4) Add new classification source with same code as existing one. Notice
you are now told that the add failed.
5) Confirm adding new classification source with unique code works
6) Add new classification filing rule with same code as existing one.
Notice you are told that add failed.
7) Confirm adding new classification filing rule with unique code works

Sponsored-by: Catalyst IT
Followed test plan, works as expected.
Signed-off-by: Marc VĂ©ron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
This is not the way to go, we should use an eval instead.
But since we do not have RaiseError set, it will not work.
This module will need to be moved to Koha::Objects to be implemented
correctly.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/ClassSource.pm
admin/classsources.pl
koha-tmpl/intranet-tmpl/prog/en/modules/admin/classsources.tt