Feature #42699 » order_the_related_issues_by_status_and_priority.patch
| app/helpers/issues_helper.rb (revision bb52c65232a15875e89705985fa16b7a7b3fecc0) → app/helpers/issues_helper.rb (date 1746804974202) | ||
|---|---|---|
|
def render_issue_relations(issue, relations)
|
||
|
manage_relations = User.current.allowed_to?(:manage_issue_relations, issue.project)
|
||
|
s = ''.html_safe
|
||
|
relations.each do |relation|
|
||
|
# Sort relations by tracker order and then by priority in descending order
|
||
|
sorted_relations = relations.sort_by do |relation|
|
||
|
other_issue = relation.other_issue(issue)
|
||
|
[
|
||
|
other_issue.status.name.downcase, # Sort by status name
|
||
|
-other_issue.priority.position # Use negative value for descending order
|
||
|
]
|
||
|
end
|
||
|
sorted_relations.each do |relation|
|
||
|
other_issue = relation.other_issue(issue)
|
||
|
css = "issue hascontextmenu #{other_issue.css_classes} #{relation.css_classes_for(other_issue)}"
|
||
|
buttons =
|
||