Project

General

Profile

Actions

Rest IssueJournals » History » Revision 2

« Previous | Revision 2/4 (diff) | Next »
Charles Goyard, 2018-01-15 23:38


Rest Issue journals

Including journals in issue display

As usual, can be done via XML or JSON. Responses examples are provided for XML.

GET /issues/[id].xml?include=journals
GET /issues/[id].json?include=journals

Response

<issue>
    <id>1</id>
    <project name="Redmine" id="1"/>
    <tracker name="Defect" id="1"/>

    [...]

    <journals type="array">
        <journal id="1">
            <user name="Jean-Philippe Lang" id="1"/>
            <notes>Fixed in Revision 128</notes>
            <created_on>2007-01-01T05:21:00+01:00</created_on>
            <details type="array"/>
        </journal>

        [...]

        <journal id="10531">
            <user name="efgh efgh" id="7384"/>
            <notes/>
            <created_on>2009-08-13T11:33:17+02:00</created_on>
            <details type="array">
                <detail property="attr" name="status_id">
                    <old_value>5</old_value>
                    <new_value>8</new_value>
                </detail>
            </details>
        </journal>

        [...]

    </journals>
</issue>

This example shows two common journal entries : one with a note (=a comment) and the other with a property value.

Updating an issue

Adding a note

To add a note to the journal entries, you can update the issue with data consisting of only a note.

Examples:

PUT /issues/[id].xml
<issue>
    <notes>
        Fixed in Revision 128
    </notes>
</issue>

PUT /issues/[id].json
{
    "issue": {
        "notes": "Fixed in Revision 128" 
    }
}

Updated by Charles Goyard almost 7 years ago · 2 revisions