https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31843 Bug ID: 31843 Summary: Stock rotations do not allow rotas with the same name Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: pjamorim91@gmail.com QA Contact: testopia@bugs.koha-community.org 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. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.