Summary: | Stock rotations do not allow rotas with the same name | ||
---|---|---|---|
Product: | Koha | Reporter: | Pedro Amorim <pjamorim91> |
Component: | Tools | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | martin.renvoize |
Version: | Main | Keywords: | Academy |
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: |
Steps to reproduce: * Enable StockRotation system preference * Tools > Stock rotation > New rota * Enter name "rota", save. * Create new rota, enter name "rota" again. * Nasty plack error This error also occurs when updating a rota's name to an already existing rota's name. plack-intranet-error.log: [WARN] DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry 'rota' for key 'stockrotationrotas_title' at /kohadevbox/koha/Koha/Object.pm line 170 > describe stockrotationrotas; +-------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------+--------------+------+-----+---------+----------------+ | rota_id | int(11) | NO | PRI | NULL | auto_increment | | title | varchar(100) | NO | UNI | NULL | | | description | text | NO | | NULL | | | cyclical | tinyint(1) | NO | | 0 | | | active | tinyint(1) | NO | | 0 | | +-------------+--------------+------+-----+---------+----------------+ Seems that the title is set as unique in the database and is causing this.