Skip to content

Limitation in creating XML objects. #12

Closed
JonLundy opened this Issue Nov 30, 2011 · 0 comments

2 participants

@JonLundy

I am trying to write an application that works with the RedMine API. I need to be able to send custom fields and the way they are handled are in the format:

<issue>
  <subject>Test</subject>
  <project_id>data</project_id>
  <description>Text</description>
  <custom_fields>
    <custom_field id="1"><value>value</value></custom_field>
    <custom_field id="2"><value>value</value></custom_field>
    <custom_field id="3"><value>value</value></custom_field>
  </custom_fields>
</issue>

If I use the format of having an array of arrays within custom_fields it doesn't pull over the ID for each custom_field.

$issue = array(
  'subject' => 'Test',
  'project_id' => 'data',
  'description' => 'Text',
  'custom_fields => array(
    'custom_field => array(
       array('@id' =>"1", 'value' => 'value'),
       array('@id' =>"2", 'value' => 'value'),
       array('@id' =>"3", 'value' => 'value')
  )
);


@jbroadway jbroadway closed this in b9d238b Dec 7, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.