Project

General

Profile

Actions

Defect #17760

closed

REST API to update custom fields in issues does not work

Added by Marco Descher over 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

I just tried the following input, which returns

Started PUT "/issues/3273.xml?key=asdf" for 23233 at 2014-08-28 10:23:28 +0200
Processing by IssuesController#update as XML
  Parameters: {"issue"=>{"id"=>"3273", "subject"=>"ch.elexis.base.ch.legacy.feature.feature.group", 
"description"=>nil, "start_date"=>"2014-08-20T00:00:00+02:00", "project_id"=>"0", "tracker_id"=>"0", 
"custom_fields"=>[{"id"=>"2", "name"=>"Abostatus", "value"=>"EXPIRED"}], "project"=>{"id"=>"3", 
"name"=>"Praxis Dr. Mustermann"}, "tracker"=>{"id"=>"4", "name"=>"Service"}}, "key"=>"asdf", "id"=>"3273"}
  Current user: mustermann (id=5)
Completed 200 OK in 27.9ms (Views: 0.4ms | ActiveRecord: 3.2ms

yet the value of the custom field in the issue is not changed, here the input


<?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>

The respective field is defined as list with possible values.

Actions #2

Updated by Marco Descher over 10 years ago

Here is the definition of the custom_field

<custom_field>
<id>2</id>
<name>Abostatus</name>
<customized_type>issue</customized_type>
<field_format>list</field_format>
<regexp/>
<min_length/>
<max_length/>
<is_required>true</is_required>
<is_filter>true</is_filter>
<searchable>true</searchable>
<multiple>false</multiple>
<default_value>TRIAL</default_value>
<visible>true</visible>
<possible_values type="array">
  <possible_value><value>TRIAL</value></possible_value>
  <possible_value><value>LICENSED</value></possible_value>
  <possible_value><value>EXPIRED</value></possible_value>
</possible_values>
<trackers><tracker id="4" name="Service"/></trackers>
<roles/>
</custom_field>
Actions #3

Updated by Marco Descher over 10 years ago

  • Status changed from New to Resolved

The issue was related with the access rights! I find it confusing, however, that redmine answered with a simple OK instead of a security related answer.

Actions #4

Updated by Toshi MARUYAMA about 10 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Invalid
Actions

Also available in: Atom PDF