OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
replace legacy spec
ulferts81d90579e538
diff --git a/app/controllers/workflows_controller.rb b/app/controllers/workflows_controller.rbindex 6352bb46f8f..dcff1858567 100644--- a/app/controllers/workflows_controller.rb+++ b/app/controllers/workflows_controller.rb@@ -69,12 +69,12 @@ class WorkflowsController < ApplicationController@source_type = if params[:source_type_id].blank? || params[:source_type_id] == 'any'nilelse- ::Type.find_by(id: params[:source_type_id].to_i)+ ::Type.find(params[:source_type_id])end@source_role = if params[:source_role_id].blank? || params[:source_role_id] == 'any'nilelse- Role.find_by(id: params[:source_role_id].to_i)+ Role.find(params[:source_role_id])end@target_types = params[:target_type_ids].blank? ? nil : ::Type.where(id: params[:target_type_ids])diff --git a/spec/controllers/workflows_controller_spec.rb b/spec/controllers/workflows_controller_spec.rbindex c1f7bbfbda8..2346393c56b 100644--- a/spec/controllers/workflows_controller_spec.rb+++ b/spec/controllers/workflows_controller_spec.rb@@ -29,30 +29,45 @@require 'spec_helper'describe WorkflowsController, type: :controller do- let(:current_user) { build_stubbed(:admin) }let!(:role) dobuild_stubbed(:role).tap do |r|allow(Role).to receive(:find)- .with(r.id.to_s)- .and_return(r)+ .with(r.id.to_s)+ .and_return(r)++ allow(Role)+ .to receive(:find_by)+ .and_return(nil)++ allow(Role)+ .to receive(:find_by)+ .with(id: r.id.to_s)+ .and_return(r)endendlet!(:type) do- build_stubbed(:type) do |t|+ build_stubbed(:type).tap do |t|allow(Type).to receive(:find)- .with(t.id.to_s)- .and_return(t)+ .with(t.id.to_s)+ .and_return(t)++ allow(Type)+ .to receive(:find_by)+ .and_return(nil)++ allow(Type)+ .to receive(:find_by)+ .with(id: t.id.to_s)+ .and_return(t)endend- before do- login_as(current_user)- end+ current_user { build_stubbed(:admin) }describe '#index' do- let(:counts) { double('wf counts') }+ let(:counts) { instance_double(Hash) }before doallow(Workflow)@@ -73,10 +88,151 @@ describe WorkflowsController, type: :controller doendend+ describe '#edit' do+ let(:non_type_status) { build_stubbed(:status) }+ let(:type_status) { build_stubbed(:status) }++ before do+ allow(type)+ .to receive(:statuses)+ .and_return [type_status]++ allow(Status)+ .to receive(:all)+ .and_return [type_status, non_type_status]++ allow(Type)+ .to receive(:order)+ .and_return([type])++ allow(Role)+ .to receive(:order)+ .and_return([role])+ end++ context 'without parameters' do+ before do+ get :edit+ end++ it 'is successful' do+ expect(response)+ .to have_http_status(:ok)+ end++ it 'renders the edit template' do+ expect(response)+ .to render_template :edit+ end++ it 'does not assign role' do+ expect(assigns[:role])+ .to be_nil+ end++ it 'does not assign type' do+ expect(assigns[:type])+ .to be_nil+ end++ it 'assigns roles' do+ expect(assigns[:roles])+ .to eq [role]+ end++ it 'assigns types' do+ expect(assigns[:types])+ .to eq [type]+ end+ end++ context 'with role and type params' do+ before do+ get :edit, params: { role_id: role.id.to_s, type_id: type.id.to_s }+ end++ it 'is successful' do+ expect(response)+ .to have_http_status(:ok)+ end++ it 'renders the edit template' do+ expect(response)+ .to render_template :edit+ end++ it 'assigns role' do+ expect(assigns[:role])+ .to eq role+ end++ it 'assign type' do+ expect(assigns[:type])+ .to eq type+ end++ it 'assigns roles' do+ expect(assigns[:roles])+ .to eq [role]+ end++ it 'assigns types' do+ expect(assigns[:types])+ .to eq [type]+ end++ it 'assigns statuses' do+ expect(assigns[:statuses])+ .to eq type.statuses+ end+ end++ context 'with role and type params and with all statuses' do+ before do+ get :edit, params: { role_id: role.id.to_s, type_id: type.id.to_s, used_statuses_only: '0' }+ end++ it 'is successful' do+ expect(response)+ .to have_http_status(:ok)+ end++ it 'renders the edit template' do+ expect(response)+ .to render_template :edit+ end++ it 'assigns role' do+ expect(assigns[:role])+ .to eq role+ end++ it 'assign type' do+ expect(assigns[:type])+ .to eq type+ end++ it 'assigns roles' do+ expect(assigns[:roles])+ .to eq [role]+ end++ it 'assigns types' do+ expect(assigns[:types])+ .to eq [type]+ end++ it 'assigns statuses' do+ expect(assigns[:statuses])+ .to eq Status.all+ end+ end+ end+describe '#update' dolet(:status_params) { { "1" => "2" } }let(:service) do- service = double('service')+ service = instance_double(Workflows::BulkUpdateService)allow(Workflows::BulkUpdateService).to receive(:new)@@ -109,4 +265,244 @@ describe WorkflowsController, type: :controller do.to redirect_to edit_workflows_path(role_id: role.id, type_id: type.id)endend++ describe '#copy' do+ let(:target_type1) { build_stubbed(:type) }+ let(:target_type2) { build_stubbed(:type) }++ let(:target_role1) { build_stubbed(:role) }+ let(:target_role2) { build_stubbed(:role) }++ let(:params) do+ {+ source_type_id: type.id.to_s,+ source_role_id: role.id.to_s,+ target_type_ids: [target_type1.id.to_s, target_type2.id.to_s],+ target_role_ids: [target_role1.id.to_s, target_role2.id.to_s]+ }+ end++ before do+ allow(Role)+ .to receive(:where)+ .with(id: [target_role1.id.to_s, target_role2.id.to_s])+ .and_return([target_role1, target_role2])++ allow(Type)+ .to receive(:where)+ .with(id: [target_type1.id.to_s, target_type2.id.to_s])+ .and_return([target_type1, target_type2])++ allow(Workflow)+ .to receive(:copy)+ end++ context 'with a get request' do+ before do+ get :copy, params:+ end++ it 'is a success' do+ expect(response)+ .to have_http_status(:ok)+ end++ it 'renders the copy template' do+ expect(response)+ .to render_template :copy+ end++ it 'assigns the source_type' do+ expect(assigns[:source_type])+ .to eq type+ end++ it 'assigns the source_role' do+ expect(assigns[:source_role])+ .to eq role+ end++ it 'assigns the target_types' do+ expect(assigns[:target_types])+ .to eq [target_type1, target_type2]+ end++ it 'assigns the target_roles' do+ expect(assigns[:target_roles])+ .to eq [target_role1, target_role2]+ end+ end++ context 'when posting with all the params' do+ before do+ post :copy, params:+ end++ it 'calls the Workflow.copy method' do+ expect(Workflow)+ .to have_received(:copy)+ .with(type, role, [target_type1, target_type2], [target_role1, target_role2])+ end++ it 'sets a flash notice' do+ expect(flash[:notice])+ .to eq I18n.t(:notice_successful_update)+ end++ it 'redirects to the copy action' do+ expect(response)+ .to redirect_to copy_workflows_path(source_type_id: type, source_role_id: role)+ end+ end++ context 'when posting with \'any\' for source_type' do+ let(:params) do+ {+ source_type_id: 'any',+ source_role_id: role.id.to_s,+ target_type_ids: [target_type1.id.to_s, target_type2.id.to_s],+ target_role_ids: [target_role1.id.to_s, target_role2.id.to_s]+ }+ end++ before do+ post :copy, params:+ end++ it 'calls the Workflow.copy method' do+ expect(Workflow)+ .to have_received(:copy)+ .with(nil, role, [target_type1, target_type2], [target_role1, target_role2])+ end++ it 'sets a flash notice' do+ expect(flash[:notice])+ .to eq I18n.t(:notice_successful_update)+ end++ it 'redirects to the copy action' do+ expect(response)+ .to redirect_to copy_workflows_path(source_role_id: role)+ end+ end++ context 'when posting with \'any\' for source_role' do+ let(:params) do+ {+ source_type_id: type.id.to_s,+ source_role_id: 'any',+ target_type_ids: [target_type1.id.to_s, target_type2.id.to_s],+ target_role_ids: [target_role1.id.to_s, target_role2.id.to_s]+ }+ end++ before do+ post :copy, params:+ end++ it 'calls the Workflow.copy method' do+ expect(Workflow)+ .to have_received(:copy)+ .with(type, nil, [target_type1, target_type2], [target_role1, target_role2])+ end++ it 'sets a flash notice' do+ expect(flash[:notice])+ .to eq I18n.t(:notice_successful_update)+ end++ it 'redirects to the copy action' do+ expect(response)+ .to redirect_to copy_workflows_path(source_type_id: type)+ end+ end++ context 'when posting with \'any\' for both sources' do+ let(:params) do+ {+ source_type_id: 'any',+ source_role_id: 'any',+ target_type_ids: [target_type1.id.to_s, target_type2.id.to_s],+ target_role_ids: [target_role1.id.to_s, target_role2.id.to_s]+ }+ end++ before do+ post :copy, params:+ end++ it 'does not call the Workflow.copy method' do+ expect(Workflow)+ .not_to have_received(:copy)+ end++ it 'sets a flash error' do+ expect(flash[:error])+ .to eq I18n.t(:error_workflow_copy_source)+ end++ it 'renders the copy action' do+ expect(response)+ .to render_template :copy+ end+ end++ context 'when posting without target_type_ids' do+ let(:params) do+ {+ source_type_id: type.id.to_s,+ source_role_id: role.id.to_s,+ target_role_ids: [target_role1.id.to_s, target_role2.id.to_s]+ }+ end++ before do+ post :copy, params:+ end++ it 'does not call the Workflow.copy method' do+ expect(Workflow)+ .not_to have_received(:copy)+ end++ it 'sets a flash error' do+ expect(flash[:error])+ .to eq I18n.t(:error_workflow_copy_target)+ end++ it 'renders the copy action' do+ expect(response)+ .to render_template :copy+ end+ end++ context 'when posting without target_role_ids' do+ let(:params) do+ {+ source_type_id: type.id.to_s,+ source_role_id: role.id.to_s,+ target_type_ids: [target_type1.id.to_s, target_type2.id.to_s]+ }+ end++ before do+ post :copy, params:+ end++ it 'does not call the Workflow.copy method' do+ expect(Workflow)+ .not_to have_received(:copy)+ end++ it 'sets a flash error' do+ expect(flash[:error])+ .to eq I18n.t(:error_workflow_copy_target)+ end++ it 'renders the copy action' do+ expect(response)+ .to render_template :copy+ end+ end+ endenddiff --git a/spec/models/workflow_spec.rb b/spec/models/workflow_spec.rbindex 04795c20244..565eb879107 100644--- a/spec/models/workflow_spec.rb+++ b/spec/models/workflow_spec.rb@@ -29,69 +29,121 @@require 'spec_helper'describe Workflow, type: :model do- let(:status_0) { create(:status) }- let(:status_1) { create(:status) }- let(:role) { create(:role) }- let(:type) { create(:type) }-- describe '#self.copy' do- let(:role_target) { create(:role) }- let(:type_target) { create(:type) }+ describe '.copy' do+ shared_let(:status0) { create(:status) }+ shared_let(:status1) { create(:status) }+ shared_let(:role) { create(:role) }+ shared_let(:type) { create(:type) }+ shared_let(:role_target) { create(:role) }+ shared_let(:type_target) { create(:type) }+ shared_let(:role_target2) { create(:role) }+ shared_let(:type_target2) { create(:type) }shared_examples_for 'copied workflow' do- before { Workflow.copy(type, role, type_target, role_target) }-- subject { Workflow.order(Arel.sql('id DESC')).first }+ let(:expected_type) { type_target }+ let(:expected_role) { role_target }it { expect(subject.old_status).to eq(workflow_src.old_status) }it { expect(subject.new_status).to eq(workflow_src.new_status) }- it { expect(subject.type_id).to eq(type_target.id) }+ it { expect(subject.type).to eq(expected_type) }- it { expect(subject.role).to eq(role_target) }+ it { expect(subject.role).to eq(expected_role) }it { expect(subject.author).to eq(workflow_src.author) }it { expect(subject.assignee).to eq(workflow_src.assignee) }end- describe 'workflow w/o author or assignee' do+ context 'for a workflow w/o author or assignee' dolet!(:workflow_src) docreate(:workflow,- old_status: status_0,- new_status: status_1,+ old_status: status0,+ new_status: status1,type_id: type.id,role:)end- it_behaves_like 'copied workflow'+ before { described_class.copy(type, role, type_target, role_target) }++ it_behaves_like 'copied workflow' do+ subject { described_class.order(Arel.sql('id DESC')).first }+ endend- describe 'workflow with author' do+ context 'for a workflow with author' dolet!(:workflow_src) docreate(:workflow,- old_status: status_0,- new_status: status_1,+ old_status: status0,+ new_status: status1,type_id: type.id,role:,author: true)end- it_behaves_like 'copied workflow'+ before { described_class.copy(type, role, type_target, role_target) }++ it_behaves_like 'copied workflow' do+ subject { described_class.order(Arel.sql('id DESC')).first }+ endend- describe 'workflow with assignee' do+ context 'for a workflow with assignee' dolet!(:workflow_src) docreate(:workflow,- old_status: status_0,- new_status: status_1,+ old_status: status0,+ new_status: status1,type_id: type.id,role:,assignee: true)end- it_behaves_like 'copied workflow'+ before { described_class.copy(type, role, type_target, role_target) }++ it_behaves_like 'copied workflow' do+ subject { described_class.order(Arel.sql('id DESC')).first }+ end+ end++ context 'when copying to multiple types and roles' do+ let!(:workflow_src) do+ create(:workflow,+ old_status: status0,+ new_status: status1,+ type_id: type.id,+ role:)+ end++ before { described_class.copy(type, role, [type_target, type_target2], [role_target, role_target2]) }++ it_behaves_like 'copied workflow' do+ subject { described_class.order(Arel.sql('type_id DESC, role_id DESC')).first }++ let(:expected_role) { role_target2 }+ let(:expected_type) { type_target2 }+ end++ it_behaves_like 'copied workflow' do+ subject { described_class.order(Arel.sql('type_id DESC, role_id DESC')).second }++ let(:expected_role) { role_target }+ let(:expected_type) { type_target2 }+ end++ it_behaves_like 'copied workflow' do+ subject { described_class.order(Arel.sql('type_id DESC, role_id DESC')).third }++ let(:expected_role) { role_target2 }+ let(:expected_type) { type_target }+ end++ it_behaves_like 'copied workflow' do+ subject { described_class.order(Arel.sql('type_id DESC, role_id DESC')).fourth }++ let(:expected_role) { role_target }+ let(:expected_type) { type_target }+ endendendenddiff --git a/spec_legacy/fixtures/work_packages.yml b/spec_legacy/fixtures/work_packages.ymldeleted file mode 100644index 8e9ea1865dc..00000000000--- a/spec_legacy/fixtures/work_packages.yml+++ /dev/null@@ -1,234 +0,0 @@-#-- copyright-# OpenProject is an open source project management software.-# Copyright (C) 2012-2022 the OpenProject GmbH-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License version 3.-#-# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-# Copyright (C) 2006-2013 Jean-Philippe Lang-# Copyright (C) 2010-2013 the ChiliProject Team-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License-# as published by the Free Software Foundation; either version 2-# of the License, or (at your option) any later version.-#-# This program is distributed in the hope that it will be useful,-# but WITHOUT ANY WARRANTY; without even the implied warranty of-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-# GNU General Public License for more details.-#-# You should have received a copy of the GNU General Public License-# along with this program; if not, write to the Free Software-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.-#-# See COPYRIGHT and LICENSE files for more details.-#++------issues_001:- created_at: <%= 3.days.ago %>- project_id: 1- updated_at: <%= 1.day.ago %>- priority_id: 4- subject: Can't print recipes- id: 1- version_id:- category_id: 1- description: Unable to print recipes- type_id: 1- assigned_to_id:- author_id: 2- status_id: 1- start_date: <%= 1.day.ago.to_date.to_fs(:db) %>- due_date: <%= 10.day.from_now.to_date.to_fs(:db) %>- lock_version: 3-issues_002:- created_at: 2006-07-19 21:04:21 +02:00- project_id: 1- updated_at: 2006-07-19 21:09:50 +02:00- priority_id: 5- subject: Add ingredients categories- id: 2- version_id: 2- category_id:- description: Ingredients of the recipe should be classified by categories- type_id: 2- assigned_to_id: 3- author_id: 2- status_id: 2- start_date: <%= 2.day.ago.to_date.to_fs(:db) %>- due_date:- lock_version: 3- done_ratio: 30-issues_003:- created_at: 2006-07-19 21:07:27 +02:00- project_id: 1- updated_at: 2006-07-19 21:07:27 +02:00- priority_id: 4- subject: Error 281 when updating a recipe- id: 3- version_id:- category_id:- description: Error 281 is encountered when saving a recipe- type_id: 1- assigned_to_id: 3- author_id: 2- status_id: 1- start_date: <%= 15.day.ago.to_date.to_fs(:db) %>- due_date: <%= 5.day.ago.to_date.to_fs(:db) %>-issues_004:- created_at: <%= 5.days.ago %>- project_id: 2- updated_at: <%= 2.days.ago %>- priority_id: 4- subject: Issue on project 2- id: 4- version_id:- category_id:- description: Issue on project 2- type_id: 1- assigned_to_id: 2- author_id: 2- status_id: 1-issues_005:- created_at: <%= 5.days.ago %>- project_id: 3- updated_at: <%= 2.days.ago %>- priority_id: 4- subject: Subproject issue- id: 5- version_id:- category_id:- description: This is an issue on a cookbook subproject- type_id: 1- assigned_to_id:- author_id: 2- status_id: 1-issues_006:- created_at: <%= 1.minute.ago %>- project_id: 5- updated_at: <%= 1.minute.ago %>- priority_id: 4- subject: Issue of a private subproject- id: 6- version_id:- category_id:- description: This is an issue of a private subproject of cookbook- type_id: 1- assigned_to_id:- author_id: 2- status_id: 1- start_date: <%= Date.today.to_fs(:db) %>- due_date: <%= 1.days.from_now.to_date.to_fs(:db) %>-issues_007:- created_at: <%= 10.days.ago %>- project_id: 1- updated_at: <%= 10.days.ago %>- priority_id: 5- subject: Issue due today- id: 7- version_id:- category_id:- description: This is an issue that is due today- type_id: 1- assigned_to_id:- author_id: 2- status_id: 1- start_date: <%= 10.days.ago.to_fs(:db) %>- due_date: <%= Date.today.to_fs(:db) %>-issues_008:- created_at: <%= 10.days.ago %>- project_id: 1- updated_at: <%= 10.days.ago %>- priority_id: 5- subject: Closed issue- id: 8- version_id:- category_id:- description: This is a closed issue.- type_id: 1- assigned_to_id:- author_id: 2- status_id: 5- start_date:- due_date:-issues_009:- created_at: <%= 1.minute.ago %>- project_id: 5- updated_at: <%= 1.minute.ago %>- priority_id: 5- subject: Blocked Issue- id: 9- version_id:- category_id:- description: This is an issue that is blocked by issue #10- type_id: 1- assigned_to_id:- author_id: 2- status_id: 1- start_date: <%= Date.today.to_fs(:db) %>- due_date: <%= 1.days.from_now.to_date.to_fs(:db) %>-issues_010:- created_at: <%= 1.minute.ago %>- project_id: 5- updated_at: <%= 1.minute.ago %>- priority_id: 5- subject: Issue Doing the Blocking- id: 10- version_id:- category_id:- description: This is an issue that blocks issue #9- type_id: 1- assigned_to_id:- author_id: 2- status_id: 1- start_date: <%= Date.today.to_fs(:db) %>- due_date: <%= 1.days.from_now.to_date.to_fs(:db) %>-issues_011:- created_at: <%= 3.days.ago %>- project_id: 1- updated_at: <%= 1.day.ago %>- priority_id: 5- subject: Closed issue on a closed version- id: 11- version_id: 1- category_id: 1- description:- type_id: 1- assigned_to_id:- author_id: 2- status_id: 5- start_date: <%= 1.day.ago.to_date.to_fs(:db) %>- due_date:-issues_012:- created_at: <%= 3.days.ago %>- project_id: 1- updated_at: <%= 1.day.ago %>- priority_id: 5- subject: Closed issue on a locked version- id: 12- version_id: 2- category_id: 1- description:- type_id: 1- assigned_to_id:- author_id: 3- status_id: 5- start_date: <%= 1.day.ago.to_date.to_fs(:db) %>- due_date:-issues_013:- created_at: <%= 5.days.ago %>- project_id: 3- updated_at: <%= 2.days.ago %>- priority_id: 4- subject: Subproject issue two- id: 13- version_id:- category_id:- description: This is a second issue on a cookbook subproject- type_id: 1- assigned_to_id:- author_id: 2- status_id: 1diff --git a/spec_legacy/fixtures/workflows.yml b/spec_legacy/fixtures/workflows.ymldeleted file mode 100644index b94712651c9..00000000000--- a/spec_legacy/fixtures/workflows.yml+++ /dev/null@@ -1,1643 +0,0 @@-#-- copyright-# OpenProject is an open source project management software.-# Copyright (C) 2012-2022 the OpenProject GmbH-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License version 3.-#-# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-# Copyright (C) 2006-2013 Jean-Philippe Lang-# Copyright (C) 2010-2013 the ChiliProject Team-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License-# as published by the Free Software Foundation; either version 2-# of the License, or (at your option) any later version.-#-# This program is distributed in the hope that it will be useful,-# but WITHOUT ANY WARRANTY; without even the implied warranty of-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-# GNU General Public License for more details.-#-# You should have received a copy of the GNU General Public License-# along with this program; if not, write to the Free Software-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.-#-# See COPYRIGHT and LICENSE files for more details.-#++------workflows_189:- new_status_id: 5- role_id: 1- old_status_id: 2- id: 189- type_id: 3-workflows_001:- new_status_id: 2- role_id: 1- old_status_id: 1- id: 1- type_id: 1-workflows_002:- new_status_id: 3- role_id: 1- old_status_id: 1- id: 2- type_id: 1-workflows_003:- new_status_id: 4- role_id: 1- old_status_id: 1- id: 3- type_id: 1-workflows_110:- new_status_id: 6- role_id: 1- old_status_id: 4- id: 110- type_id: 2-workflows_004:- new_status_id: 5- role_id: 1- old_status_id: 1- id: 4- type_id: 1-workflows_030:- new_status_id: 5- role_id: 1- old_status_id: 6- id: 30- type_id: 1-workflows_111:- new_status_id: 1- role_id: 1- old_status_id: 5- id: 111- type_id: 2-workflows_005:- new_status_id: 6- role_id: 1- old_status_id: 1- id: 5- type_id: 1-workflows_031:- new_status_id: 2- role_id: 2- old_status_id: 1- id: 31- type_id: 1-workflows_112:- new_status_id: 2- role_id: 1- old_status_id: 5- id: 112- type_id: 2-workflows_006:- new_status_id: 1- role_id: 1- old_status_id: 2- id: 6- type_id: 1-workflows_032:- new_status_id: 3- role_id: 2- old_status_id: 1- id: 32- type_id: 1-workflows_113:- new_status_id: 3- role_id: 1- old_status_id: 5- id: 113- type_id: 2-workflows_220:- new_status_id: 6- role_id: 2- old_status_id: 2- id: 220- type_id: 3-workflows_007:- new_status_id: 3- role_id: 1- old_status_id: 2- id: 7- type_id: 1-workflows_033:- new_status_id: 4- role_id: 2- old_status_id: 1- id: 33- type_id: 1-workflows_060:- new_status_id: 5- role_id: 2- old_status_id: 6- id: 60- type_id: 1-workflows_114:- new_status_id: 4- role_id: 1- old_status_id: 5- id: 114- type_id: 2-workflows_140:- new_status_id: 6- role_id: 2- old_status_id: 4- id: 140- type_id: 2-workflows_221:- new_status_id: 1- role_id: 2- old_status_id: 3- id: 221- type_id: 3-workflows_008:- new_status_id: 4- role_id: 1- old_status_id: 2- id: 8- type_id: 1-workflows_034:- new_status_id: 5- role_id: 2- old_status_id: 1- id: 34- type_id: 1-workflows_115:- new_status_id: 6- role_id: 1- old_status_id: 5- id: 115- type_id: 2-workflows_141:- new_status_id: 1- role_id: 2- old_status_id: 5- id: 141- type_id: 2-workflows_222:- new_status_id: 2- role_id: 2- old_status_id: 3- id: 222- type_id: 3-workflows_223:- new_status_id: 4- role_id: 2- old_status_id: 3- id: 223- type_id: 3-workflows_009:- new_status_id: 5- role_id: 1- old_status_id: 2- id: 9- type_id: 1-workflows_035:- new_status_id: 6- role_id: 2- old_status_id: 1- id: 35- type_id: 1-workflows_061:- new_status_id: 2- role_id: 3- old_status_id: 1- id: 61- type_id: 1-workflows_116:- new_status_id: 1- role_id: 1- old_status_id: 6- id: 116- type_id: 2-workflows_142:- new_status_id: 2- role_id: 2- old_status_id: 5- id: 142- type_id: 2-workflows_250:- new_status_id: 6- role_id: 3- old_status_id: 2- id: 250- type_id: 3-workflows_224:- new_status_id: 5- role_id: 2- old_status_id: 3- id: 224- type_id: 3-workflows_036:- new_status_id: 1- role_id: 2- old_status_id: 2- id: 36- type_id: 1-workflows_062:- new_status_id: 3- role_id: 3- old_status_id: 1- id: 62- type_id: 1-workflows_117:- new_status_id: 2- role_id: 1- old_status_id: 6- id: 117- type_id: 2-workflows_143:- new_status_id: 3- role_id: 2- old_status_id: 5- id: 143- type_id: 2-workflows_170:- new_status_id: 6- role_id: 3- old_status_id: 4- id: 170- type_id: 2-workflows_251:- new_status_id: 1- role_id: 3- old_status_id: 3- id: 251- type_id: 3-workflows_225:- new_status_id: 6- role_id: 2- old_status_id: 3- id: 225- type_id: 3-workflows_063:- new_status_id: 4- role_id: 3- old_status_id: 1- id: 63- type_id: 1-workflows_090:- new_status_id: 5- role_id: 3- old_status_id: 6- id: 90- type_id: 1-workflows_118:- new_status_id: 3- role_id: 1- old_status_id: 6- id: 118- type_id: 2-workflows_144:- new_status_id: 4- role_id: 2- old_status_id: 5- id: 144- type_id: 2-workflows_252:- new_status_id: 2- role_id: 3- old_status_id: 3- id: 252- type_id: 3-workflows_226:- new_status_id: 1- role_id: 2- old_status_id: 4- id: 226- type_id: 3-workflows_038:- new_status_id: 4- role_id: 2- old_status_id: 2- id: 38- type_id: 1-workflows_064:- new_status_id: 5- role_id: 3- old_status_id: 1- id: 64- type_id: 1-workflows_091:- new_status_id: 2- role_id: 1- old_status_id: 1- id: 91- type_id: 2-workflows_119:- new_status_id: 4- role_id: 1- old_status_id: 6- id: 119- type_id: 2-workflows_145:- new_status_id: 6- role_id: 2- old_status_id: 5- id: 145- type_id: 2-workflows_171:- new_status_id: 1- role_id: 3- old_status_id: 5- id: 171- type_id: 2-workflows_253:- new_status_id: 4- role_id: 3- old_status_id: 3- id: 253- type_id: 3-workflows_227:- new_status_id: 2- role_id: 2- old_status_id: 4- id: 227- type_id: 3-workflows_039:- new_status_id: 5- role_id: 2- old_status_id: 2- id: 39- type_id: 1-workflows_065:- new_status_id: 6- role_id: 3- old_status_id: 1- id: 65- type_id: 1-workflows_092:- new_status_id: 3- role_id: 1- old_status_id: 1- id: 92- type_id: 2-workflows_146:- new_status_id: 1- role_id: 2- old_status_id: 6- id: 146- type_id: 2-workflows_172:- new_status_id: 2- role_id: 3- old_status_id: 5- id: 172- type_id: 2-workflows_254:- new_status_id: 5- role_id: 3- old_status_id: 3- id: 254- type_id: 3-workflows_228:- new_status_id: 3- role_id: 2- old_status_id: 4- id: 228- type_id: 3-workflows_066:- new_status_id: 1- role_id: 3- old_status_id: 2- id: 66- type_id: 1-workflows_093:- new_status_id: 4- role_id: 1- old_status_id: 1- id: 93- type_id: 2-workflows_147:- new_status_id: 2- role_id: 2- old_status_id: 6- id: 147- type_id: 2-workflows_173:- new_status_id: 3- role_id: 3- old_status_id: 5- id: 173- type_id: 2-workflows_255:- new_status_id: 6- role_id: 3- old_status_id: 3- id: 255- type_id: 3-workflows_229:- new_status_id: 5- role_id: 2- old_status_id: 4- id: 229- type_id: 3-workflows_067:- new_status_id: 3- role_id: 3- old_status_id: 2- id: 67- type_id: 1-workflows_148:- new_status_id: 3- role_id: 2- old_status_id: 6- id: 148- type_id: 2-workflows_174:- new_status_id: 4- role_id: 3- old_status_id: 5- id: 174- type_id: 2-workflows_256:- new_status_id: 1- role_id: 3- old_status_id: 4- id: 256- type_id: 3-workflows_068:- new_status_id: 4- role_id: 3- old_status_id: 2- id: 68- type_id: 1-workflows_094:- new_status_id: 5- role_id: 1- old_status_id: 1- id: 94- type_id: 2-workflows_149:- new_status_id: 4- role_id: 2- old_status_id: 6- id: 149- type_id: 2-workflows_175:- new_status_id: 6- role_id: 3- old_status_id: 5- id: 175- type_id: 2-workflows_257:- new_status_id: 2- role_id: 3- old_status_id: 4- id: 257- type_id: 3-workflows_069:- new_status_id: 5- role_id: 3- old_status_id: 2- id: 69- type_id: 1-workflows_095:- new_status_id: 6- role_id: 1- old_status_id: 1- id: 95- type_id: 2-workflows_176:- new_status_id: 1- role_id: 3- old_status_id: 6- id: 176- type_id: 2-workflows_258:- new_status_id: 3- role_id: 3- old_status_id: 4- id: 258- type_id: 3-workflows_096:- new_status_id: 1- role_id: 1- old_status_id: 2- id: 96- type_id: 2-workflows_177:- new_status_id: 2- role_id: 3- old_status_id: 6- id: 177- type_id: 2-workflows_259:- new_status_id: 5- role_id: 3- old_status_id: 4- id: 259- type_id: 3-workflows_097:- new_status_id: 3- role_id: 1- old_status_id: 2- id: 97- type_id: 2-workflows_178:- new_status_id: 3- role_id: 3- old_status_id: 6- id: 178- type_id: 2-workflows_098:- new_status_id: 4- role_id: 1- old_status_id: 2- id: 98- type_id: 2-workflows_179:- new_status_id: 4- role_id: 3- old_status_id: 6- id: 179- type_id: 2-workflows_099:- new_status_id: 5- role_id: 1- old_status_id: 2- id: 99- type_id: 2-workflows_100:- new_status_id: 6- role_id: 1- old_status_id: 2- id: 100- type_id: 2-workflows_020:- new_status_id: 6- role_id: 1- old_status_id: 4- id: 20- type_id: 1-workflows_101:- new_status_id: 1- role_id: 1- old_status_id: 3- id: 101- type_id: 2-workflows_021:- new_status_id: 1- role_id: 1- old_status_id: 5- id: 21- type_id: 1-workflows_102:- new_status_id: 2- role_id: 1- old_status_id: 3- id: 102- type_id: 2-workflows_210:- new_status_id: 5- role_id: 1- old_status_id: 6- id: 210- type_id: 3-workflows_022:- new_status_id: 2- role_id: 1- old_status_id: 5- id: 22- type_id: 1-workflows_103:- new_status_id: 4- role_id: 1- old_status_id: 3- id: 103- type_id: 2-workflows_023:- new_status_id: 3- role_id: 1- old_status_id: 5- id: 23- type_id: 1-workflows_104:- new_status_id: 5- role_id: 1- old_status_id: 3- id: 104- type_id: 2-workflows_130:- new_status_id: 6- role_id: 2- old_status_id: 2- id: 130- type_id: 2-workflows_211:- new_status_id: 2- role_id: 2- old_status_id: 1- id: 211- type_id: 3-workflows_024:- new_status_id: 4- role_id: 1- old_status_id: 5- id: 24- type_id: 1-workflows_050:- new_status_id: 6- role_id: 2- old_status_id: 4- id: 50- type_id: 1-workflows_105:- new_status_id: 6- role_id: 1- old_status_id: 3- id: 105- type_id: 2-workflows_131:- new_status_id: 1- role_id: 2- old_status_id: 3- id: 131- type_id: 2-workflows_212:- new_status_id: 3- role_id: 2- old_status_id: 1- id: 212- type_id: 3-workflows_025:- new_status_id: 6- role_id: 1- old_status_id: 5- id: 25- type_id: 1-workflows_051:- new_status_id: 1- role_id: 2- old_status_id: 5- id: 51- type_id: 1-workflows_106:- new_status_id: 1- role_id: 1- old_status_id: 4- id: 106- type_id: 2-workflows_132:- new_status_id: 2- role_id: 2- old_status_id: 3- id: 132- type_id: 2-workflows_213:- new_status_id: 4- role_id: 2- old_status_id: 1- id: 213- type_id: 3-workflows_240:- new_status_id: 5- role_id: 2- old_status_id: 6- id: 240- type_id: 3-workflows_026:- new_status_id: 1- role_id: 1- old_status_id: 6- id: 26- type_id: 1-workflows_052:- new_status_id: 2- role_id: 2- old_status_id: 5- id: 52- type_id: 1-workflows_107:- new_status_id: 2- role_id: 1- old_status_id: 4- id: 107- type_id: 2-workflows_133:- new_status_id: 4- role_id: 2- old_status_id: 3- id: 133- type_id: 2-workflows_214:- new_status_id: 5- role_id: 2- old_status_id: 1- id: 214- type_id: 3-workflows_241:- new_status_id: 2- role_id: 3- old_status_id: 1- id: 241- type_id: 3-workflows_027:- new_status_id: 2- role_id: 1- old_status_id: 6- id: 27- type_id: 1-workflows_053:- new_status_id: 3- role_id: 2- old_status_id: 5- id: 53- type_id: 1-workflows_080:- new_status_id: 6- role_id: 3- old_status_id: 4- id: 80- type_id: 1-workflows_108:- new_status_id: 3- role_id: 1- old_status_id: 4- id: 108- type_id: 2-workflows_134:- new_status_id: 5- role_id: 2- old_status_id: 3- id: 134- type_id: 2-workflows_160:- new_status_id: 6- role_id: 3- old_status_id: 2- id: 160- type_id: 2-workflows_215:- new_status_id: 6- role_id: 2- old_status_id: 1- id: 215- type_id: 3-workflows_242:- new_status_id: 3- role_id: 3- old_status_id: 1- id: 242- type_id: 3-workflows_028:- new_status_id: 3- role_id: 1- old_status_id: 6- id: 28- type_id: 1-workflows_054:- new_status_id: 4- role_id: 2- old_status_id: 5- id: 54- type_id: 1-workflows_081:- new_status_id: 1- role_id: 3- old_status_id: 5- id: 81- type_id: 1-workflows_109:- new_status_id: 5- role_id: 1- old_status_id: 4- id: 109- type_id: 2-workflows_135:- new_status_id: 6- role_id: 2- old_status_id: 3- id: 135- type_id: 2-workflows_161:- new_status_id: 1- role_id: 3- old_status_id: 3- id: 161- type_id: 2-workflows_216:- new_status_id: 1- role_id: 2- old_status_id: 2- id: 216- type_id: 3-workflows_243:- new_status_id: 4- role_id: 3- old_status_id: 1- id: 243- type_id: 3-workflows_029:- new_status_id: 4- role_id: 1- old_status_id: 6- id: 29- type_id: 1-workflows_055:- new_status_id: 6- role_id: 2- old_status_id: 5- id: 55- type_id: 1-workflows_082:- new_status_id: 2- role_id: 3- old_status_id: 5- id: 82- type_id: 1-workflows_136:- new_status_id: 1- role_id: 2- old_status_id: 4- id: 136- type_id: 2-workflows_162:- new_status_id: 2- role_id: 3- old_status_id: 3- id: 162- type_id: 2-workflows_217:- new_status_id: 3- role_id: 2- old_status_id: 2- id: 217- type_id: 3-workflows_270:- new_status_id: 5- role_id: 3- old_status_id: 6- id: 270- type_id: 3-workflows_244:- new_status_id: 5- role_id: 3- old_status_id: 1- id: 244- type_id: 3-workflows_056:- new_status_id: 1- role_id: 2- old_status_id: 6- id: 56- type_id: 1-workflows_137:- new_status_id: 2- role_id: 2- old_status_id: 4- id: 137- type_id: 2-workflows_163:- new_status_id: 4- role_id: 3- old_status_id: 3- id: 163- type_id: 2-workflows_190:- new_status_id: 6- role_id: 1- old_status_id: 2- id: 190- type_id: 3-workflows_218:- new_status_id: 4- role_id: 2- old_status_id: 2- id: 218- type_id: 3-workflows_245:- new_status_id: 6- role_id: 3- old_status_id: 1- id: 245- type_id: 3-workflows_057:- new_status_id: 2- role_id: 2- old_status_id: 6- id: 57- type_id: 1-workflows_083:- new_status_id: 3- role_id: 3- old_status_id: 5- id: 83- type_id: 1-workflows_138:- new_status_id: 3- role_id: 2- old_status_id: 4- id: 138- type_id: 2-workflows_164:- new_status_id: 5- role_id: 3- old_status_id: 3- id: 164- type_id: 2-workflows_191:- new_status_id: 1- role_id: 1- old_status_id: 3- id: 191- type_id: 3-workflows_219:- new_status_id: 5- role_id: 2- old_status_id: 2- id: 219- type_id: 3-workflows_246:- new_status_id: 1- role_id: 3- old_status_id: 2- id: 246- type_id: 3-workflows_058:- new_status_id: 3- role_id: 2- old_status_id: 6- id: 58- type_id: 1-workflows_084:- new_status_id: 4- role_id: 3- old_status_id: 5- id: 84- type_id: 1-workflows_139:- new_status_id: 5- role_id: 2- old_status_id: 4- id: 139- type_id: 2-workflows_165:- new_status_id: 6- role_id: 3- old_status_id: 3- id: 165- type_id: 2-workflows_192:- new_status_id: 2- role_id: 1- old_status_id: 3- id: 192- type_id: 3-workflows_247:- new_status_id: 3- role_id: 3- old_status_id: 2- id: 247- type_id: 3-workflows_059:- new_status_id: 4- role_id: 2- old_status_id: 6- id: 59- type_id: 1-workflows_085:- new_status_id: 6- role_id: 3- old_status_id: 5- id: 85- type_id: 1-workflows_166:- new_status_id: 1- role_id: 3- old_status_id: 4- id: 166- type_id: 2-workflows_248:- new_status_id: 4- role_id: 3- old_status_id: 2- id: 248- type_id: 3-workflows_086:- new_status_id: 1- role_id: 3- old_status_id: 6- id: 86- type_id: 1-workflows_167:- new_status_id: 2- role_id: 3- old_status_id: 4- id: 167- type_id: 2-workflows_193:- new_status_id: 4- role_id: 1- old_status_id: 3- id: 193- type_id: 3-workflows_249:- new_status_id: 5- role_id: 3- old_status_id: 2- id: 249- type_id: 3-workflows_087:- new_status_id: 2- role_id: 3- old_status_id: 6- id: 87- type_id: 1-workflows_168:- new_status_id: 3- role_id: 3- old_status_id: 4- id: 168- type_id: 2-workflows_194:- new_status_id: 5- role_id: 1- old_status_id: 3- id: 194- type_id: 3-workflows_088:- new_status_id: 3- role_id: 3- old_status_id: 6- id: 88- type_id: 1-workflows_169:- new_status_id: 5- role_id: 3- old_status_id: 4- id: 169- type_id: 2-workflows_195:- new_status_id: 6- role_id: 1- old_status_id: 3- id: 195- type_id: 3-workflows_089:- new_status_id: 4- role_id: 3- old_status_id: 6- id: 89- type_id: 1-workflows_196:- new_status_id: 1- role_id: 1- old_status_id: 4- id: 196- type_id: 3-workflows_197:- new_status_id: 2- role_id: 1- old_status_id: 4- id: 197- type_id: 3-workflows_198:- new_status_id: 3- role_id: 1- old_status_id: 4- id: 198- type_id: 3-workflows_199:- new_status_id: 5- role_id: 1- old_status_id: 4- id: 199- type_id: 3-workflows_010:- new_status_id: 6- role_id: 1- old_status_id: 2- id: 10- type_id: 1-workflows_011:- new_status_id: 1- role_id: 1- old_status_id: 3- id: 11- type_id: 1-workflows_012:- new_status_id: 2- role_id: 1- old_status_id: 3- id: 12- type_id: 1-workflows_200:- new_status_id: 6- role_id: 1- old_status_id: 4- id: 200- type_id: 3-workflows_013:- new_status_id: 4- role_id: 1- old_status_id: 3- id: 13- type_id: 1-workflows_120:- new_status_id: 5- role_id: 1- old_status_id: 6- id: 120- type_id: 2-workflows_201:- new_status_id: 1- role_id: 1- old_status_id: 5- id: 201- type_id: 3-workflows_040:- new_status_id: 6- role_id: 2- old_status_id: 2- id: 40- type_id: 1-workflows_121:- new_status_id: 2- role_id: 2- old_status_id: 1- id: 121- type_id: 2-workflows_202:- new_status_id: 2- role_id: 1- old_status_id: 5- id: 202- type_id: 3-workflows_014:- new_status_id: 5- role_id: 1- old_status_id: 3- id: 14- type_id: 1-workflows_041:- new_status_id: 1- role_id: 2- old_status_id: 3- id: 41- type_id: 1-workflows_122:- new_status_id: 3- role_id: 2- old_status_id: 1- id: 122- type_id: 2-workflows_203:- new_status_id: 3- role_id: 1- old_status_id: 5- id: 203- type_id: 3-workflows_015:- new_status_id: 6- role_id: 1- old_status_id: 3- id: 15- type_id: 1-workflows_230:- new_status_id: 6- role_id: 2- old_status_id: 4- id: 230- type_id: 3-workflows_123:- new_status_id: 4- role_id: 2- old_status_id: 1- id: 123- type_id: 2-workflows_204:- new_status_id: 4- role_id: 1- old_status_id: 5- id: 204- type_id: 3-workflows_016:- new_status_id: 1- role_id: 1- old_status_id: 4- id: 16- type_id: 1-workflows_042:- new_status_id: 2- role_id: 2- old_status_id: 3- id: 42- type_id: 1-workflows_231:- new_status_id: 1- role_id: 2- old_status_id: 5- id: 231- type_id: 3-workflows_070:- new_status_id: 6- role_id: 3- old_status_id: 2- id: 70- type_id: 1-workflows_124:- new_status_id: 5- role_id: 2- old_status_id: 1- id: 124- type_id: 2-workflows_150:- new_status_id: 5- role_id: 2- old_status_id: 6- id: 150- type_id: 2-workflows_205:- new_status_id: 6- role_id: 1- old_status_id: 5- id: 205- type_id: 3-workflows_017:- new_status_id: 2- role_id: 1- old_status_id: 4- id: 17- type_id: 1-workflows_043:- new_status_id: 4- role_id: 2- old_status_id: 3- id: 43- type_id: 1-workflows_232:- new_status_id: 2- role_id: 2- old_status_id: 5- id: 232- type_id: 3-workflows_125:- new_status_id: 6- role_id: 2- old_status_id: 1- id: 125- type_id: 2-workflows_151:- new_status_id: 2- role_id: 3- old_status_id: 1- id: 151- type_id: 2-workflows_206:- new_status_id: 1- role_id: 1- old_status_id: 6- id: 206- type_id: 3-workflows_018:- new_status_id: 3- role_id: 1- old_status_id: 4- id: 18- type_id: 1-workflows_044:- new_status_id: 5- role_id: 2- old_status_id: 3- id: 44- type_id: 1-workflows_071:- new_status_id: 1- role_id: 3- old_status_id: 3- id: 71- type_id: 1-workflows_233:- new_status_id: 3- role_id: 2- old_status_id: 5- id: 233- type_id: 3-workflows_126:- new_status_id: 1- role_id: 2- old_status_id: 2- id: 126- type_id: 2-workflows_152:- new_status_id: 3- role_id: 3- old_status_id: 1- id: 152- type_id: 2-workflows_207:- new_status_id: 2- role_id: 1- old_status_id: 6- id: 207- type_id: 3-workflows_019:- new_status_id: 5- role_id: 1- old_status_id: 4- id: 19- type_id: 1-workflows_045:- new_status_id: 6- role_id: 2- old_status_id: 3- id: 45- type_id: 1-workflows_260:- new_status_id: 6- role_id: 3- old_status_id: 4- id: 260- type_id: 3-workflows_234:- new_status_id: 4- role_id: 2- old_status_id: 5- id: 234- type_id: 3-workflows_127:- new_status_id: 3- role_id: 2- old_status_id: 2- id: 127- type_id: 2-workflows_153:- new_status_id: 4- role_id: 3- old_status_id: 1- id: 153- type_id: 2-workflows_180:- new_status_id: 5- role_id: 3- old_status_id: 6- id: 180- type_id: 2-workflows_208:- new_status_id: 3- role_id: 1- old_status_id: 6- id: 208- type_id: 3-workflows_046:- new_status_id: 1- role_id: 2- old_status_id: 4- id: 46- type_id: 1-workflows_072:- new_status_id: 2- role_id: 3- old_status_id: 3- id: 72- type_id: 1-workflows_261:- new_status_id: 1- role_id: 3- old_status_id: 5- id: 261- type_id: 3-workflows_235:- new_status_id: 6- role_id: 2- old_status_id: 5- id: 235- type_id: 3-workflows_154:- new_status_id: 5- role_id: 3- old_status_id: 1- id: 154- type_id: 2-workflows_181:- new_status_id: 2- role_id: 1- old_status_id: 1- id: 181- type_id: 3-workflows_209:- new_status_id: 4- role_id: 1- old_status_id: 6- id: 209- type_id: 3-workflows_047:- new_status_id: 2- role_id: 2- old_status_id: 4- id: 47- type_id: 1-workflows_073:- new_status_id: 4- role_id: 3- old_status_id: 3- id: 73- type_id: 1-workflows_128:- new_status_id: 4- role_id: 2- old_status_id: 2- id: 128- type_id: 2-workflows_262:- new_status_id: 2- role_id: 3- old_status_id: 5- id: 262- type_id: 3-workflows_236:- new_status_id: 1- role_id: 2- old_status_id: 6- id: 236- type_id: 3-workflows_155:- new_status_id: 6- role_id: 3- old_status_id: 1- id: 155- type_id: 2-workflows_048:- new_status_id: 3- role_id: 2- old_status_id: 4- id: 48- type_id: 1-workflows_074:- new_status_id: 5- role_id: 3- old_status_id: 3- id: 74- type_id: 1-workflows_129:- new_status_id: 5- role_id: 2- old_status_id: 2- id: 129- type_id: 2-workflows_263:- new_status_id: 3- role_id: 3- old_status_id: 5- id: 263- type_id: 3-workflows_237:- new_status_id: 2- role_id: 2- old_status_id: 6- id: 237- type_id: 3-workflows_182:- new_status_id: 3- role_id: 1- old_status_id: 1- id: 182- type_id: 3-workflows_049:- new_status_id: 5- role_id: 2- old_status_id: 4- id: 49- type_id: 1-workflows_075:- new_status_id: 6- role_id: 3- old_status_id: 3- id: 75- type_id: 1-workflows_156:- new_status_id: 1- role_id: 3- old_status_id: 2- id: 156- type_id: 2-workflows_264:- new_status_id: 4- role_id: 3- old_status_id: 5- id: 264- type_id: 3-workflows_238:- new_status_id: 3- role_id: 2- old_status_id: 6- id: 238- type_id: 3-workflows_183:- new_status_id: 4- role_id: 1- old_status_id: 1- id: 183- type_id: 3-workflows_076:- new_status_id: 1- role_id: 3- old_status_id: 4- id: 76- type_id: 1-workflows_157:- new_status_id: 3- role_id: 3- old_status_id: 2- id: 157- type_id: 2-workflows_265:- new_status_id: 6- role_id: 3- old_status_id: 5- id: 265- type_id: 3-workflows_239:- new_status_id: 4- role_id: 2- old_status_id: 6- id: 239- type_id: 3-workflows_077:- new_status_id: 2- role_id: 3- old_status_id: 4- id: 77- type_id: 1-workflows_158:- new_status_id: 4- role_id: 3- old_status_id: 2- id: 158- type_id: 2-workflows_184:- new_status_id: 5- role_id: 1- old_status_id: 1- id: 184- type_id: 3-workflows_266:- new_status_id: 1- role_id: 3- old_status_id: 6- id: 266- type_id: 3-workflows_078:- new_status_id: 3- role_id: 3- old_status_id: 4- id: 78- type_id: 1-workflows_159:- new_status_id: 5- role_id: 3- old_status_id: 2- id: 159- type_id: 2-workflows_185:- new_status_id: 6- role_id: 1- old_status_id: 1- id: 185- type_id: 3-workflows_267:- new_status_id: 2- role_id: 3- old_status_id: 6- id: 267- type_id: 3-workflows_079:- new_status_id: 5- role_id: 3- old_status_id: 4- id: 79- type_id: 1-workflows_186:- new_status_id: 1- role_id: 1- old_status_id: 2- id: 186- type_id: 3-workflows_268:- new_status_id: 3- role_id: 3- old_status_id: 6- id: 268- type_id: 3-workflows_187:- new_status_id: 3- role_id: 1- old_status_id: 2- id: 187- type_id: 3-workflows_269:- new_status_id: 4- role_id: 3- old_status_id: 6- id: 269- type_id: 3-workflows_188:- new_status_id: 4- role_id: 1- old_status_id: 2- id: 188- type_id: 3diff --git a/spec_legacy/functional/workflows_controller_spec.rb b/spec_legacy/functional/workflows_controller_spec.rbdeleted file mode 100644index 45107145c48..00000000000--- a/spec_legacy/functional/workflows_controller_spec.rb+++ /dev/null@@ -1,140 +0,0 @@-#-- copyright-# OpenProject is an open source project management software.-# Copyright (C) 2012-2022 the OpenProject GmbH-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License version 3.-#-# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-# Copyright (C) 2006-2013 Jean-Philippe Lang-# Copyright (C) 2010-2013 the ChiliProject Team-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License-# as published by the Free Software Foundation; either version 2-# of the License, or (at your option) any later version.-#-# This program is distributed in the hope that it will be useful,-# but WITHOUT ANY WARRANTY; without even the implied warranty of-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-# GNU General Public License for more details.-#-# You should have received a copy of the GNU General Public License-# along with this program; if not, write to the Free Software-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.-#-# See COPYRIGHT and LICENSE files for more details.-#++-require_relative '../legacy_spec_helper'-require 'workflows_controller'--describe WorkflowsController, type: :controller do- render_views-- fixtures :all-- before do- User.current = nil- session[:user_id] = 1 # admin- end-- it 'gets edit' do- get :edit- assert_response :success- assert_template 'edit'- refute_nil assigns(:roles)- refute_nil assigns(:types)- end-- it 'gets edit with role and type' do- Workflow.delete_all- Workflow.create!(role_id: 1, type_id: 1, old_status_id: 2, new_status_id: 3)- Workflow.create!(role_id: 2, type_id: 1, old_status_id: 3, new_status_id: 5)-- get :edit, params: { role_id: 2, type_id: 1 }- assert_response :success- assert_template 'edit'-- # used status only- refute_nil assigns(:statuses)- assert_equal [2, 3, 5], assigns(:statuses).map(&:id)-- # allowed transitions- assert_select 'input', attributes: { type: 'checkbox',- name: 'status[3][5][]',- value: 'always',- checked: 'checked' }- # not allowed- assert_select 'input', attributes: { type: 'checkbox',- name: 'status[3][2][]',- value: 'always',- checked: nil }- # unused- assert_select('input', { attributes: { type: 'checkbox',- name: 'status[1][1][]' } }, false)- end-- it 'gets edit with role and type and all statuses' do- Workflow.delete_all-- get :edit, params: { role_id: 2, type_id: 1, used_statuses_only: '0' }- assert_response :success- assert_template 'edit'-- refute_nil assigns(:statuses)- assert_equal Status.count, assigns(:statuses).size-- assert_select 'input', attributes: { type: 'checkbox',- name: 'status[1][1][]',- value: 'always',- checked: nil }- end-- it 'gets copy' do- get :copy- assert_response :success- assert_template 'copy'- end-- it 'posts copy one to one' do- source_transitions = status_transitions(type_id: 1, role_id: 2)-- post :copy, params: { source_type_id: '1', source_role_id: '2',- target_type_ids: ['3'], target_role_ids: ['1'] }- assert_response 302- assert_equal source_transitions, status_transitions(type_id: 3, role_id: 1)- end-- it 'posts copy one to many' do- source_transitions = status_transitions(type_id: 1, role_id: 2)-- post :copy, params: { source_type_id: '1', source_role_id: '2',- target_type_ids: ['2', '3'], target_role_ids: ['1', '3'] }- assert_response 302- assert_equal source_transitions, status_transitions(type_id: 2, role_id: 1)- assert_equal source_transitions, status_transitions(type_id: 3, role_id: 1)- assert_equal source_transitions, status_transitions(type_id: 2, role_id: 3)- assert_equal source_transitions, status_transitions(type_id: 3, role_id: 3)- end-- it 'posts copy many to many' do- source_t2 = status_transitions(type_id: 2, role_id: 2)- source_t3 = status_transitions(type_id: 3, role_id: 2)-- post :copy, params: { source_type_id: 'any', source_role_id: '2',- target_type_ids: ['2', '3'], target_role_ids: ['1', '3'] }- assert_response 302- assert_equal source_t2, status_transitions(type_id: 2, role_id: 1)- assert_equal source_t3, status_transitions(type_id: 3, role_id: 1)- assert_equal source_t2, status_transitions(type_id: 2, role_id: 3)- assert_equal source_t3, status_transitions(type_id: 3, role_id: 3)- end-- # Returns an array of status transitions that can be compared- def status_transitions(conditions)- Workflow- .where(conditions)- .order(Arel.sql('type_id, role_id, old_status_id, new_status_id'))- .map { |w| [w.old_status, w.new_status_id] }- end-end