Project

General

Profile

Issue Journals

Added by Woody Torrez over 13 years ago

does anyone know if it's possible to create/edit/update Issue journals with the use of Redmine's Rest API? If so, can you redirect me to the how-to documentation, thanks in advance.


Replies (7)

RE: Issue Journals - Added by Holger Just over 13 years ago

Issue journals are created automatically when you update existing issues. See Rest_api for examples.

Changing of notes of existing journal entries is currently not exposed via a proper REST interface.

RE: Issue Journals - Added by Woody Torrez over 13 years ago

I do not want to change existing journal notes. What I want to do is add/insert 2 history notes/journals either at the time that I create an Issue...or...after creating the issue, it doesn't matter when as long as I can. For example, can I ADD the following notes to an issue (either at creation time or as an update) with the use of the API?

1. "hello, my name is XXXXX XXXXX"
2. "this is my 2nd note for this issue"

RE: Issue Journals - Added by Holger Just over 13 years ago

Update the issue as you normaly would. If you set the notes attribute and save the issue, it will form the journal note. At least I think so, haven't tested it...

--Holger

RE: Issue Journals - Added by Woody Torrez over 13 years ago

I have tried to set the notes attribute both on a create and an update and neither seem to save the notes/journals/history for the issue via the API. I created a test account on http://demo.redmine.org and have added debug code on my side to spit out the XML that is being sent to redmine just to see if all is ok, and it seems to be.

the following XML is sent to redmine when creating an issue. the issue was created, but it did not have an initial note/history/journal:


<issue>
<project_id>21606</project_id>
<tracker_id>3</tracker_id>
<status_id>1</status_id>
<priority_id>4</priority_id>
<notes>these are my first API notes</notes>
<subject>this is the subject</subject>
</issue>

the following XML is sent to redmine when updating an issue. the issue was updated...the description did change, but the notes/history/journal was not saved:


<issue>
<project name="woodster" id="21606"/>
<tracker name="Support" id="3"/>
<status name="New" id="1"/>
<priority name="Normal" id="4"/>
<author name="woody torrez" id="41876"/>
<subject>this is the subject</subject>
<description>this is my NEW issue description via API...</description>
<start_date>2010-08-11</start_date>
<due_date/>
<done_ratio>0</done_ratio>
<estimated_hours/>
<spent_hours>0.0</spent_hours>
<created_on>Wed Aug 11 19:04:48 -0700 2010</created_on>
<updated_on>Wed Aug 11 19:04:48 -0700 2010</updated_on>
<relations></relations>
<notes>this is my issue notes via API...</notes>
</issue>

does this mean that redmine's current REST API does not support creating/inserting notes on issues?

RE: Issue Journals - Added by Karl-Heinz Nirschl almost 12 years ago

Anyone found out how to do this? Should it be possible?

RE: Issue Journals - Added by Grigory Kirichenko almost 10 years ago

Please write here if something changed to better.

RE: Issue Journals - Added by Charles Goyard about 6 years ago

Hi!

Please write here if something changed to better.

Just found how, I updated the wiki. Here's an example in XML that add a note to an existing issue:

PUT /issues/428.xml
<issue>
    <notes>
        This fixes the problem for me, thank you!
    </notes>
</issue>

When querying with the API, you'll see it alongside the other journals entries, and of course on the web interface.

    (1-7/7)