プロジェクト

全般

プロフィール

Vote #75639

未完了

Activity when issue change assigned to.

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

ステータス:
Resolved
優先度:
通常
担当者:
-
カテゴリ:
Activity view_50
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
50
version_id:
32
issue_org_id:
18059
author_id:
112831
assigned_to_id:
0
comments:
8
status_id:
3
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Resolved]

説明

Hi. There is patch to change activity for project. It's will shows you when issue status was changed, assigned_to was changed, and when status and assigned_to was changed together.

I wrote test for this and everything works fine.

See files.


journals

Sory. Now every changes in one diff file.
--------------------------------------------------------------------------------

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

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

--------------------------------------------------------------------------------
* "Now assigned to" should be i18n.
* Asserting string should be literal not variable (e.g. #{User.find(2).name})
* I don't know why you use ".to_s[29..102]" for asserting.
* Please use #{ESCAPED_UCANT} instead of "Can't" for Rails4 porting.
--------------------------------------------------------------------------------
I think this could be an interesting change, so I quick-tested the patch attached in note-1 on a test deployment of Redmine source:/trunk@13432[1]. Besides the points mentioned by Toshi, I have some additional remarks about the patch:
* some existing unit and functional tests need to be adjusted/tested/fixed to match the new fixtures: some tests produce failures currently[2]
* bug/typo (?) in @Journal#event_title@: @data_for_assigned_and_status@ is called without checking if @new_status@ is blank or not
* tests are not covering all cases; previous issue is not covered for example
* we should not have blank event titles (they're occurring eg. when only a note is added): blank event titles can't be clicked obviously
* event titles should be more standardized and consistent

I want to emphasize that I like the idea behind this change, but I think it really needs some improvements before implementation.

Mischa.

fn1. {{collapse(Details about my test environment...)
<pre>
Environment:
OS Ubuntu Server 12.04.5 LTS
Web server Apache 2.2.22
Application server Phusion Passenger 4.0.52, running as Apache module
Database backend MySQL 5.5.38
Redmine version 2.5.2.devel.13432
Ruby version 2.1.2-p95 (2014-05-08) [i686-linux]
Rails version 3.2.19
Environment development
Database adapter Mysql2
SCM:
Subversion 1.6.17
Git 1.7.9.5
Filesystem
Redmine plugins:
no plugin installed
</pre>
}}

fn2. {{collapse(Test suite output (unrelated output omitted)...)
<pre>
Version: ImageMagick 6.6.9-7 2014-03-06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP

(Test LDAP server not configured)
* DEFERRED: MenuManager#current_menu_item should be tested.
* DEFERRED: MenuManager#render_main_menu should be tested.
* DEFERRED: MenuManager#render_menu should be tested.
* DEFERRED: MenuManager#menu_item_and_children should be tested.
* DEFERRED: MenuManager#extract_node_details should be tested.
* DEFERRED: MenuItem#caption should be tested.
* DEFERRED: MenuItem#html_options should be tested.
Bazaar test repository NOT FOUND. Skipping unit tests !!!
Cvs test repository NOT FOUND. Skipping unit tests !!!
Darcs test repository NOT FOUND. Skipping unit tests !!!
Filesystem test repository NOT FOUND. Skipping unit tests !!! See doc/RUNNING_TESTS.
Git test repository NOT FOUND. Skipping unit tests !!!
Mercurial test repository NOT FOUND. Skipping unit tests !!!
Subversion test repository NOT FOUND. Skipping unit tests !!!
Bazaar test repository NOT FOUND. Skipping unit tests !!!
CVS test repository NOT FOUND. Skipping unit tests !!!
Darcs test repository NOT FOUND. Skipping unit tests !!!
Filesystem test repository NOT FOUND. Skipping unit tests !!! See doc/RUNNING_TESTS.
Git test repository NOT FOUND. Skipping unit tests !!!
Mercurial test repository NOT FOUND. Skipping unit tests !!!
Subversion test repository NOT FOUND. Skipping unit tests !!!
Skipping LDAP tests.
Run options:

# Running tests:

[ 480/1822] IssueTest#test_journals_after_should_return_journals_with_gr
1) Failure:
IssueTest#test_journals_after_should_return_journals_with_greater_id [/var/www/redmine-master.local.lan/test/unit/issue_test.rb:2277]:
<[#<Journal id: 2, journalized_id: 1, journalized_type: "Issue", user_id: 2, notes: "Some notes with Redmine links: #2, r2.", created_on: "2014-10-09 22:00:00", private_notes: false>]> expected but was
<[#<Journal id: 2, journalized_id: 1, journalized_type: "Issue", user_id: 2, notes: "Some notes with Redmine links: #2, r2.", created_on: "2014-10-09 22:00:00", private_notes: false>, #<Journal id: 6, journalized_id: 1, journalized_type: "Issue", user_id: 2, notes: "Change Status And Assigned.", created_on: "2014-10-11 22:00:00", private_notes: false>]>.

[ 481/1822] IssueTest#test_journals_after_with_blank_arg_should_return_a
2) Failure:
IssueTest#test_journals_after_with_blank_arg_should_return_all_journals [/var/www/redmine-master.local.lan/test/unit/issue_test.rb:2282]:
<[#<Journal id: 1, journalized_id: 1, journalized_type: "Issue", user_id: 1, notes: "Journal notes", created_on: "2014-10-08 22:00:00", private_notes: false>,
#<Journal id: 2, journalized_id: 1, journalized_type: "Issue", user_id: 2, notes: "Some notes with Redmine links: #2, r2.", created_on: "2014-10-09 22:00:00", private_notes: false>]> expected but was
<[#<Journal id: 1, journalized_id: 1, journalized_type: "Issue", user_id: 1, notes: "Journal notes", created_on: "2014-10-08 22:00:00", private_notes: false>, #<Journal id: 2, journalized_id: 1, journalized_type: "Issue", user_id: 2, notes: "Some notes with Redmine links: #2, r2.", created_on: "2014-10-09 22:00:00", private_notes: false>, #<Journal id: 6, journalized_id: 1, journalized_type: "Issue", user_id: 2, notes: "Change Status And Assigned.", created_on: "2014-10-11 22:00:00", private_notes: false>]>.

[ 482/1822] IssueTest#test_last_journal_id_with_journals_should_return_t
3) Failure:
IssueTest#test_last_journal_id_with_journals_should_return_the_journal_id [/var/www/redmine-master.local.lan/test/unit/issue_test.rb:2269]:
<2> expected but was
<6>.

Finished tests in 229.849145s, 7.9269 tests/s, 54.9012 assertions/s.
1822 tests, 12619 assertions, 3 failures, 0 errors, 0 skips

ruby -v: ruby 2.1.2p95 (2014-05-08 revision 45877) [i686-linux]
Version: ImageMagick 6.6.9-7 2014-03-06 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP

Bazaar test repository NOT FOUND. Skipping functional tests !!!
CVS test repository NOT FOUND. Skipping functional tests !!!
Darcs test repository NOT FOUND. Skipping functional tests !!!
Filesystem test repository NOT FOUND. Skipping functional tests !!!
Git test repository NOT FOUND. Skipping functional tests !!!
Mercurial test repository NOT FOUND. Skipping functional tests !!!
Subversion test repository NOT FOUND. Skipping functional tests !!!
Run options:

# Running tests:

[ 574/1188] IssuesControllerTransactionTest#test_update_stale_issue_shou
1) Failure:
IssuesControllerTransactionTest#test_update_stale_issue_should_show_conflicting_journals [/var/www/redmine-master.local.lan/test/functional/issues_controller_transaction_test.rb:139]:
<1> expected but was
<2>.

[ 580/1188] IssuesControllerTransactionTest#test_update_stale_issue_with
2) Failure:
IssuesControllerTransactionTest#test_update_stale_issue_without_previous_journal_should_show_all_journals [/var/www/redmine-master.local.lan/test/functional/issues_controller_transaction_test.rb:157]:
<2> expected but was
<3>.

Finished tests in 150.648338s, 7.8859 tests/s, 37.6506 assertions/s.
1188 tests, 5672 assertions, 2 failures, 0 errors, 0 skips

ruby -v: ruby 2.1.2p95 (2014-05-08 revision 45877) [i686-linux]
Run options:

# Running tests:

Finished tests in 65.384418s, 15.8295 tests/s, 50.3790 assertions/s.
1035 tests, 3294 assertions, 0 failures, 0 errors, 0 skips

ruby -v: ruby 2.1.2p95 (2014-05-08 revision 45877) [i686-linux]
Errors running test:units! #<RuntimeError: Command failed with status (3): [ruby -I"lib:test" -I"/usr/local/rvm/gems/ruby-2.1.2@redmine_master/gems/rake-10.3.2/lib" "/usr/local/rvm/gems/ruby-2.1.2@redmine_master/gems/rake-10.3.2/lib/rake/rake_test_loader.rb" "test/unit/**/*_test.rb" ]>
Errors running test:functionals! #<RuntimeError: Command failed with status (2): [ruby -I"lib:test" -I"/usr/local/rvm/gems/ruby-2.1.2@redmine_master/gems/rake-10.3.2/lib" "/usr/local/rvm/gems/ruby-2.1.2@redmine_master/gems/rake-10.3.2/lib/rake/rake_test_loader.rb" "test/functional/**/*_test.rb" ]>
</pre>
}}

--------------------------------------------------------------------------------
I fixed bugs, change test for few more cases, now tests pass. Yes, there was few typo mistakes.

See diff.

Marcin.
--------------------------------------------------------------------------------
Here is a plugin for this improvement.

Tested with Travis on Redmine 3.1.0 and 3.0.3.

Repo: https://github.com/efigence/redmine_show_assigned_to_activity

have fun.

Marcin.
--------------------------------------------------------------------------------

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

  • カテゴリActivity view_50 にセット
  • 対象バージョンCandidate for next major release_32 にセット

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

いいね!0
いいね!0