Skip to content

Commit

Permalink
Merge pull request #12 from maedadev/feature_62638
Browse files Browse the repository at this point in the history
mark the SQL portion as 'not danger'
  • Loading branch information
fuminori-ido-m authored Aug 21, 2022
2 parents 6aa02af + 267c215 commit 4de6d5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/models/rb_sprint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ def start_and_end_dates

def self.by_date_clause
dir = Backlogs.setting[:sprint_sort_order] == 'desc' ? 'DESC' : 'ASC'
Arel.sql(
"CASE #{table_name}.sprint_start_date WHEN NULL THEN 1 ELSE 0 END #{dir},
#{table_name}.sprint_start_date #{dir},
CASE #{table_name}.effective_date WHEN NULL THEN 1 ELSE 0 END #{dir},
#{table_name}.effective_date #{dir}"
)
end
scope :by_date, -> { order(by_date_clause) }
scope :in_project, lambda {|project| where(:project_id => project) }
Expand Down
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
name 'Redmine Backlogs'
author "friflaj,Mark Maglana,John Yani,mikoto20000,Frank Blendinger,Bo Hansen,stevel,Patrick Atamaniuk"
description 'A plugin for agile teams'
version 'v1.4.1'
version 'v1.4.2'

settings :default => {
:story_trackers => nil,
Expand Down

0 comments on commit 4de6d5c

Please sign in to comment.