Printing Checklist items

Examples

Let's take a look at the following example of printing checklist items via the Reporter plugin.

Note: Please note that for this feature, you have to install the Checklists plugin first.

Firstly, the following checklist items could be seen in a ticket: checklist_items_in_a_ticket.png

The printed checklist items would look like this: printed_checklist_items.png

The used code for the above report is:

<h3 style="color: #4ca76a; padding-bottom: 10px; border-bottom: 2px
solid; margin: 40px 0px 20px;">Checklist</h3> {% for checklist_item in issue.checklists %}
<div class="note">
<em>{{checklist_item.subject}} </em>
</div>
{% endfor %}

And if the task is to display either the particular checklist item is checked or unchecked, then it becomes like this: printer_checklist_items_checked_unchecked.png

Code used:

<h3 style="color: #4ca76a; padding-bottom: 10px; border-bottom: 2px
solid; margin: 40px 0px 20px;">Checklist</h3> {% for checklist_item in issue.checklists %}
<div class="note">
<em>{{checklist_item.subject}} </em>
<em style="color: blue;">, checked (true) or unchecked (false) ---> {{checklist_item.id_done}} </em>
</div>
{% endfor %}

Video demonstration

Was this article helpful? Yes  No
1725 from 1748 found this helpful