##// END OF EJS Templates
[#20288] Update styles to match CodeRay 1.1.0 (preserving changes of r10132)....
[#20288] Update styles to match CodeRay 1.1.0 (preserving changes of r10132). This commit updates the CSS styles to match with CodeRay 1.1.0, while it preserves the custom changes applied in r10132. The CSS styles were still based on CodeRay 1.0.6 (included since Redmine 1.4.0) with the custom changes from r10132 (included since Redmine 2.1.0). Redmine 2.3.2 till 2.3.4 came with CodeRay 1.0.9, an upgrade that didn't needed changes in the CSS styles. Starting with 2.4.0 Redmine comes with CodeRay 1.1.0, a minor upgrade that came with new/changed token_kinds and lots of changes in the alpha stylesheet, that in turn is used as a base for Redmine's own CodeRay CSS styles. As such, this upgrade needed CSS stylesheet changes like done before in r7618 and r7623 (for 1.0.0 upgrade) and r9389 (for 1.0.6 upgrade). But these changes, plus an update of the Redmine core documentation that is shipped along the core (wiki_syntax_detailed_[markdown|textile].html), aren't integrated up untill today. Contributed by Mischa The Evil. git-svn-id: http://svn.redmine.org/redmine/trunk@14488 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r14076:2bc5b60f9de7
r14106:6fbb56e55735
Show More
workflow_rule.rb
74 lines | 3.1 KiB | text/x-ruby | RubyLexer
Toshi MARUYAMA
remove trailing white-spaces from app/models/workflow.rb....
r6759 # Redmine - project management software
Jean-Philippe Lang
Copyright update....
r13490 # Copyright (C) 2006-2015 Jean-Philippe Lang
Jean-Philippe Lang
added svn:eol-style native property on /app files...
r330 #
# 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.
Toshi MARUYAMA
remove trailing white-spaces from app/models/workflow.rb....
r6759 #
Jean-Philippe Lang
added svn:eol-style native property on /app files...
r330 # 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.
Toshi MARUYAMA
remove trailing white-spaces from app/models/workflow.rb....
r6759 #
Jean-Philippe Lang
added svn:eol-style native property on /app files...
r330 # 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.
Jean-Philippe Lang
Workflow enhancement: editable and required fields configurable by role, tracker and status (#703, #3521)....
r9794 class WorkflowRule < ActiveRecord::Base
self.table_name = "#{table_name_prefix}workflows#{table_name_suffix}"
Jean-Philippe Lang
added svn:eol-style native property on /app files...
r330 belongs_to :role
Jean-Philippe Lang
Workflow enhancement: editable and required fields configurable by role, tracker and status (#703, #3521)....
r9794 belongs_to :tracker
Jean-Philippe Lang
Removed unneeded :foreign_key option on belongs_to associations....
r13102 belongs_to :old_status, :class_name => 'IssueStatus'
belongs_to :new_status, :class_name => 'IssueStatus'
Jean-Philippe Lang
added svn:eol-style native property on /app files...
r330
Jean-Philippe Lang
Makes new issue initial status settable in workflow (#5816)....
r14076 validates_presence_of :role, :tracker
Jean-Philippe Lang
Merged rails-4.1 branch (#14534)....
r13100 attr_protected :id
Eric Davis
Enhanced the Issue Bulk Copy feature:...
r3008
Jean-Philippe Lang
Adds workflow copy functionality (#1727)....
r3040 # Copies workflows from source to targets
def self.copy(source_tracker, source_role, target_trackers, target_roles)
unless source_tracker.is_a?(Tracker) || source_role.is_a?(Role)
Jean-Philippe Lang
Avoid a ruby warning....
r3078 raise ArgumentError.new("source_tracker or source_role must be specified")
Jean-Philippe Lang
Adds workflow copy functionality (#1727)....
r3040 end
Toshi MARUYAMA
remove trailing white-spaces from app/models/workflow.rb....
r6759
Jean-Philippe Lang
Adds workflow copy functionality (#1727)....
r3040 target_trackers = [target_trackers].flatten.compact
target_roles = [target_roles].flatten.compact
Toshi MARUYAMA
remove trailing white-spaces from app/models/workflow.rb....
r6759
Jean-Philippe Lang
Merged rails-4.1 branch (#14534)....
r13100 target_trackers = Tracker.sorted.to_a if target_trackers.empty?
Jean-Philippe Lang
Don't show roles without issue add/edit permission in workflow setup (#15988)....
r13366 target_roles = Role.all.select(&:consider_workflow?) if target_roles.empty?
Toshi MARUYAMA
remove trailing white-spaces from app/models/workflow.rb....
r6759
Jean-Philippe Lang
Adds workflow copy functionality (#1727)....
r3040 target_trackers.each do |target_tracker|
target_roles.each do |target_role|
copy_one(source_tracker || target_tracker,
source_role || target_role,
target_tracker,
target_role)
end
end
end
Toshi MARUYAMA
remove trailing white-spaces from app/models/workflow.rb....
r6759
Jean-Philippe Lang
Adds workflow copy functionality (#1727)....
r3040 # Copies a single set of workflows from source to target
def self.copy_one(source_tracker, source_role, target_tracker, target_role)
unless source_tracker.is_a?(Tracker) && !source_tracker.new_record? &&
source_role.is_a?(Role) && !source_role.new_record? &&
target_tracker.is_a?(Tracker) && !target_tracker.new_record? &&
target_role.is_a?(Role) && !target_role.new_record?
Toshi MARUYAMA
remove trailing white-spaces from app/models/workflow.rb....
r6759
Jean-Philippe Lang
Adds workflow copy functionality (#1727)....
r3040 raise ArgumentError.new("arguments can not be nil or unsaved objects")
end
Toshi MARUYAMA
remove trailing white-spaces from app/models/workflow.rb....
r6759
Jean-Philippe Lang
Adds workflow copy functionality (#1727)....
r3040 if source_tracker == target_tracker && source_role == target_role
false
else
transaction do
delete_all :tracker_id => target_tracker.id, :role_id => target_role.id
Jean-Philippe Lang
SQLServer: rule is a reserved keyword (#12713)....
r10869 connection.insert "INSERT INTO #{WorkflowRule.table_name} (tracker_id, role_id, old_status_id, new_status_id, author, assignee, field_name, #{connection.quote_column_name 'rule'}, type)" +
" SELECT #{target_tracker.id}, #{target_role.id}, old_status_id, new_status_id, author, assignee, field_name, #{connection.quote_column_name 'rule'}, type" +
Jean-Philippe Lang
Workflow enhancement: editable and required fields configurable by role, tracker and status (#703, #3521)....
r9794 " FROM #{WorkflowRule.table_name}" +
Jean-Philippe Lang
Adds workflow copy functionality (#1727)....
r3040 " WHERE tracker_id = #{source_tracker.id} AND role_id = #{source_role.id}"
end
true
end
end
Jean-Philippe Lang
Initial commit...
r2 end