banner_top.png
For one week only get 30% off all RedmineUP plugins
Offer ends in

For one week only get 30% off all RedmineUP plugins

How to print Issues that are sorted by due date?

This article will show you an example of how to print Issues that are sorted by the due date.

<h4>Ascending sort</h4>
{% assign issues_by_due_date = issues.all | sort: "due_date" %}
<table>
<tr><th>id</th><th>subject</th><th>due_date</th></tr>
{% for issue in issues_by_due_date %}
  <tr>
    <td>{{ issue.id }}</td>
    <td>{{ issue.subject }}</td>
    <td>{{ issue.due_date }}</td>
  </tr>
{% endfor %}
</table>

<br>

<h4>Descending sort</h4>
{% assign issues_by_due_date = issues.all | sort: "due_date" | reverse %}
<table>
<tr><th>id</th><th>subject</th><th>due_date</th></tr>
{% for issue in issues_by_due_date %}
  <tr>
    <td>{{ issue.id }}</td>
    <td>{{ issue.subject }}</td>
    <td>{{ issue.due_date }}</td>
  </tr>
{% endfor %}
</table>

And the result is:

issues_printed_due_date.png

Video demonstration

Was this article helpful? Yes  No
212 from 244 found this helpful