Vote #68076
完了xml used by rest API is invalid
0%
説明
The xml format used by REST API to insert a bug seem to be invalid. In forum page : http://www.redmine.org/boards/2/topics/17070 an example show the following :
1 1 test2 desc1gsdfgsdg <1>test1>
Except that this XML code is invalid. Indeed:
http://www.w3.org/TR/2008/REC-xml-20081126/#NT-NameStartChar
specify that every node should start by a char within :
NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]
The result is that you cannot generate xml with DOM API. Currently, I use DOM but with a very bad workaround :
$aElem = $aXmlDoc->createElement("_TOREMOVE_1"); (...) $aXmlOut = str_replace("_TOREMOVE_","",$aXmlDoc->saveXML($aRoot));
Can you try to fix it ?
journals
any update to this?
--------------------------------------------------------------------------------
Fixed in r4481. You can now use the piece of xml that the API returns to update custom fields:
<pre>
<custom_fields>
<custom_field id="1">
<value>Foo</value>
</custom_field>
...
</custom_fields>
</pre>
--------------------------------------------------------------------------------
If #6403 needed to be scheduled for 1.1.0, Shouldn't this issue be to 1.1.0 too?
--------------------------------------------------------------------------------
You're right. No feedback, I think it can wait 1.1.
--------------------------------------------------------------------------------
The Example is bad, good one :
<pre>
<custom_fields type="array">
<custom_field id="1">
<value>Foo</value>
</custom_field>
...
</custom_fields>
</pre>
--------------------------------------------------------------------------------
I just tried the following input
<pre>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<issue>
<id>3273</id>
<subject>ch.elexis.base.ch.legacy.feature.feature.group</subject>
<description/>
<start_date>2014-08-20T00:00:00+02:00</start_date>
<project_id>0</project_id>
<tracker_id>0</tracker_id>
<custom_fields type="array">
<custom_field id="2" name="Abostatus">
<value>EXPIRED</value>
</custom_field>
</custom_fields>
<project id="3" name="Praxis Dr. Mustermann"/>
<tracker id="4" name="Service"/>
</issue>
</pre>
where the custom field is an enumeration, the value however is not updated to the provided EXPIRED.
This is Redmine 2.4.3.stable
--------------------------------------------------------------------------------
Marco Descher wrote:
> I just tried the following input
>
> [...]
>
> where the custom field is an enumeration, the value however is not updated to the provided EXPIRED.
>
> This is Redmine 2.4.3.stable
FTR:
#17760
--------------------------------------------------------------------------------