Commit c391a72c authored by Felipe Artur's avatar Felipe Artur

Fix issue being ordered twice and callback when moving between states

parent 88c9a057
...@@ -92,6 +92,7 @@ v 8.9.0 ...@@ -92,6 +92,7 @@ v 8.9.0
- Links from a wiki page to other wiki pages should be rewritten as expected - Links from a wiki page to other wiki pages should be rewritten as expected
- Add option to project to only allow merge requests to be merged if the build succeeds (Rui Santos) - Add option to project to only allow merge requests to be merged if the build succeeds (Rui Santos)
- Added navigation shortcuts to the project pipelines, milestones, builds and forks page. !4393 - Added navigation shortcuts to the project pipelines, milestones, builds and forks page. !4393
- Fix changing issue state columns in milestone view
- Fix issues filter when ordering by milestone - Fix issues filter when ordering by milestone
- Disable SAML account unlink feature - Disable SAML account unlink feature
- Added artifacts:when to .gitlab-ci.yml - this requires GitLab Runner 1.3 - Added artifacts:when to .gitlab-ci.yml - this requires GitLab Runner 1.3
......
...@@ -81,8 +81,9 @@ class @Milestone ...@@ -81,8 +81,9 @@ class @Milestone
stop: (event, ui) -> stop: (event, ui) ->
$(".issues-sortable-list").css "min-height", "0px" $(".issues-sortable-list").css "min-height", "0px"
update: (event, ui) -> update: (event, ui) ->
data = $(this).sortable("serialize") if this == ui.item.parent()[0]
Milestone.sortIssues(data) data = $(this).sortable("serialize")
Milestone.sortIssues(data)
receive: (event, ui) -> receive: (event, ui) ->
new_state = $(this).data('state') new_state = $(this).data('state')
......
...@@ -116,7 +116,7 @@ class Projects::IssuesController < Projects::ApplicationController ...@@ -116,7 +116,7 @@ class Projects::IssuesController < Projects::ApplicationController
end end
end end
format.json do format.json do
render json: @issue.to_json(include: { milestone: {}, assignee: { methods: :avatar_url }, labels: { methods: :text_color } }) render json: @issue.to_json(include: { milestone: {}, assignee: { methods: :avatar_url }, labels: { methods: :text_color } }, methods: :saved)
end end
end end
end end
......
...@@ -190,4 +190,8 @@ class Issue < ActiveRecord::Base ...@@ -190,4 +190,8 @@ class Issue < ActiveRecord::Base
def overdue? def overdue?
due_date.try(:past?) || false due_date.try(:past?) || false
end end
def saved
valid?
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment