Project

General

Profile

Feature #9364 » limit_sub_issues-redmine-trunk.diff

Gilles Ballanger, 2011-10-02 11:28

View differences:

app/models/query.rb (working copy)
"start_date" => { :type => :date, :order => 11 },
"due_date" => { :type => :date, :order => 12 },
"estimated_hours" => { :type => :float, :order => 13 },
"done_ratio" => { :type => :integer, :order => 14 }}
"done_ratio" => { :type => :integer, :order => 14 },
"limit_sub_level" => { :type => :list, :order => 16, :values => ["0","1","2"]}}
principals = []
if project
......
'(' + sql_for_field("assigned_to_id", operator, members_of_roles, Issue.table_name, "assigned_to_id", false) + ')'
end
def sql_for_limit_sub_level_field(field, operator, value)
sql_for_field = "("
v = value.to_s.to_i
if v >= 0
sql_for_field << "#{Issue.table_name}.parent_id IS NULL "
end
if v >= 1
sql_for_field << "OR #{Issue.table_name}.parent_id IN"
sql_for_field << "( "
sql_for_field << "SELECT #{Issue.table_name}.id "
sql_for_field << "FROM #{Issue.table_name} "
sql_for_field << "WHERE #{Issue.table_name}.parent_id IS NULL"
sql_for_field << ")"
end
if v >= 2
sql_for_field << "OR #{Issue.table_name}.parent_id IN"
sql_for_field << "( "
sql_for_field << "SELECT #{Issue.table_name}.id "
sql_for_field << "FROM #{Issue.table_name} "
sql_for_field << "WHERE #{Issue.table_name}.parent_id IN"
sql_for_field << "( "
sql_for_field << "SELECT #{Issue.table_name}.id "
sql_for_field << "FROM #{Issue.table_name} "
sql_for_field << "WHERE #{Issue.table_name}.parent_id IS NULL"
sql_for_field << ")"
sql_for_field << ")"
end
sql_for_field << ")"
sql_for_field
end
private
def sql_for_custom_field(field, operator, value, custom_field_id)
config/locales/en-GB.yml (working copy)
field_text: Text field
field_visible: Visible
field_warn_on_leaving_unsaved: "Warn me when leaving a page with unsaved text"
field_limit_sub_level: Sub issues limit
setting_app_title: Application title
setting_app_subtitle: Application subtitle
config/locales/en.yml (working copy)
field_root_directory: Root directory
field_cvsroot: CVSROOT
field_cvs_module: Module
field_limit_sub_level: Sub issues limit
setting_app_title: Application title
setting_app_subtitle: Application subtitle
config/locales/fr.yml (working copy)
field_issues_visibility: Visibilité des demandes
field_is_private: Privée
field_commit_logs_encoding: Encodage des messages de commit
field_limit_sub_level: Limite de sous tâche
setting_app_title: Titre de l'application
setting_app_subtitle: Sous-titre de l'application
setting_welcome_text: Texte d'accueil
(2-2/2)