Patch #18059
openActivity when issue change assigned to.
Added by Marcin Świątkiewicz about 10 years ago. Updated about 9 years ago.
0%
Description
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.
Files
fixtures_journal.diff (372 Bytes) fixtures_journal.diff | Marcin Świątkiewicz, 2014-10-10 13:57 | ||
fixtures_journal_details.diff (577 Bytes) fixtures_journal_details.diff | Marcin Świątkiewicz, 2014-10-10 13:57 | ||
activities_controller_test.diff (1.27 KB) activities_controller_test.diff | Marcin Świątkiewicz, 2014-10-10 13:57 | ||
change_activity_for_journal.diff (5.63 KB) change_activity_for_journal.diff | Marcin Świątkiewicz, 2014-10-10 13:57 | ||
diff_all_in_one.diff (6.81 KB) diff_all_in_one.diff | Marcin Świątkiewicz, 2014-10-10 14:15 | ||
fixed_bugs_activity.diff (9.83 KB) fixed_bugs_activity.diff | Marcin Świątkiewicz, 2014-10-20 11:35 |
Updated by Marcin Świątkiewicz about 10 years ago
- File diff_all_in_one.diff diff_all_in_one.diff added
Sory. Now every changes in one diff file.
Updated by Toshi MARUYAMA about 10 years ago
- Target version changed from 2.6.0 to Candidate for next major release
Updated by Toshi MARUYAMA about 10 years ago
- "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.
Updated by Mischa The Evil about 10 years ago
- Priority changed from Low to Normal
- some existing unit and functional tests need to be adjusted/tested/fixed to match the new fixtures: some tests produce failures currently2
- bug/typo (?) in
Journal#event_title
:data_for_assigned_and_status
is called without checking ifnew_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.
1 Details about my test environment...Details about my test environment...
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
2 Test suite output (unrelated output omitted)...Test suite output (unrelated output omitted)...
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" ]>
Updated by Marcin Świątkiewicz about 10 years ago
- File fixed_bugs_activity.diff fixed_bugs_activity.diff added
I fixed bugs, change test for few more cases, now tests pass. Yes, there was few typo mistakes.
See diff.
Marcin.
Updated by Marcin Świątkiewicz about 9 years ago
- Status changed from New to Resolved
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.