プロジェクト

全般

プロフィール

Vote #71207

完了

Rest API - Create Version -> Internal server error 500

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
急いで
担当者:
-
カテゴリ:
REST API_32
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
32
version_id:
41
issue_org_id:
10013
author_id:
47998
assigned_to_id:
0
comments:
3
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
36
ステータス-->[Closed]

説明

I'm trying to create new version in project using Rest API using C# code:

Uri address = new Uri("http://myredmineserver/projects/test/versions.xml?key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");

      WebRequest request = WebRequest.Create(address);
      request.Method = "POST";
      string xml =
        "\n" +
          "\n" +
          "\n" +
          "1.0.0.10\n" +
          "2012-01-16\n" +
          "test test\n" +
          "";
      byte[] byteArray = Encoding.UTF8.GetBytes(xml);
      request.ContentType = "application/xml";
      request.ContentLength = byteArray.Length;
      Stream dataStream = request.GetRequestStream();
      dataStream.Write(byteArray, 0, byteArray.Length);
      dataStream.Close();
      WebResponse response = request.GetResponse();
      Console.WriteLine(((HttpWebResponse)response).StatusDescription);

I always get error 500: Internal server error.


journals

Using the logs I found problem.

Despite of Rest API documentation (http://www.redmine.org/projects/redmine/wiki/Rest_Versions), parameter "due_date" is wrong. Right name of that parameter is "effective_date".
--------------------------------------------------------------------------------
Fixed in r8686. The due_date attribute is now accepted.
--------------------------------------------------------------------------------
Merged.
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリREST API_32 にセット
  • 対象バージョン1.3.1_41 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0