Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
a7567ca1
Commit
a7567ca1
authored
Jan 23, 2016
by
Oliver Rogers
Committed by
Rémy Coutable
Feb 10, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix milestone order in project and issue edit lists to due_date
parent
fd1a68d4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
12 deletions
+10
-12
CHANGELOG
CHANGELOG
+1
-0
app/controllers/projects/milestones_controller.rb
app/controllers/projects/milestones_controller.rb
+6
-5
app/helpers/issues_helper.rb
app/helpers/issues_helper.rb
+3
-3
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+0
-4
No files found.
CHANGELOG
View file @
a7567ca1
...
@@ -51,6 +51,7 @@ v 8.4.4
...
@@ -51,6 +51,7 @@ v 8.4.4
- Update omniauth-saml gem to 1.4.2
- Update omniauth-saml gem to 1.4.2
- Prevent long-running backup tasks from timing out the database connection
- Prevent long-running backup tasks from timing out the database connection
- Add a Project setting to allow guests to view build logs (defaults to true)
- Add a Project setting to allow guests to view build logs (defaults to true)
- Sort project milestones by due date including issue editor (Oliver Rogers / Orih)
v 8.4.3
v 8.4.3
- Increase lfs_objects size column to 8-byte integer to allow files larger
- Increase lfs_objects size column to 8-byte integer to allow files larger
...
...
app/controllers/projects/milestones_controller.rb
View file @
a7567ca1
...
@@ -11,10 +11,11 @@ class Projects::MilestonesController < Projects::ApplicationController
...
@@ -11,10 +11,11 @@ class Projects::MilestonesController < Projects::ApplicationController
respond_to
:html
respond_to
:html
def
index
def
index
@milestones
=
case
params
[
:state
]
@milestones
=
when
'all'
;
@project
.
milestones
.
order
(
"state, due_date DESC"
)
case
params
[
:state
]
when
'closed'
;
@project
.
milestones
.
closed
.
order
(
"due_date DESC"
)
when
'all'
then
@project
.
milestones
.
reorder
(
due_date: :desc
,
title: :asc
)
else
@project
.
milestones
.
active
.
order
(
"due_date ASC"
)
when
'closed'
then
@project
.
milestones
.
closed
.
reorder
(
due_date: :desc
,
title: :asc
)
else
@project
.
milestones
.
active
.
reorder
(
due_date: :asc
,
title: :asc
)
end
end
@milestones
=
@milestones
.
includes
(
:project
)
@milestones
=
@milestones
.
includes
(
:project
)
...
...
app/helpers/issues_helper.rb
View file @
a7567ca1
...
@@ -44,14 +44,14 @@ module IssuesHelper
...
@@ -44,14 +44,14 @@ module IssuesHelper
end
end
def
bulk_update_milestone_options
def
bulk_update_milestone_options
milestones
=
project_active_milestones
.
to_a
milestones
=
@project
.
milestones
.
active
.
reorder
(
due_date: :asc
,
title: :asc
)
.
to_a
milestones
.
unshift
(
Milestone
::
None
)
milestones
.
unshift
(
Milestone
::
None
)
options_from_collection_for_select
(
milestones
,
'id'
,
'title'
,
params
[
:milestone_id
])
options_from_collection_for_select
(
milestones
,
'id'
,
'title'
,
params
[
:milestone_id
])
end
end
def
milestone_options
(
object
)
def
milestone_options
(
object
)
milestones
=
object
.
project
.
milestones
.
active
.
to_a
milestones
=
object
.
project
.
milestones
.
active
.
reorder
(
due_date: :asc
,
title: :asc
).
to_a
milestones
.
unshift
(
Milestone
::
None
)
milestones
.
unshift
(
Milestone
::
None
)
options_from_collection_for_select
(
milestones
,
'id'
,
'title'
,
object
.
milestone_id
)
options_from_collection_for_select
(
milestones
,
'id'
,
'title'
,
object
.
milestone_id
)
...
...
app/helpers/projects_helper.rb
View file @
a7567ca1
...
@@ -98,10 +98,6 @@ module ProjectsHelper
...
@@ -98,10 +98,6 @@ module ProjectsHelper
project_nav_tabs
.
include?
name
project_nav_tabs
.
include?
name
end
end
def
project_active_milestones
@project
.
milestones
.
active
.
order
(
"due_date, title ASC"
)
end
def
project_for_deploy_key
(
deploy_key
)
def
project_for_deploy_key
(
deploy_key
)
if
deploy_key
.
projects
.
include?
(
@project
)
if
deploy_key
.
projects
.
include?
(
@project
)
@project
@project
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment