プロジェクト

全般

プロフィール

Vote #81377

完了

API create issue relation method returns undefined method `split' when issue id is sent as integer

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

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

0%

予定工数:
category_id:
32
version_id:
165
issue_org_id:
35039
author_id:
107353
assigned_to_id:
332
comments:
6
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
152
ステータス-->[Closed]

説明

Extracted from #33418#note-20:

hi everyone! I am the owner of redmine-java-api project (https://github.com/taskadapter/redmine-java-api).
I get a server error with Redmine 4.2.0 when trying to create a relation with the request body that previously worked for Redmine 3.x:

{"relation"=>{"issue_to_id"=>576, "relation_type"=>"relates"}, "issue_id"=>"575"}

the error is:

NoMethodError (undefined method `split' for 576:Integer):

because issue_to_id is now expected to be a string with commas, instead of a number.

is this a permanent change or just an experiment? it would be too expensive to maintain compatibility for multiple redmine versions in the java library.


journals

--------------------------------------------------------------------------------
Here is a fix for this with test included. The patch also improve an existing test.

All tests passs: https://gitlab.com/redmine-org/redmine/-/pipelines/281875242
--------------------------------------------------------------------------------
hi Marius! would you also be interested in redmine-java-api library maintenance? feel free to submit PRs at https://github.com/taskadapter/redmine-java-api when Redmine REST API changes.
--------------------------------------------------------------------------------
I had the same error using "python-redmine":https://github.com/maxtepkeev/python-redmine trying to relate two issues in a Bitnami VM with Redmine 4.2.0.
After applying Marius' patch and restarting the VM the error disappears and the relation is created.

Thank you!
--------------------------------------------------------------------------------
Committed the fix. Thank you.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,33418,Bulk addition of related issues

Admin Redmine さんが3年以上前に更新

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

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

いいね!0
いいね!0