mirror of
https://github.com/anteo/redmine_custom_workflows.git
synced 2026-01-26 00:04:20 +00:00
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:
parent
634cd4a6ff
commit
5696947246
@ -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
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user