プロジェクト

全般

プロフィール

Vote #79607

完了

Time logging via commit message does not work when the configured activity has been overridden on the project level

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

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

0%

予定工数:
category_id:
13
version_id:
152
issue_org_id:
29838
author_id:
40856
assigned_to_id:
332
comments:
17
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

This happened with a client at Planio, we came up with the attached patch which fixes the problem by looking up the activity in the activities of the associated issues' project. Test case included to illustrate the problem.

The second patch is just a small refactoring which moves the activity finder to the Project model.


journals

updated version of the second patch, better method name to match the setting
--------------------------------------------------------------------------------

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

--------------------------------------------------------------------------------
The test fails in my environment.

<pre>
Failure:
ChangesetTest#test_ref_keywords_any_with_timelog [test/unit/changeset_test.rb:142]:
Expected false to be truthy.

bin/rails test test/unit/changeset_test.rb:106
</pre>
--------------------------------------------------------------------------------
Removing from 4.1.0 because the test fails.
--------------------------------------------------------------------------------
I just applied both patches to current master and all changeset tests pass. Could you please retry / post some logs?
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Jens Krämer wrote:
> I just applied both patches to current master and all changeset tests pass. Could you please retry / post some logs?

I've added your patches to my Gitlab CI instance used by me to run the tests and it fails only on MySQL: https://gitlab.com/redmine-org/redmine/-/jobs/431381873
Also, the patches introduce a new Rubocop violation that should be fixed: https://gitlab.com/redmine-org/redmine/-/jobs/431381872

You can see the pipeline here: https://gitlab.com/redmine-org/redmine/pipelines/116431745

--------------------------------------------------------------------------------
thats really interesting as I ran my tests against MySQL (5.6) as well. can i see the exact environment in terms of ruby / mysql version somewhere on gitlab?
--------------------------------------------------------------------------------
Jens Krämer wrote:
> thats really interesting as I ran my tests against MySQL (5.6) as well. can i see the exact environment in terms of ruby / mysql version somewhere on gitlab?

Yes, you can see in @.gitlab-ci.yml@:
* ruby version: https://gitlab.com/redmine-org/redmine/-/blob/feature/29838/.gitlab-ci.yml#L1
* mysql version: https://gitlab.com/redmine-org/redmine/-/blob/feature/29838/.gitlab-ci.yml#L18
* postgres version: https://gitlab.com/redmine-org/redmine/-/blob/feature/29838/.gitlab-ci.yml#L26

I use MySQL 5.7 because the same version is used also by the CI system on redmine.org, see [[Continuous_integration]].
--------------------------------------------------------------------------------
turns out it did not have anything to do with the MySQL version, it was just a race condition in the Changeset test suite due to the @commit_logtime_activity_id@ setting sometimes being set from a previous test case. The attached combined patch fixes that and replaces all previous patches.
--------------------------------------------------------------------------------
Jens Krämer wrote:
> turns out it did not have anything to do with the MySQL version, it was just a race condition in the Changeset test suite due to the @commit_logtime_activity_id@ setting sometimes being set from a previous test case. The attached combined patch fixes that and replaces all previous patches.

All tests pass now with the attached patch that fixes a Rubocop offense: https://gitlab.com/redmine-org/redmine/pipelines/116780713
--------------------------------------------------------------------------------

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

--------------------------------------------------------------------------------
Committed the patches. Thank you for detecting and fixing this issue.
--------------------------------------------------------------------------------

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

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

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

  • カテゴリTime tracking_13 にセット
  • 対象バージョン4.2.0_152 にセット

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

いいね!0
いいね!0