Closed kbagher closed 12 years ago
I'll take a look at this.
I've run into this too.Assume you have a field called OldPriority that you are assigning into your dynamic Issue:
issue.OldPriority = "0.99";
and over the wire: (fiddler)
project=MERC&summary=summary&description=description&assignee=fooPerson&type=Bug&state=New&subsystem=Bunker+-+Screen&oldpriority=0.99
When you fetch the issue back it looks like this:
"field":[{"value":[],"name":"OldPriority"}]
but should look like:
[{"value":["0.99"],"name":"OldPriority"}]
It doesnt seem to matter how you assign OldPriority. this also fails:
issue.OldPriority = new[] { "0.99"};
I'm looking at this.
This is related to this:
http://youtrack.jetbrains.com/issue/JT-10043
Which means, that unfortunately, until that is fixed, we can't set any custom fields without explicit command. Which sucks. :(.
The reason all the other fields work, even though they are custom is because they "shipped" out of the box. So I'm open to suggestions....
One thing might work. Go thru the list of fields and see if they were predefined fields. If so, ignore, if not add to list of fields to set AFTER the issue has been created successfully. Still involves several requests but at least it will be transparent to the user.
OK i've implemented the above and tests seem to work. Please test and if you run into issues reopen. But right now you should be able to add any custom field.
Thanks Hadi
hi, i'v tried several times to create a new issue that contains custom fields but it just won't work. i even tried to get an issue from the YouTrack and use it's object to create a similar one:
but it also won't add any data to the the custom fields.