Removes some empty lines (#14015).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11830 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
cf30a68312
commit
a2b6088772
|
@ -887,10 +887,8 @@ class Issue < ActiveRecord::Base
|
||||||
issue_status[self] = ePROCESS_ALL
|
issue_status[self] = ePROCESS_ALL
|
||||||
|
|
||||||
while (!queue.empty?) do
|
while (!queue.empty?) do
|
||||||
|
|
||||||
current_issue = queue.shift
|
current_issue = queue.shift
|
||||||
current_issue_status = issue_status[current_issue]
|
current_issue_status = issue_status[current_issue]
|
||||||
|
|
||||||
dependencies << current_issue
|
dependencies << current_issue
|
||||||
|
|
||||||
# Add parent to queue, if not already in it.
|
# Add parent to queue, if not already in it.
|
||||||
|
@ -898,26 +896,20 @@ class Issue < ActiveRecord::Base
|
||||||
parentStatus = issue_status[parent]
|
parentStatus = issue_status[parent]
|
||||||
|
|
||||||
if parent && (parentStatus == eNOT_DISCOVERED) && !except.include?(parent)
|
if parent && (parentStatus == eNOT_DISCOVERED) && !except.include?(parent)
|
||||||
|
|
||||||
queue << parent
|
queue << parent
|
||||||
issue_status[parent] = ePROCESS_RELATIONS_ONLY
|
issue_status[parent] = ePROCESS_RELATIONS_ONLY
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Add children to queue, but only if they are not already in it and
|
# Add children to queue, but only if they are not already in it and
|
||||||
# the children of the current node need to be processed.
|
# the children of the current node need to be processed.
|
||||||
if current_issue.children && (current_issue_status == ePROCESS_CHILDREN_ONLY || current_issue_status == ePROCESS_ALL)
|
if current_issue.children && (current_issue_status == ePROCESS_CHILDREN_ONLY || current_issue_status == ePROCESS_ALL)
|
||||||
|
|
||||||
current_issue.children.each do |child|
|
current_issue.children.each do |child|
|
||||||
|
|
||||||
if (issue_status[child] == eNOT_DISCOVERED) && !except.include?(child)
|
if (issue_status[child] == eNOT_DISCOVERED) && !except.include?(child)
|
||||||
queue << child
|
queue << child
|
||||||
issue_status[child] = ePROCESS_ALL
|
issue_status[child] = ePROCESS_ALL
|
||||||
|
|
||||||
elsif (issue_status[child] == eRELATIONS_PROCESSED) && !except.include?(child)
|
elsif (issue_status[child] == eRELATIONS_PROCESSED) && !except.include?(child)
|
||||||
queue << child
|
queue << child
|
||||||
issue_status[child] = ePROCESS_CHILDREN_ONLY
|
issue_status[child] = ePROCESS_CHILDREN_ONLY
|
||||||
|
|
||||||
elsif (issue_status[child] == ePROCESS_RELATIONS_ONLY) && !except.include?(child)
|
elsif (issue_status[child] == ePROCESS_RELATIONS_ONLY) && !except.include?(child)
|
||||||
queue << child
|
queue << child
|
||||||
issue_status[child] = ePROCESS_ALL
|
issue_status[child] = ePROCESS_ALL
|
||||||
|
@ -927,15 +919,12 @@ class Issue < ActiveRecord::Base
|
||||||
|
|
||||||
# Add related issues to the queue, if they are not already in it.
|
# Add related issues to the queue, if they are not already in it.
|
||||||
current_issue.relations_from.map(&:issue_to).each do |relatedIssue|
|
current_issue.relations_from.map(&:issue_to).each do |relatedIssue|
|
||||||
|
|
||||||
if (issue_status[relatedIssue] == eNOT_DISCOVERED) && !except.include?(relatedIssue)
|
if (issue_status[relatedIssue] == eNOT_DISCOVERED) && !except.include?(relatedIssue)
|
||||||
queue << relatedIssue
|
queue << relatedIssue
|
||||||
issue_status[relatedIssue] = ePROCESS_ALL
|
issue_status[relatedIssue] = ePROCESS_ALL
|
||||||
|
|
||||||
elsif (issue_status[relatedIssue] == eRELATIONS_PROCESSED) && !except.include?(relatedIssue)
|
elsif (issue_status[relatedIssue] == eRELATIONS_PROCESSED) && !except.include?(relatedIssue)
|
||||||
queue << relatedIssue
|
queue << relatedIssue
|
||||||
issue_status[relatedIssue] = ePROCESS_CHILDREN_ONLY
|
issue_status[relatedIssue] = ePROCESS_CHILDREN_ONLY
|
||||||
|
|
||||||
elsif (issue_status[relatedIssue] == ePROCESS_RELATIONS_ONLY) && !except.include?(relatedIssue)
|
elsif (issue_status[relatedIssue] == ePROCESS_RELATIONS_ONLY) && !except.include?(relatedIssue)
|
||||||
queue << relatedIssue
|
queue << relatedIssue
|
||||||
issue_status[relatedIssue] = ePROCESS_ALL
|
issue_status[relatedIssue] = ePROCESS_ALL
|
||||||
|
@ -945,11 +934,9 @@ class Issue < ActiveRecord::Base
|
||||||
# Set new status for current issue
|
# Set new status for current issue
|
||||||
if (current_issue_status == ePROCESS_ALL) || (current_issue_status == ePROCESS_CHILDREN_ONLY)
|
if (current_issue_status == ePROCESS_ALL) || (current_issue_status == ePROCESS_CHILDREN_ONLY)
|
||||||
issue_status[current_issue] = eALL_PROCESSED
|
issue_status[current_issue] = eALL_PROCESSED
|
||||||
|
|
||||||
elsif (current_issue_status == ePROCESS_RELATIONS_ONLY)
|
elsif (current_issue_status == ePROCESS_RELATIONS_ONLY)
|
||||||
issue_status[current_issue] = eRELATIONS_PROCESSED
|
issue_status[current_issue] = eRELATIONS_PROCESSED
|
||||||
end
|
end
|
||||||
|
|
||||||
end # while
|
end # while
|
||||||
|
|
||||||
# Remove the issues from the "except" parameter from the result array
|
# Remove the issues from the "except" parameter from the result array
|
||||||
|
|
Loading…
Reference in New Issue