Project

General

Profile

Actions

Defect #11362

closed

Redmine API - "Title Version Type is not included in the list"

Added by Michael Bisbjerg almost 13 years ago. Updated almost 13 years ago.

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

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

We had to map a series of values in our Redmine installation for all our issues. I opted to write a small script to simply iterate, map and call the XML api to set the issues to their new values.

Sometimes however, I got a response like this (HTTP Status Code 422):

<?xml version="1.0" encoding="UTF-8"?>
<errors>
  <error>Title Version Type is not included in the list</error>
</errors>

I called the API like this:

<?xml version="1.0" encoding="utf-8"?>
<issue>
<custom_field_values>
<3>Utilities &gt;&gt; Various</3>
</custom_field_values>
</issue>

(Which btw. is invalid XML as pr. issue #6345, but the docs don't explain how to do it otherwise)


I called the API a total of roughly 470 times, and 80 or so failed with the above error.
Sometimes, I would notice two calls, exactly alike (setting the same new value), where one would give the error - and the other wouldn't.

Actions #1

Updated by Michael Bisbjerg almost 13 years ago

I also tried using this XML from #8698, which seems to work when I try it - but not in the 80~ish issues which also failed previously. It gives the same error.

<?xml version="1.0" encoding="ISO-8859-1" ?>
<issue>
  <custom_fields type="array">
    <custom_field>
      <id>3</id>
      <value>Utilities &gt;&gt; Various</value>
    </custom_field>
  </custom_fields>
</issue>
Actions #2

Updated by Etienne Massip almost 13 years ago

How do you issue the request?

Actions #3

Updated by Michael Bisbjerg almost 13 years ago

A various number of ways.
The HTTP debugger Fiddler, http://fiddler2.com/fiddler2/
C# Programming language

Always a PUT request, other methods are disallowed (Gives 405's if I remember correctly.)

Actions #4

Updated by Etienne Massip almost 13 years ago

If you're trying to update an issue then you should probably send updated issue_id?

Actions #5

Updated by Michael Bisbjerg almost 13 years ago

Is that necessary if I'm PUT'ing against:
http://site.com/issues/[id].xml?

I thought the ID was implicit then.
If I provide the ID I could've just posted to:
http://site.com/issues.xml?

Some better docs on XML updating would be awesome. Is there are more comprehensive guide than that available here: http://www.redmine.org/projects/redmine/wiki/Rest_Issues#Using-XML ?

Actions #6

Updated by Etienne Massip almost 13 years ago

Michael Bisbjerg wrote:

Is that necessary if I'm PUT'ing against:
http://site.com/issues/[id].xml?

No, indeed, please forget about my stupid comment.

Actions #7

Updated by Etienne Massip almost 13 years ago

Is that possible that you have just added a required custom field which you need to supply a value for?

Actions #8

Updated by Michael Bisbjerg almost 13 years ago

But if the issue already exists, the field must have been filled out - right?
Then again, I've noticed fields being magically set when I update other fields - as the UI doesn't allow for these fields not to be filled out, and thus assumes some 'default' value.

Has anyone noticed the error:
"Title Version Type is not included in the list"

Before?

Actions #9

Updated by Etienne Massip almost 13 years ago

Michael Bisbjerg wrote:

But if the issue already exists, the field must have been filled out - right?

Well, not if you just added them.

As a final thought, I'd go for a plugin issue if you have any installed?

Actions #10

Updated by Michael Bisbjerg almost 13 years ago

Ah, right. There are people constantly changing this system at my office.
I'd love to have some better error messages though ;)

Actions #11

Updated by Jean-Philippe Lang almost 13 years ago

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

Also available in: Atom PDF