I think this could be an interesting change, so I quick-tested the patch attached in note-1 on a test deployment of Redmine
. Besides the points mentioned by Toshi, I have some additional remarks about the patch:
I want to emphasize that I like the idea behind this change, but I think it really needs some improvements before implementation.
Mischa.
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
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" ]>