Project

General

Profile

Actions

Defect #40145

closed

Custom fields must be passed after project_id in POST issue method API

Added by Pedro Ramos 8 months ago. Updated 8 months ago.

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

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Hi there!

First of all, I'm new in redmine community and it's my first issue. So, in advance, I apologize if I did anything wrong and ask you to gently indicate me the right way of procedures here. (Also, english is not my mother language, so feel free to correct my grammar)

About the possible defect I found:

I'm trying to create new issues using Redmine's REST API, but i noticed a strage behavior. I'm using an old version of Coldfusion and it sorts json attributes alphabetically when serializes. So here is the output that goes to API by ajax post:

{"issue":
{"custom_fields":[{
"id":12.0,
"value":12345.0}],
"tracker_id":1.0,
"description":"description infos",
"project_id":13.0,
"status_id":1.0,
"subject":"subject infos"}}

The strange behavior is, in that config, custom_fields are not being written in issue creation either. In theory, REST APIs should not have sequetial attributes, but it may also be a singularity of this version. I tried it using python requests and had the same behavior.

That's all. I take this opportunity to congratulate the Redmine team and community for the formidable tool that have created.

Name Value
Rails version 5.2.6.3
Ruby version 2.6.10
Redmine version 4.2.5.stable
MySQL version 8.0.28
  1. And have a look at the bug list and the FAQ to see if it has not already been reported?
    • Yes, but did not find any issue related.
  2. Your problem is about scm integration
    • No, it is abou REST API
Actions

Also available in: Atom PDF