From 3992382957c32eace00c3b41031454e0c3efc1b6 Mon Sep 17 00:00:00 2001 From: Alex Sassmannshausen Date: Mon, 15 Jan 2018 19:11:31 +0100 Subject: [PATCH] Bug 11897: Rebase bugfixes. * api/v1/swagger/paths.json: Fix missing commas. * api/v1/swagger/paths/rotas.json: Fix missing commas. * installer/data/mysql/atomicupdate/stockrot_tables.sql: Up perms counter to 23. * installer/data/mysql/userpermissions.sql: Up perms counter to 23. * t/db_dependent/StockRotationItems.t: Fix builder semantics. --- api/v1/swagger/paths.json | 2 +- api/v1/swagger/paths/rotas.json | 2 +- installer/data/mysql/atomicupdate/stockrot_tables.sql | 6 +++--- installer/data/mysql/userpermissions.sql | 4 ++-- t/db_dependent/StockRotationItems.t | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/api/v1/swagger/paths.json b/api/v1/swagger/paths.json index 8ad79387f9..90a99efd87 100644 --- a/api/v1/swagger/paths.json +++ b/api/v1/swagger/paths.json @@ -25,7 +25,7 @@ }, "/illrequests": { "$ref": "paths/illrequests.json#/~1illrequests" - } + }, "/rotas/{rota_id}/stages/{stage_id}/position": { "$ref": "paths/rotas.json#/~1rotas~1{rota_id}~1stages~1{stage_id}~1position" } diff --git a/api/v1/swagger/paths/rotas.json b/api/v1/swagger/paths/rotas.json index 3c5ff8e6a6..0cdda30317 100644 --- a/api/v1/swagger/paths/rotas.json +++ b/api/v1/swagger/paths/rotas.json @@ -55,7 +55,7 @@ "schema": { "$ref": "../definitions.json#/error" } - } + }, "500": { "description": "Internal server error", "schema": { diff --git a/installer/data/mysql/atomicupdate/stockrot_tables.sql b/installer/data/mysql/atomicupdate/stockrot_tables.sql index 7dc381e496..8469d20ca7 100644 --- a/installer/data/mysql/atomicupdate/stockrot_tables.sql +++ b/installer/data/mysql/atomicupdate/stockrot_tables.sql @@ -55,8 +55,8 @@ INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) V -- Permissions INSERT IGNORE INTO userflags (bit, flag, flagdesc, defaulton) VALUES - (22, 'stockrotation', 'Manage stockrotation operations', 0); + (23, 'stockrotation', 'Manage stockrotation operations', 0); INSERT IGNORE INTO permissions (module_bit, code, description) VALUES - (22, 'can_edit_rotas', 'Create, edit and delete rotas'), - (22, 'can_add_items_rotas', 'Add and remove items from rotas'); + (23, 'can_edit_rotas', 'Create, edit and delete rotas'), + (23, 'can_add_items_rotas', 'Add and remove items from rotas'); diff --git a/installer/data/mysql/userpermissions.sql b/installer/data/mysql/userpermissions.sql index bddfbed5af..dabc2dfc5b 100644 --- a/installer/data/mysql/userpermissions.sql +++ b/installer/data/mysql/userpermissions.sql @@ -82,6 +82,6 @@ INSERT INTO permissions (module_bit, code, description) VALUES (21, 'edit_templates', 'Create and update club templates'), (21, 'edit_clubs', 'Create and update clubs'), (21, 'enroll', 'Enroll patrons in clubs'), - (22, 'can_edit_rotas', 'Create, edit and delete rotas'), - (22, 'can_add_items_rotas', 'Add and remove items from rotas') + (23, 'can_edit_rotas', 'Create, edit and delete rotas'), + (23, 'can_add_items_rotas', 'Add and remove items from rotas') ; diff --git a/t/db_dependent/StockRotationItems.t b/t/db_dependent/StockRotationItems.t index 5f3e235671..2d9bf89a39 100644 --- a/t/db_dependent/StockRotationItems.t +++ b/t/db_dependent/StockRotationItems.t @@ -86,7 +86,7 @@ subtest 'Tests for needs_repatriating' => sub { my $dbrota = $dbitem->stage->rota; my $newstage = $builder->build({ source => 'Stockrotationstage', - values => { + value => { rota_id => $dbrota->rota_id, position => 2, } @@ -247,7 +247,7 @@ subtest "Tests for advance." => sub { # Multi stages my $srstage = $builder->build({ source => 'Stockrotationstage', - values => { duration => 50 } + value => { duration => 50 } }); my $dbstage2 = Koha::StockRotationStages->find($srstage->{stage_id}); $dbstage2->move_to_group($dbitem->stage->rota_id); -- 2.13.4