Non-active workflows are now not checked for syntax. Now you can import non-valid (for your Redmine instance for example) workflow, make changes to it and then activate.

This commit is contained in:
Anton Argirov 2015-07-09 14:23:01 +06:00
parent 634cd4a6ff
commit 5696947246
2 changed files with 7 additions and 4 deletions

View File

@ -66,9 +66,12 @@ class CustomWorkflowsController < ApplicationController
def change_status
respond_to do |format|
@workflow.update_attributes(:active => params[:active])
if @workflow.update_attributes(:active => params[:active])
flash[:notice] = l(:notice_successful_status_change)
format.html { redirect_to(custom_workflows_path) }
else
format.html { render :action => :edit }
end
end
end

View File

@ -107,7 +107,7 @@ class CustomWorkflow < ActiveRecord::Base
end
def validate_syntax
return unless respond_to? :observable
return unless respond_to?(:observable) && active?
case observable
when 'shared'
CustomWorkflow.run_shared_code(self)