Rest IssueJournals » History » Version 2
Charles Goyard, 2018-01-15 23:38
1 | 1 | Emmanuel Bourgerie | h1. Rest Issue journals |
---|---|---|---|
2 | |||
3 | {{>toc}} |
||
4 | |||
5 | h2. Including journals in issue display |
||
6 | |||
7 | As usual, can be done via XML or JSON. Responses examples are provided for XML. |
||
8 | |||
9 | <pre> |
||
10 | GET /issues/[id].xml?include=journals |
||
11 | GET /issues/[id].json?include=journals |
||
12 | </pre> |
||
13 | |||
14 | +Response+ |
||
15 | <pre> |
||
16 | <issue> |
||
17 | <id>1</id> |
||
18 | <project name="Redmine" id="1"/> |
||
19 | <tracker name="Defect" id="1"/> |
||
20 | |||
21 | [...] |
||
22 | |||
23 | <journals type="array"> |
||
24 | <journal id="1"> |
||
25 | <user name="Jean-Philippe Lang" id="1"/> |
||
26 | <notes>Fixed in Revision 128</notes> |
||
27 | <created_on>2007-01-01T05:21:00+01:00</created_on> |
||
28 | <details type="array"/> |
||
29 | </journal> |
||
30 | |||
31 | [...] |
||
32 | |||
33 | <journal id="10531"> |
||
34 | <user name="efgh efgh" id="7384"/> |
||
35 | <notes/> |
||
36 | <created_on>2009-08-13T11:33:17+02:00</created_on> |
||
37 | <details type="array"> |
||
38 | <detail property="attr" name="status_id"> |
||
39 | <old_value>5</old_value> |
||
40 | <new_value>8</new_value> |
||
41 | </detail> |
||
42 | </details> |
||
43 | </journal> |
||
44 | |||
45 | [...] |
||
46 | |||
47 | </journals> |
||
48 | </issue> |
||
49 | </pre> |
||
50 | This example shows two common journal entries : one with a note (=a comment) and the other with a property value. |
||
51 | |||
52 | h2. Updating an issue |
||
53 | |||
54 | 2 | Charles Goyard | h3. Adding a note |
55 | |||
56 | To add a note to the journal entries, you can update the issue with data consisting of only a note. |
||
57 | |||
58 | +Examples:+ |
||
59 | |||
60 | <pre> |
||
61 | PUT /issues/[id].xml |
||
62 | <issue> |
||
63 | <notes> |
||
64 | Fixed in Revision 128 |
||
65 | </notes> |
||
66 | </issue> |
||
67 | </pre> |
||
68 | <pre> |
||
69 | PUT /issues/[id].json |
||
70 | { |
||
71 | "issue": { |
||
72 | "notes": "Fixed in Revision 128" |
||
73 | } |
||
74 | } |
||
75 | </pre> |