プロジェクト

全般

プロフィール

Vote #80107

未完了

Tracker status cannot be empty in when processing commit messages

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

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

0%

予定工数:
category_id:
3
version_id:
0
issue_org_id:
31495
author_id:
128416
assigned_to_id:
0
comments:
0
status_id:
1
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
148
ステータス-->[New]

説明

Hello everyone,

we just recently upgraded to Redmine 4.0.3 and face troubles updating our issues with commit messages. We are using the keyword "for" to mark commits that refer to a certain issue - but do not necessarily cause any change in its state (see configuration.png). Therefore, so far we just left the field "Applied status" empty - with this setting, Redmine linked the commit revision to the referenced ticket, but did not change the status at all. That's exactly the bevhaviour we were looking for.

With Redmine 4.x it seems that the "Applied status" is mandatory. When looking into the log, we find the following message:

Issue #13631 could not be saved by changeset 83317: ["Status cannot be blank"]

When digging the problem, we found the following: Redmine applies the changes in app/models/changeset.rb, method fix_issue:


if rule
  issue.assign_attributes rule.slice(*Issue.attribute_names)
end
The thing is that the rule looks as follows:
- keywords: for
  status_id: '0'

The '0' for the status id comes from the Redmine configuration area - if you do not select a status, it will use '0'. When assign_attributes is called with this map, the status is set to @nil@ - causing the problem described above. I checked the Redmine code for 3.x and could not find any changes, so I rather assume that the problem arises from changs to the @assign_attributes@ (from the Active Record libs).

I think it would be the best to not change the status in app/models/changeset.rb, method fix_issue, if the status_id is '0'. I have to admit I am not too familiar with ruby and rails, but removing the field "status_issue" from the "rule" (only when the status is 0) in the fix_issue Method should do the trick.

I have also filed a forum post with more details here: https://www.redmine.org/boards/1/topics/57210


  • Database: MariaDB 10.1.38
  • Ruby: 2.5.1
  • Rails: 5.2.2.1
  • Redmine: 4.0.3
  • SVN: 1.9.7
  • Plugins: ** accept ** clipboard_image_paste ** redmine_checklists ** redmine_contacts ** redmine_issue_templates ** redmine_wiki_html_util

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

  • カテゴリSCM_3 にセット

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

いいね!0
いいね!0