Compare commits

..

680 Commits

Author SHA1 Message Date
Toshi MARUYAMA 868e15ff2d remove unneeded trailing ';' from lib/redmine/export/pdf.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@13132 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-05-07 08:25:15 +00:00
Toshi MARUYAMA 1944473eee remove unneeded trailing ';' from test/functional/repositories_git_controller_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@13131 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-05-07 08:25:00 +00:00
Toshi MARUYAMA e06de47234 Gemfile: update Rails 3.2.18
git-svn-id: http://svn.redmine.org/redmine/trunk@13130 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-05-07 07:55:53 +00:00
Toshi MARUYAMA a87cc86b99 fix typo of app/models/repository/mercurial.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@13129 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-05-03 23:21:01 +00:00
Toshi MARUYAMA 6eaba1137a fix typo of app/models/repository/cvs.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@13128 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-05-03 23:20:45 +00:00
Jean-Philippe Lang ef4cacdb66 Repository identifiers can be reserved words (#16564).
Patch by Felix Schäfer.

git-svn-id: http://svn.redmine.org/redmine/trunk@13127 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-05-02 08:09:33 +00:00
Jean-Philippe Lang 53deb6ca88 Mailer.token_for generates invalid message_id when using from address with full name (#16619).
git-svn-id: http://svn.redmine.org/redmine/trunk@13126 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-05-02 07:56:11 +00:00
Jean-Philippe Lang 61776a8b7e Blank content type for attachments attached via Ajax file upload (Patch by Jens Krämer).
git-svn-id: http://svn.redmine.org/redmine/trunk@13125 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-05-02 07:38:04 +00:00
Jean-Philippe Lang 382ca5055a Field set as read-only still available in the issues list context menu (#16755).
git-svn-id: http://svn.redmine.org/redmine/trunk@13124 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-05-02 07:32:41 +00:00
Jean-Philippe Lang 2d3f3cd9aa Use async email deliveries in rake tasks (#16784).
git-svn-id: http://svn.redmine.org/redmine/trunk@13123 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-05-02 07:07:02 +00:00
Jean-Philippe Lang bcc5ac38f3 Crash in markdown formatter causes ruby process to end (#16781).
Patch by Jens Krämer.

git-svn-id: http://svn.redmine.org/redmine/trunk@13122 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-05-02 06:57:29 +00:00
Toshi MARUYAMA 9875ed9954 Gemfile: upgrade mocha version (#16685)
git-svn-id: http://svn.redmine.org/redmine/trunk@13117 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-05-01 11:44:06 +00:00
Toshi MARUYAMA 6b33956394 use rvm 2.0 and 2.1 instead of 2.0.0 and 2.1.0 at .travis.yml
See:
https://github.com/travis-ci/travis-ci/issues/2220

git-svn-id: http://svn.redmine.org/redmine/trunk@13116 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-05-01 01:59:55 +00:00
Toshi MARUYAMA 82fa2cf79a add patch for regression of Hash#reject in Ruby 2.1.1 (#16194)
git-svn-id: http://svn.redmine.org/redmine/trunk@13115 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-05-01 01:59:39 +00:00
Toshi MARUYAMA 4276fc306c Gemfile: use double quote for request_store (#16685)
git-svn-id: http://svn.redmine.org/redmine/trunk@13112 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-05-01 01:50:40 +00:00
Toshi MARUYAMA a599442d05 introduce request_store to ensure that the current user doesn't leak across request boundaries (#16685)
Contributed by Holger Just.

git-svn-id: http://svn.redmine.org/redmine/trunk@13110 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-05-01 00:44:01 +00:00
Jean-Philippe Lang 9fdd0862f7 Missing type=array attributes in custom fields API (#16739).
git-svn-id: http://svn.redmine.org/redmine/trunk@13109 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-26 07:56:00 +00:00
Jean-Philippe Lang ddd6ac8cd4 Don't submit the form when tabs are inside a form (#16708).
Patch by Nicolas Rodriguez.

git-svn-id: http://svn.redmine.org/redmine/trunk@13108 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-26 07:48:28 +00:00
Jean-Philippe Lang 613757a83d Support for the 1.x versions of mime-types gem (#16710).
Patch by Szilveszter Ördög.

git-svn-id: http://svn.redmine.org/redmine/trunk@13107 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-26 07:44:06 +00:00
Jean-Philippe Lang a4fa0364d4 Redmine links not working with html escpaed characters (#16668).
git-svn-id: http://svn.redmine.org/redmine/trunk@13106 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-26 07:34:11 +00:00
Jean-Philippe Lang d197203d79 Set Redcarpet :no_intra_emphasis to true (#16669).
git-svn-id: http://svn.redmine.org/redmine/trunk@13105 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-26 07:02:45 +00:00
Jean-Philippe Lang 43c9d69bf2 Set default start date on issues created by email if default_issue_start_date_to_creation_date is set (#16655).
git-svn-id: http://svn.redmine.org/redmine/trunk@13104 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-26 06:57:09 +00:00
Toshi MARUYAMA 709211cb9c fix non-ascii attachment file name get corrupted in IE11 (#16711)
Contributed by Go MAEDA.

git-svn-id: http://svn.redmine.org/redmine/trunk@13101 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-17 18:21:23 +00:00
Toshi MARUYAMA 9eb7f25918 remove permission_manage_documents (#16704, #7418)
git-svn-id: http://svn.redmine.org/redmine/trunk@13100 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-17 01:11:36 +00:00
Toshi MARUYAMA 771dc9b2d6 fix label_module_plural merge miss (#16704, #7418)
git-svn-id: http://svn.redmine.org/redmine/trunk@13099 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-17 00:53:03 +00:00
Toshi MARUYAMA ee8cf0f12b replace RSS by Atom (#16704, #7418)
git-svn-id: http://svn.redmine.org/redmine/trunk@13098 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-17 00:43:47 +00:00
Toshi MARUYAMA c6fb9c5f51 replace Atom by RSS (#16704, #7418)
git-svn-id: http://svn.redmine.org/redmine/trunk@13097 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-17 00:34:33 +00:00
Toshi MARUYAMA 20df9c4dbd Persian Translation updated by shakib a (#16704, #7418)
git-svn-id: http://svn.redmine.org/redmine/trunk@13096 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-17 00:21:43 +00:00
Toshi MARUYAMA 770a296f43 fix typo at lib/tasks/ciphering.rake
git-svn-id: http://svn.redmine.org/redmine/trunk@13095 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-16 00:20:49 +00:00
Toshi MARUYAMA 8c5d88160f fix typo at lib/tasks/ci.rake
git-svn-id: http://svn.redmine.org/redmine/trunk@13094 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-16 00:20:32 +00:00
Toshi MARUYAMA a581f35dff fix typo at test/unit/helpers/application_helper_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@13093 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-16 00:20:15 +00:00
Toshi MARUYAMA 4b1f75e611 fix typo at app/controllers/repositories_controller.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@13092 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-16 00:19:57 +00:00
Toshi MARUYAMA 44614b5834 fix typo at lib/redcloth3.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@13091 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-15 23:57:52 +00:00
Toshi MARUYAMA 38fc2e4391 remove unneeded tabs from test/functional/repositories_cvs_controller_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@13090 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-15 22:50:04 +00:00
Toshi MARUYAMA bec603eb9b replace tabs to spaces at app/models/repository/cvs.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@13089 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-15 22:49:48 +00:00
Toshi MARUYAMA 3270a3af40 replace tabs to spaces at app/models/query.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@13088 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-15 22:49:30 +00:00
Toshi MARUYAMA 8c52689d91 reorder French translation (#16553)
Contributed by Darth Vader.

git-svn-id: http://svn.redmine.org/redmine/trunk@13087 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-08 12:39:11 +00:00
Toshi MARUYAMA c777f75edd mark deprecated Enumeration#overridding_change? which was changed in r13056
git-svn-id: http://svn.redmine.org/redmine/trunk@13086 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-08 12:38:55 +00:00
Toshi MARUYAMA ce2b12957f remove trailing white-spaces from Issue#count_and_group_by SQL
git-svn-id: http://svn.redmine.org/redmine/trunk@13084 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-08 11:23:05 +00:00
Toshi MARUYAMA 05d24e64f7 remove trailing white-spaces from Issue#by_subproject SQL
git-svn-id: http://svn.redmine.org/redmine/trunk@13083 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-08 11:22:49 +00:00
Toshi MARUYAMA 3c6d46beec remove trailing white-spaces from app/models/issue.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@13082 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-08 11:22:33 +00:00
Toshi MARUYAMA 20496b516f code format clean up Issue#update_versions_from_hierarchy_change
git-svn-id: http://svn.redmine.org/redmine/trunk@13081 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-08 11:22:17 +00:00
Toshi MARUYAMA 2a1a02f976 French "text_git_repository_note" translation updated by Darth Vader (#16553, #16566)
git-svn-id: http://svn.redmine.org/redmine/trunk@13080 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-08 11:22:01 +00:00
Toshi MARUYAMA e26f35860c Traditional Chinese "field_assigned_to" translation changed by ChunChang Lo (#16545, #16556)
git-svn-id: http://svn.redmine.org/redmine/trunk@13078 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-08 02:27:31 +00:00
Toshi MARUYAMA a3f57f1cbf Traditional Chinese translation updated by ChunChang Lo (#16545)
git-svn-id: http://svn.redmine.org/redmine/trunk@13077 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-08 02:27:15 +00:00
Toshi MARUYAMA cebcd67704 fix typos of source comments at Query model
git-svn-id: http://svn.redmine.org/redmine/trunk@13076 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-07 08:07:59 +00:00
Toshi MARUYAMA e9399e16d2 fix typos of source comments at Project model
git-svn-id: http://svn.redmine.org/redmine/trunk@13075 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-07 08:07:43 +00:00
Toshi MARUYAMA 3aeb85bfd5 fix typos of source comments at Member model
git-svn-id: http://svn.redmine.org/redmine/trunk@13074 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-07 08:07:25 +00:00
Toshi MARUYAMA 66f0a5c2ef fix typos of source comments at Issue model
git-svn-id: http://svn.redmine.org/redmine/trunk@13073 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-07 08:07:08 +00:00
Toshi MARUYAMA 071d2d7f47 fix typos of source comments at Enumeration model
git-svn-id: http://svn.redmine.org/redmine/trunk@13072 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-07 08:06:50 +00:00
Toshi MARUYAMA 9250994088 fix typos of source comments at ApplicationHelper
git-svn-id: http://svn.redmine.org/redmine/trunk@13071 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-07 08:06:32 +00:00
Toshi MARUYAMA 6067bfcd09 fix typos of source comments at lib/redmine/wiki_formatting.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@13070 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-07 08:06:14 +00:00
Toshi MARUYAMA 242b440073 fix typos of source comments at lib/redmine/plugin.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@13069 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-07 08:05:54 +00:00
Toshi MARUYAMA bf776b3304 fix typos of source comments at lib/redmine/hook.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@13068 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-07 08:05:35 +00:00
Toshi MARUYAMA e806f8cc43 German Translation updated by Daniel Felix (#16542)
git-svn-id: http://svn.redmine.org/redmine/trunk@13065 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-07 07:34:47 +00:00
Toshi MARUYAMA 7dca09a135 not use non ASCII characters at CHANGELOG
git-svn-id: http://svn.redmine.org/redmine/trunk@13064 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-07 05:44:40 +00:00
Toshi MARUYAMA e475798769 fix character broken (MOJIBAKE) of CHANGELOG
git-svn-id: http://svn.redmine.org/redmine/trunk@13063 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-07 05:44:23 +00:00
Toshi MARUYAMA f773219426 fix typos of source comments at Version model
git-svn-id: http://svn.redmine.org/redmine/trunk@13062 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-07 00:22:11 +00:00
Toshi MARUYAMA e8e9c046af fix typos at unit version test
git-svn-id: http://svn.redmine.org/redmine/trunk@13061 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-07 00:21:55 +00:00
Toshi MARUYAMA 5d56f0f26f Japanese translation (email notification) updated by Go MAEDA (#16536)
git-svn-id: http://svn.redmine.org/redmine/trunk@13060 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-07 00:21:39 +00:00
Toshi MARUYAMA 82de347dfd fix typos of source comments at acts_as_event.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@13059 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-06 14:14:55 +00:00
Toshi MARUYAMA 3e89c2ff3e fix typos of source comments at WikiContent model
git-svn-id: http://svn.redmine.org/redmine/trunk@13058 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-06 14:14:40 +00:00
Toshi MARUYAMA 597d042ec2 fix typos of source comments at Project model
git-svn-id: http://svn.redmine.org/redmine/trunk@13057 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-06 14:14:23 +00:00
Toshi MARUYAMA 5e0d93b689 fix typo of Enumeration#overridding_change?
git-svn-id: http://svn.redmine.org/redmine/trunk@13056 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-06 13:32:35 +00:00
Jean-Philippe Lang 01ac064935 Exclude custom fields with multiple values from time report criteria (#16519).
git-svn-id: http://svn.redmine.org/redmine/trunk@13055 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-06 11:29:44 +00:00
Jean-Philippe Lang 22b2a1f699 Fixed that Link custom fields are not displayed as links on the issue list (#16496).
git-svn-id: http://svn.redmine.org/redmine/trunk@13054 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-06 11:11:52 +00:00
Jean-Philippe Lang 5b8a96472f Missing closing tag (#3177).
git-svn-id: http://svn.redmine.org/redmine/trunk@13052 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-06 11:03:57 +00:00
Toshi MARUYAMA 1c208fcc86 Bulgarian translation updated by Ivan Cenov (#16532)
git-svn-id: http://svn.redmine.org/redmine/trunk@13050 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-06 07:11:37 +00:00
Jean-Philippe Lang 25ddc672a1 Adds strings to locales (#3177).
git-svn-id: http://svn.redmine.org/redmine/trunk@13044 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-05 14:08:18 +00:00
Jean-Philippe Lang 64c65463a4 Adds strings to locales (#3177).
git-svn-id: http://svn.redmine.org/redmine/trunk@13043 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-05 14:05:36 +00:00
Jean-Philippe Lang 43d7036051 Adds "Check for updates" for installed plugins (#3177).
git-svn-id: http://svn.redmine.org/redmine/trunk@13042 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-05 14:00:19 +00:00
Jean-Philippe Lang 4920bb9d4d Potentiel data leak in "Invalid form authenticity token" error screen (#16511).
git-svn-id: http://svn.redmine.org/redmine/trunk@13041 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-05 08:19:55 +00:00
Jean-Philippe Lang 380b0515d1 Fixed that back_url=/ param is ignored (#16467).
git-svn-id: http://svn.redmine.org/redmine/trunk@13040 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-05 08:11:28 +00:00
Toshi MARUYAMA e739628c81 replace mail options reference URL at configuration.yml.example
wiki.rubyonrails.org seems dead.

git-svn-id: http://svn.redmine.org/redmine/trunk@13037 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-05 00:21:16 +00:00
Jean-Philippe Lang bf37fd9695 Format table list.
git-svn-id: http://svn.redmine.org/redmine/trunk@13036 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-04-03 23:11:47 +00:00
Jean-Philippe Lang 08b96d8b47 Updates for 2.5.1 release.
git-svn-id: http://svn.redmine.org/redmine/trunk@13033 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-29 16:09:30 +00:00
Jean-Philippe Lang 6d5569a46d Remove users from cc if they are already notified (#16415).
git-svn-id: http://svn.redmine.org/redmine/trunk@13029 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-29 15:27:42 +00:00
Jean-Philippe Lang 7567c3d8b2 Fixed back url verification (#16466).
git-svn-id: http://svn.redmine.org/redmine/trunk@13018 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-29 14:32:47 +00:00
Toshi MARUYAMA cecbb225a2 Czech translation for trunk updated by Karel Pičman (#16453)
git-svn-id: http://svn.redmine.org/redmine/trunk@13016 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-28 10:52:36 +00:00
Toshi MARUYAMA 279c3a2e9b Czech translation for 2.5-stable updated by Karel Pičman (#16453)
git-svn-id: http://svn.redmine.org/redmine/trunk@13015 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-28 10:52:20 +00:00
Toshi MARUYAMA 2545720afa fix awesome_nested_set test failure (#6579)
git-svn-id: http://svn.redmine.org/redmine/trunk@13014 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-26 11:46:47 +00:00
Toshi MARUYAMA 971dbfecc0 add missing awesome_nested_set 2.1.6 files (#6579)
64cc8bc8cf

git-svn-id: http://svn.redmine.org/redmine/trunk@13013 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-26 11:46:31 +00:00
Toshi MARUYAMA 92cac9011e remove unneeded Relation#all from WorkflowTransition#count_by_tracker_and_role
git-svn-id: http://svn.redmine.org/redmine/trunk@13012 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-26 10:38:04 +00:00
Toshi MARUYAMA 2ec3b3694f fix race condition of highest rgt at Issue#update_nested_set_attributes_on_parent_change (#6579)
git-svn-id: http://svn.redmine.org/redmine/trunk@13011 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-26 01:48:20 +00:00
Toshi MARUYAMA 755108566c awesome_nested_set: split highest rgt reader method (#6579)
git-svn-id: http://svn.redmine.org/redmine/trunk@13010 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-26 01:48:04 +00:00
Toshi MARUYAMA 3c83d1c646 fix always new lft and rgt are lft = 1, rgt = 2 (#6579)
git-svn-id: http://svn.redmine.org/redmine/trunk@13009 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-26 01:47:48 +00:00
Toshi MARUYAMA e4cf210fa2 use bundled awesome_nested_set (#6579)
git-svn-id: http://svn.redmine.org/redmine/trunk@13008 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-26 01:47:31 +00:00
Toshi MARUYAMA d1057bc4ad import awesome_nested_set 2.1.6 (#6579)
64cc8bc8cf

git-svn-id: http://svn.redmine.org/redmine/trunk@13007 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-26 01:47:14 +00:00
Toshi MARUYAMA 560bfa6d87 add ChangeLog note that #15781 was forgotten to merge to v2.4.3.
git-svn-id: http://svn.redmine.org/redmine/trunk@13004 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-25 08:35:49 +00:00
Toshi MARUYAMA 291de3d03f Gemfile: pin rake version 10.1
rake 10.2.0 requires Ruby version >= 1.9.

git-svn-id: http://svn.redmine.org/redmine/trunk@13001 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-25 07:14:34 +00:00
Toshi MARUYAMA 4a9d04a767 remove unneeded Relation#all from Issue#workflow_rule_by_attribute
git-svn-id: http://svn.redmine.org/redmine/trunk@13000 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-24 16:00:01 +00:00
Toshi MARUYAMA 5fb5bd0b11 remove unneeded Relation#all from WorkflowsController#edit
git-svn-id: http://svn.redmine.org/redmine/trunk@12999 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-24 15:59:45 +00:00
Jean-Philippe Lang aa9b8ea187 Use named routes.
git-svn-id: http://svn.redmine.org/redmine/trunk@12998 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-21 04:11:59 +00:00
Jean-Philippe Lang 83ce5c1687 Don't run the test if Redcarpet is not available (#16236).
git-svn-id: http://svn.redmine.org/redmine/trunk@12997 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-21 04:07:56 +00:00
Jean-Philippe Lang d50ec43dff Disable children when checking parent notifiable.
git-svn-id: http://svn.redmine.org/redmine/trunk@12996 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-21 04:05:49 +00:00
Jean-Philippe Lang ddcad64aa2 Don't abort processing of emails when an email triggers a parsing exception (#16122).
git-svn-id: http://svn.redmine.org/redmine/trunk@12995 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-21 03:04:43 +00:00
Toshi MARUYAMA 429210f03f German Translation updated by Daniel Felix (#16399)
git-svn-id: http://svn.redmine.org/redmine/trunk@12994 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-21 02:27:26 +00:00
Toshi MARUYAMA 74373c1597 move de.yml "label_link" by alphabetical order
git-svn-id: http://svn.redmine.org/redmine/trunk@12993 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-21 02:27:05 +00:00
Jean-Philippe Lang 2b0dfe948a Set same width for all buttons (#16326).
git-svn-id: http://svn.redmine.org/redmine/trunk@12992 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-21 02:22:31 +00:00
Jean-Philippe Lang 54830abd6b Custom queries: buttons to move column to top and bottom (#16326).
git-svn-id: http://svn.redmine.org/redmine/trunk@12991 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-21 02:20:56 +00:00
Jean-Philippe Lang dd70327ce4 Let user choose an issue of another project when updating a time entry (#16338).
git-svn-id: http://svn.redmine.org/redmine/trunk@12990 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-21 02:12:32 +00:00
Jean-Philippe Lang 273aa42900 Fixed: right-aligned table of contents (TOC) not working with markdown (#16236).
git-svn-id: http://svn.redmine.org/redmine/trunk@12989 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-21 01:35:21 +00:00
Jean-Philippe Lang abf24a7d92 Don't clear plugins in tests (#16258).
git-svn-id: http://svn.redmine.org/redmine/trunk@12988 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-21 01:12:11 +00:00
Jean-Philippe Lang 913c8cd2e6 Don't clear plugins in tests (#16258).
git-svn-id: http://svn.redmine.org/redmine/trunk@12987 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-21 01:06:18 +00:00
Jean-Philippe Lang f4e5025aed Extract code to render project context links to helper (#16381).
Patch by Michael Esemplare.

git-svn-id: http://svn.redmine.org/redmine/trunk@12986 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-21 00:27:42 +00:00
Jean-Philippe Lang b29c48717d Fixed: Error generated on 'search for watchers to add' after clicking add without selected users (#14298).
git-svn-id: http://svn.redmine.org/redmine/trunk@12985 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-21 00:23:46 +00:00
Toshi MARUYAMA b109fff281 Bulgarian translation updated by Ivan Cenov (#16385)
git-svn-id: http://svn.redmine.org/redmine/trunk@12984 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-19 15:14:38 +00:00
Toshi MARUYAMA d352d55f27 Traditional Chinese translation updated by ChunChang Lo (#16380)
git-svn-id: http://svn.redmine.org/redmine/trunk@12983 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-19 07:00:29 +00:00
Toshi MARUYAMA d541020982 Polish translation updated by Jan Inowolski (#16368)
git-svn-id: http://svn.redmine.org/redmine/trunk@12981 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-18 03:24:22 +00:00
Jean-Philippe Lang 509d0fbb5e Fixed test failure (#16362).
git-svn-id: http://svn.redmine.org/redmine/trunk@12980 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-17 14:11:37 +00:00
Jean-Philippe Lang 716da4622e Adds string to locales (#16362).
git-svn-id: http://svn.redmine.org/redmine/trunk@12977 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-17 08:26:50 +00:00
Jean-Philippe Lang 0b5e7d2a3c Wrong argument.
git-svn-id: http://svn.redmine.org/redmine/trunk@12976 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-17 08:23:07 +00:00
Jean-Philippe Lang 4bf18a697c Adds an option to send email on "Assignee updated" in application settings (#16362).
git-svn-id: http://svn.redmine.org/redmine/trunk@12975 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-17 08:20:27 +00:00
Jean-Philippe Lang b695878193 Adds an option to send email on "Assignee updated" in application settings (#16362).
git-svn-id: http://svn.redmine.org/redmine/trunk@12974 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-17 08:19:45 +00:00
Jean-Philippe Lang 4e5bb0e231 Fixed flawed regexp for removing pre blocks when quoting messages (#16353).
git-svn-id: http://svn.redmine.org/redmine/trunk@12973 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-17 07:49:14 +00:00
Toshi MARUYAMA b4fd6b47b1 remove garbage comment from test/integration/account_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@12972 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-15 22:20:46 +00:00
Jean-Philippe Lang c075626462 Fixed that requesting a specific version of a non-existent wiki page raises an error (#16255).
git-svn-id: http://svn.redmine.org/redmine/trunk@12971 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-15 11:41:24 +00:00
Jean-Philippe Lang 218e5f40a1 Select proper tracker and status for when hitting F5 with browsers that preserve select values on reload, eg. Firefox (#16259).
git-svn-id: http://svn.redmine.org/redmine/trunk@12970 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-15 11:21:16 +00:00
Jean-Philippe Lang 995ae083cd Fixed flawed regexp for removing pre blocks when quoting notes (#16353).
Patch by Stephane Lapie.

git-svn-id: http://svn.redmine.org/redmine/trunk@12969 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-15 10:36:56 +00:00
Jean-Philippe Lang d7729d6d4f Use #read/#write_attribute instead of #super when overwriting default accessors (#16319).
Patch by Felix Schäfer.

git-svn-id: http://svn.redmine.org/redmine/trunk@12968 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-15 10:25:24 +00:00
Jean-Philippe Lang 1547119627 Fixed that integer custom fields with "Link values to URL" set are displayed as escaped html in text email (#16321).
git-svn-id: http://svn.redmine.org/redmine/trunk@12967 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-15 10:21:18 +00:00
Toshi MARUYAMA 484b13cc94 Spanish translation updated by Jesus Gutierrez de la Vega (#16356)
git-svn-id: http://svn.redmine.org/redmine/trunk@12965 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-15 05:49:16 +00:00
Toshi MARUYAMA 23fd067124 Russian translation updated by Kirill Bezrukov (#16336)
git-svn-id: http://svn.redmine.org/redmine/trunk@12963 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-13 11:14:24 +00:00
Toshi MARUYAMA f3311cd1ff Korean Translation updated by Jong-Ha Ahn (#16334)
git-svn-id: http://svn.redmine.org/redmine/trunk@12961 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-13 08:27:00 +00:00
Toshi MARUYAMA 9130222480 fix Turkish translation typo by Gürkan Gür (#16320)
git-svn-id: http://svn.redmine.org/redmine/trunk@12959 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-12 00:13:43 +00:00
Toshi MARUYAMA b772319977 fix source indent of lib/redmine/views/labelled_form_builder.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@12958 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-11 09:59:56 +00:00
Toshi MARUYAMA c67043e01c fix source indent of lib/redmine/views/labelled_form_builder.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@12957 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-11 09:59:40 +00:00
Toshi MARUYAMA 8a5baf9961 Japanese translation updated by Go MAEDA (#16291)
git-svn-id: http://svn.redmine.org/redmine/trunk@12955 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-11 09:30:04 +00:00
Jean-Philippe Lang 1d71564d6f Watcher search now displays project members by default.
git-svn-id: http://svn.redmine.org/redmine/trunk@12951 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-02 11:05:26 +00:00
Jean-Philippe Lang 8a2413f3b7 Updated CHANGELOG for 2.4.4 and 2.5.0.
git-svn-id: http://svn.redmine.org/redmine/trunk@12948 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-03-02 09:37:55 +00:00
Jean-Philippe Lang 2641f8ba91 Changeset comments set to longtext for handling comments > 64KB with Mysql (#16143).
git-svn-id: http://svn.redmine.org/redmine/trunk@12944 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-28 13:16:46 +00:00
Jean-Philippe Lang b0ec39fc45 Always load formatter scripts for when the description is read-only on page load (#16161).
git-svn-id: http://svn.redmine.org/redmine/trunk@12941 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-28 12:52:23 +00:00
Jean-Philippe Lang 4c7a76785d Fixed that non-empty blank strings as custom field values are not properly validated (#16169).
git-svn-id: http://svn.redmine.org/redmine/trunk@12938 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-28 10:05:27 +00:00
Toshi MARUYAMA 0cf7a27b50 use Python getattr instead of hasattr (#16177)
git-svn-id: http://svn.redmine.org/redmine/trunk@12935 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-26 16:28:43 +00:00
Toshi MARUYAMA 7b295f379b Mercurial 2.9 compatibility (#16177)
git-svn-id: http://svn.redmine.org/redmine/trunk@12930 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-26 12:01:00 +00:00
Toshi MARUYAMA e266ddb309 scm: mercurial: add one "closed" branch to test repository (#16177)
git-svn-id: http://svn.redmine.org/redmine/trunk@12929 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-26 11:27:41 +00:00
Jean-Philippe Lang 74e434b2f3 Removed hard-coded strings (#16164).
git-svn-id: http://svn.redmine.org/redmine/trunk@12928 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-25 20:17:15 +00:00
Toshi MARUYAMA 4162d8ec6b prevent issue tree hierarchy is broken in race conditions (#6579)
awesome_nested_set 2.1.6 uses lock.
Issue model uses as same way.

git-svn-id: http://svn.redmine.org/redmine/trunk@12927 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-25 06:54:40 +00:00
Jean-Philippe Lang b6c794d16b Bulk edit workflows for multiple trackers/roles (#16164).
git-svn-id: http://svn.redmine.org/redmine/trunk@12924 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-25 02:54:47 +00:00
Toshi MARUYAMA c6f71f727b explicitly set encoding UTF-8 (#16107)
Default Ruby source file encoding changed in Ruby 2.0.0.
https://bugs.ruby-lang.org/issues/6679

git-svn-id: http://svn.redmine.org/redmine/trunk@12918 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-22 15:55:35 +00:00
Toshi MARUYAMA ad8c02ca82 add "assert_response 401" to tests (#16107)
git-svn-id: http://svn.redmine.org/redmine/trunk@12917 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-22 15:55:20 +00:00
Jean-Philippe Lang 8405d57516 Strip invalid UTF-8 bytes in User#find_by_login (#16107).
git-svn-id: http://svn.redmine.org/redmine/trunk@12916 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-22 12:50:56 +00:00
Jean-Philippe Lang 58ff842d34 Trigger basic HTTP authentication only when Basic authorization header is present (#16107).
git-svn-id: http://svn.redmine.org/redmine/trunk@12915 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-22 12:09:58 +00:00
Jean-Philippe Lang 98e299857b Only notify users that can see news (#16134).
git-svn-id: http://svn.redmine.org/redmine/trunk@12914 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-22 11:32:52 +00:00
Jean-Philippe Lang 9733194cce Prevent N queries on custom_fields when call /issues API.
git-svn-id: http://svn.redmine.org/redmine/trunk@12913 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-22 11:23:39 +00:00
Jean-Philippe Lang 411ddaf701 Preload authors for /issues API calls.
git-svn-id: http://svn.redmine.org/redmine/trunk@12912 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-22 11:22:43 +00:00
Jean-Philippe Lang 9b6f53219f Preload issue authors when displayed on the issue list (#16091).
git-svn-id: http://svn.redmine.org/redmine/trunk@12911 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-22 11:21:05 +00:00
Jean-Philippe Lang 15c85ededd Preload issue relations when exporting issues to CSV with all columns (#16091).
git-svn-id: http://svn.redmine.org/redmine/trunk@12910 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-22 11:19:21 +00:00
Toshi MARUYAMA 95e44a2e57 fix typos of migrate_from_trac.rake
git-svn-id: http://svn.redmine.org/redmine/trunk@12909 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-20 04:59:33 +00:00
Toshi MARUYAMA 4dc7bc75b4 update Rails to 3.2.17
git-svn-id: http://svn.redmine.org/redmine/trunk@12906 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-19 09:32:51 +00:00
Toshi MARUYAMA 78f9d6d2ce svn propset svn:eol-style native fixture (#16122)
git-svn-id: http://svn.redmine.org/redmine/trunk@12905 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-18 23:28:23 +00:00
Toshi MARUYAMA 63a53e17fd fix newline of fixture (#16122)
git-svn-id: http://svn.redmine.org/redmine/trunk@12904 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-18 23:27:39 +00:00
Toshi MARUYAMA b5d80456ac add test of gmail ISO-8859-2 mail receiving (#16122)
git-svn-id: http://svn.redmine.org/redmine/trunk@12903 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-18 23:21:41 +00:00
Toshi MARUYAMA cce92213b0 svn propset svn:eol-style native fixture (#14675)
git-svn-id: http://svn.redmine.org/redmine/trunk@12902 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-17 12:44:58 +00:00
Toshi MARUYAMA 14c02f50cc add test of quoted printable UTF-8 mail reviving (#14675)
git-svn-id: http://svn.redmine.org/redmine/trunk@12901 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-17 12:42:44 +00:00
Toshi MARUYAMA 50ab5ec1b6 Rails4: fix time related git unit test failure
git-svn-id: http://svn.redmine.org/redmine/trunk@12900 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-15 23:13:44 +00:00
Jean-Philippe Lang e8057d41bb Fixed that collapse macro with headings breaks the table of contents (#16077).
git-svn-id: http://svn.redmine.org/redmine/trunk@12899 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-15 10:55:29 +00:00
Jean-Philippe Lang 4a2114c73b Move the field format at the top of the form.
git-svn-id: http://svn.redmine.org/redmine/trunk@12897 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-15 10:04:25 +00:00
Jean-Philippe Lang 1114bf5e99 Fixed: Export CSV - Custom field true/false not using translation (#16081).
git-svn-id: http://svn.redmine.org/redmine/trunk@12896 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-15 09:18:01 +00:00
Jean-Philippe Lang 88568da451 Always preload issues custom values (#16091).
git-svn-id: http://svn.redmine.org/redmine/trunk@12894 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-15 08:59:45 +00:00
Jean-Philippe Lang ceb7e346a7 Fixed alignments.
git-svn-id: http://svn.redmine.org/redmine/trunk@12892 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-15 08:34:30 +00:00
Jean-Philippe Lang b5e19e2d17 Removed trailing spaces in french locale.
git-svn-id: http://svn.redmine.org/redmine/trunk@12890 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-15 08:15:25 +00:00
Jean-Philippe Lang 7204f64254 Typo in french locale (#16073).
git-svn-id: http://svn.redmine.org/redmine/trunk@12889 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-15 08:08:18 +00:00
Jean-Philippe Lang a339deeacd Typo in french locale (#16073).
git-svn-id: http://svn.redmine.org/redmine/trunk@12888 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-15 08:04:11 +00:00
Jean-Philippe Lang 0b97099f8c Set version to 2.5.0.
git-svn-id: http://svn.redmine.org/redmine/trunk@12886 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-15 07:40:26 +00:00
Toshi MARUYAMA 83733e5565 German translation updated by Daniel Felix (#16097)
git-svn-id: http://svn.redmine.org/redmine/trunk@12884 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-15 00:42:37 +00:00
Toshi MARUYAMA 23fb42a890 use escaped "Can't" constant at MailerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12883 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-14 05:05:39 +00:00
Toshi MARUYAMA e8df3d50e8 Rails4: fix time related git adapter test failures
git-svn-id: http://svn.redmine.org/redmine/trunk@12882 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-14 05:05:24 +00:00
Toshi MARUYAMA 0aaf7f799a Rails4: replace deprecated Relation#sum with finder options at lib/redmine/helpers/time_report.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@12881 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-14 02:33:00 +00:00
Toshi MARUYAMA 3d79ddfe75 add missing fixtures to TimeEntryReportsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12880 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-14 02:02:06 +00:00
Toshi MARUYAMA 49e0489bc8 Rails4: fix PreviewsControllerTest assert_template failures
<pre>
  1) Failure:
PreviewsControllerTest#test_preview_issue_notes [test/functional/previews_controller_test.rb:44]:
expecting <"preview"> but rendering with <["previews/issue"]>
</pre>

git-svn-id: http://svn.redmine.org/redmine/trunk@12879 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-13 08:17:04 +00:00
Toshi MARUYAMA 22c7e0b8df fix source indent of Repository::Cvs model
git-svn-id: http://svn.redmine.org/redmine/trunk@12878 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-13 07:13:59 +00:00
Toshi MARUYAMA 7a594a2c3d Rails4: replace hard-coded html with class at ApplicationHelperTest#test_wiki_links
See r12784 comment.

git-svn-id: http://svn.redmine.org/redmine/trunk@12877 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-13 06:29:34 +00:00
Toshi MARUYAMA 2fc8ede093 Rails4: replace hard-coded html with class at Redmine::WikiFormatting::MacrosTest
See r12784 comment.

git-svn-id: http://svn.redmine.org/redmine/trunk@12876 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-13 05:40:09 +00:00
Toshi MARUYAMA b1c151f6c3 allow jruby test failure on travis
SCM tests fail randomly due to IO.popen().

See:
https://github.com/jruby/jruby/issues/779

git-svn-id: http://svn.redmine.org/redmine/trunk@12875 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-11 23:54:51 +00:00
Toshi MARUYAMA 489496488f use jruby instead of jruby-18mode etc. at .travis.yml
git-svn-id: http://svn.redmine.org/redmine/trunk@12874 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-11 23:54:36 +00:00
Toshi MARUYAMA 561f0f14ba add "jruby-20mode" and "jruby-21mode" to .travis.yml
git-svn-id: http://svn.redmine.org/redmine/trunk@12873 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-11 08:40:25 +00:00
Toshi MARUYAMA 889a5ed77a Rails4: replace hard-coded html with class at IssuesHelperTest
See r12784 comment.

git-svn-id: http://svn.redmine.org/redmine/trunk@12872 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-11 07:27:30 +00:00
Toshi MARUYAMA 71f8fe1519 Traditional Chinese translation updated by ChunChang Lo (#16060)
git-svn-id: http://svn.redmine.org/redmine/trunk@12871 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-10 06:21:28 +00:00
Jean-Philippe Lang 83dae30140 Test failure with Postgresql+ruby1.8 (#2549).
git-svn-id: http://svn.redmine.org/redmine/trunk@12870 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-09 16:34:41 +00:00
Jean-Philippe Lang ff46e9d0a4 Makes #watcher_link return an empty string when given nil.
git-svn-id: http://svn.redmine.org/redmine/trunk@12869 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-09 12:04:44 +00:00
Jean-Philippe Lang 79d01c7fe5 Display watch link only when inside project with logged-in user (#2549).
git-svn-id: http://svn.redmine.org/redmine/trunk@12868 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-09 12:01:22 +00:00
Jean-Philippe Lang 2585ed2e3b Use spaces instead of tabs.
git-svn-id: http://svn.redmine.org/redmine/trunk@12867 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-09 11:58:19 +00:00
Jean-Philippe Lang 1ad33134d3 Enable the watching of news (#2549).
git-svn-id: http://svn.redmine.org/redmine/trunk@12866 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-09 11:54:21 +00:00
Jean-Philippe Lang fa31229a23 Check that target tables exist before proceeding.
git-svn-id: http://svn.redmine.org/redmine/trunk@12865 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-09 10:49:57 +00:00
Jean-Philippe Lang 8e00c6ebb9 Prevent inline images to overflow (#3163).
git-svn-id: http://svn.redmine.org/redmine/trunk@12864 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-08 11:16:13 +00:00
Jean-Philippe Lang c366502b61 Updates for 2.4.3 release.
git-svn-id: http://svn.redmine.org/redmine/trunk@12861 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-08 08:00:23 +00:00
Toshi MARUYAMA 62225e9773 Bulgarian translation updated by Ivan Cenov (#16049)
git-svn-id: http://svn.redmine.org/redmine/trunk@12859 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-08 01:12:17 +00:00
Toshi MARUYAMA 28242420c2 add "git --version" to .travis.yml
git-svn-id: http://svn.redmine.org/redmine/trunk@12858 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-07 23:11:53 +00:00
Toshi MARUYAMA 833068207c fix source indent of ApplicationHelperTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12857 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-07 12:12:09 +00:00
Jean-Philippe Lang 98cbbdf7f1 Reverts r12855.
git-svn-id: http://svn.redmine.org/redmine/trunk@12856 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-07 11:45:25 +00:00
Jean-Philippe Lang 3d64938adc Adds JS response support to #render_error (#15760).
git-svn-id: http://svn.redmine.org/redmine/trunk@12855 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-07 09:26:27 +00:00
Jean-Philippe Lang 171581da7e Project.activities should always return a ActiveRecord::Relation (#15983).
git-svn-id: http://svn.redmine.org/redmine/trunk@12854 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-07 08:36:49 +00:00
Jean-Philippe Lang 8b58c95212 Code cleanup.
git-svn-id: http://svn.redmine.org/redmine/trunk@12851 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-07 08:00:39 +00:00
Jean-Philippe Lang 926f27b5c7 Updated locales.
git-svn-id: http://svn.redmine.org/redmine/trunk@12850 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-07 07:58:35 +00:00
Jean-Philippe Lang 7b127ee489 Show tabs for existing custom field types only and adds a view for choosing the type when adding a new custom field.
git-svn-id: http://svn.redmine.org/redmine/trunk@12849 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-07 07:57:59 +00:00
Jean-Philippe Lang 09b95905dc Make sure that Repository#extra_info returns a Hash or nil (#16032).
git-svn-id: http://svn.redmine.org/redmine/trunk@12848 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 20:23:06 +00:00
Toshi MARUYAMA a0baf7ee5d fix wrong issue 'assigned-to-my-group' css class (#16038)
git-svn-id: http://svn.redmine.org/redmine/trunk@12844 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 12:16:27 +00:00
Toshi MARUYAMA 3817f1e304 Rails4: replace hard-coded html with class at ApplicationHelperTest#test_wiki_links_within_wiki_page_context
See r12784 comment.

git-svn-id: http://svn.redmine.org/redmine/trunk@12843 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 04:45:54 +00:00
Toshi MARUYAMA 50eed3f9ab use escaped "Can't" constant at IssuesHelperTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12842 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 04:45:38 +00:00
Toshi MARUYAMA 70ab59354f Rails4: replace ActionView::Helpers::TextHelper#truncate by String#truncate at app/views/issues/_list_simple.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12841 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 03:36:40 +00:00
Toshi MARUYAMA 52e043d0e4 Rails4: replace ActionView::Helpers::TextHelper#truncate by String#truncate at app/views/repositories/revision.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12840 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 03:36:24 +00:00
Toshi MARUYAMA b412f0cc00 Rails4: replace ActionView::Helpers::TextHelper#truncate by String#truncate at app/views/repositories/_dir_list_content.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12839 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 03:36:08 +00:00
Toshi MARUYAMA 3d77481081 Rails4: replace ActionView::Helpers::TextHelper#truncate by String#truncate at app/views/repositories/_revisions.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12838 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 03:35:52 +00:00
Toshi MARUYAMA 4498df2d7c Rails4: replace ActionView::Helpers::TextHelper#truncate by String#truncate at app/views/search/index.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12837 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 03:35:36 +00:00
Toshi MARUYAMA 34870add02 Rails4: replace ActionView::Helpers::TextHelper#truncate by String#truncate at app/views/auto_completes/issues.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12836 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 03:35:19 +00:00
Toshi MARUYAMA 8934e790fe Rails4: replace ActionView::Helpers::TextHelper#truncate by String#truncate at ApplicationHelper#format_activity_description
git-svn-id: http://svn.redmine.org/redmine/trunk@12835 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 03:35:01 +00:00
Toshi MARUYAMA 16211f9a5b Rails4: replace ActionView::Helpers::TextHelper#truncate by String#truncate at ApplicationHelper#link_to_message
git-svn-id: http://svn.redmine.org/redmine/trunk@12834 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 03:34:45 +00:00
Toshi MARUYAMA ae087d7578 Rails4: replace ActionView::Helpers::TextHelper#truncate by String#truncate at ApplicationHelper#parse_redmine_links
git-svn-id: http://svn.redmine.org/redmine/trunk@12833 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 03:34:27 +00:00
Toshi MARUYAMA fd6fea5713 Rails4: replace ActionView::Helpers::TextHelper#truncate by String#truncate at lib/redmine/export/pdf.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@12832 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 03:34:09 +00:00
Toshi MARUYAMA 3e38bd0654 Rails4: replace ActionView::Helpers::TextHelper#truncate by String#truncate at ApplicationHelper#link_to_issue
git-svn-id: http://svn.redmine.org/redmine/trunk@12831 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 03:33:51 +00:00
Toshi MARUYAMA ae7a4b9678 Rails4: add ApplicationHelper#truncate_single_line_raw method replacing truncate_single_line
git-svn-id: http://svn.redmine.org/redmine/trunk@12830 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 03:33:33 +00:00
Toshi MARUYAMA e4d152e84a add tests of ApplicationHelper#link_to_issue subject and title
git-svn-id: http://svn.redmine.org/redmine/trunk@12829 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 02:38:37 +00:00
Toshi MARUYAMA b6668e3ebf Rails4: replace hard-coded html with class at ApplicationHelperTest#test_pre_content_should_not_parse_wiki_and_redmine_links
See r12784 comment.

git-svn-id: http://svn.redmine.org/redmine/trunk@12828 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 01:30:45 +00:00
Toshi MARUYAMA fab81930f7 Rails4: replace hard-coded html with class at ApplicationHelperTest#test_link_to_user_should_link_to_locked_user_if_current_user_is_admin
See r12784 comment.

git-svn-id: http://svn.redmine.org/redmine/trunk@12827 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 01:30:29 +00:00
Toshi MARUYAMA 54de8a19d1 Rails4: replace hard-coded html with class at ApplicationHelperTest#test_link_to_user
See r12784 comment.

git-svn-id: http://svn.redmine.org/redmine/trunk@12826 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 01:30:12 +00:00
Toshi MARUYAMA 789523db5f do stricter ApplicationHelperTest#test_truncate_single_line
git-svn-id: http://svn.redmine.org/redmine/trunk@12825 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 01:29:56 +00:00
Toshi MARUYAMA fc4004d0ba add tests of ApplicationHelper#truncate_single_line
git-svn-id: http://svn.redmine.org/redmine/trunk@12824 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-06 00:36:50 +00:00
Toshi MARUYAMA 325b3db186 Rails4: replace hard-coded html with class at ApplicationHelperTest#test_wiki_links_anchor_option_should_prepend_page_title_to_href
See r12784 comment.

git-svn-id: http://svn.redmine.org/redmine/trunk@12823 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-05 08:56:35 +00:00
Toshi MARUYAMA 936052f9f6 Rails4: replace hard-coded html with class at ApplicationHelperTest#test_link_to_project
See r12784 comment.

git-svn-id: http://svn.redmine.org/redmine/trunk@12822 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-05 08:56:19 +00:00
Toshi MARUYAMA 89920d2714 Rails4: replace hard-coded html with class at ApplicationHelperTest#test_link_to_attachment
See r12784 comment.

git-svn-id: http://svn.redmine.org/redmine/trunk@12821 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-05 08:56:03 +00:00
Toshi MARUYAMA 7928ce3797 Rails4: replace hard-coded html with class at ApplicationHelperTest#test_cross_project_redmine_links
See r12784 comment.

git-svn-id: http://svn.redmine.org/redmine/trunk@12820 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-05 08:55:49 +00:00
Toshi MARUYAMA 0a54a50813 code format clean up ApplicationHelperTest#test_cross_project_redmine_links
git-svn-id: http://svn.redmine.org/redmine/trunk@12819 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-05 08:55:32 +00:00
Toshi MARUYAMA 2bcd63ad28 code format clean up app/views/issues/_list_simple.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12818 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-05 08:55:17 +00:00
Toshi MARUYAMA 4d806cc7f5 remove unneeded h() from app/views/repositories/_revisions.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12817 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-05 08:55:01 +00:00
Toshi MARUYAMA 8d0ce6498e remove unneeded h() from app/views/repositories/_dir_list_content.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12816 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-05 08:54:46 +00:00
Toshi MARUYAMA c714322530 remove unneeded h() from app/views/issues/_list_simple.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12815 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-05 08:54:28 +00:00
Toshi MARUYAMA fb1055eb3f code format clean up app/views/search/index.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12814 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-05 08:54:12 +00:00
Toshi MARUYAMA 47353387c1 Rails4: replace hard-coded html with class at ApplicationHelperTest#test_attachment_links
See r12784 comment.

git-svn-id: http://svn.redmine.org/redmine/trunk@12813 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-05 04:14:58 +00:00
Toshi MARUYAMA 79e5570b27 Rails4: replace hard-coded html with class at ApplicationHelperTest#test_attachment_link_should_link_to_latest_attachment
See r12784 comment.

git-svn-id: http://svn.redmine.org/redmine/trunk@12812 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-05 04:14:43 +00:00
Toshi MARUYAMA 2f43fca8f0 Rails4: replace hard-coded html with class at ApplicationHelperTest#test_wiki_links_in_tables
See r12784 comment.

git-svn-id: http://svn.redmine.org/redmine/trunk@12811 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-05 04:14:27 +00:00
Toshi MARUYAMA f21aeaeb7b Traditional Chinese translation updated by ChunChang Lo (#16023)
git-svn-id: http://svn.redmine.org/redmine/trunk@12810 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-05 03:24:39 +00:00
Toshi MARUYAMA fb54d4e459 code format clean up ApplicationHelper#parse_redmine_links
git-svn-id: http://svn.redmine.org/redmine/trunk@12809 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-05 03:24:22 +00:00
Toshi MARUYAMA f44c32557c code format clean up ApplicationHelper#link_to_issue
git-svn-id: http://svn.redmine.org/redmine/trunk@12808 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-05 03:24:07 +00:00
Toshi MARUYAMA bd6d45428f use escaped "Can't" constant at ApplicationHelperTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12807 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-05 00:42:50 +00:00
Toshi MARUYAMA 52b5a26507 Rails4: replace hard-coded html with class at ApplicationHelperTest#test_redmine_links_with_a_different_project_before_current_project
See r12784 comment.

git-svn-id: http://svn.redmine.org/redmine/trunk@12806 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-05 00:42:34 +00:00
Toshi MARUYAMA 760f88bd58 use escaped "Can't" constant at IssueStatusesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12805 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 23:52:44 +00:00
Toshi MARUYAMA 03f7281f82 use escaped "can't" constant at IssueStatusesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12804 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 23:52:28 +00:00
Toshi MARUYAMA 98249335d5 use escaped "can't" constant at NewsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12803 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 23:52:12 +00:00
Toshi MARUYAMA 031e4fde63 use escaped "can't" constant at ProjectsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12802 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 23:51:56 +00:00
Toshi MARUYAMA afa18701fd use escaped "can't" constant at AuthSourcesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12801 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 23:51:39 +00:00
Toshi MARUYAMA 61b5a44b1a Rails4: fix "assert_template 'calendar'" fails at CalendarsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12800 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 23:51:23 +00:00
Toshi MARUYAMA 8bdb66bf98 Rails4: use "assert_template 'context_menus/time_entries'" at ContextMenusControllerTest
This asserting does not fail, but use same logic with "assert_template 'context_menus/issues'"

git-svn-id: http://svn.redmine.org/redmine/trunk@12799 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 23:51:07 +00:00
Toshi MARUYAMA 035c1b9a18 Rails4: fix "assert_template 'context_menu'" fails at ContextMenusControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12798 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 23:50:49 +00:00
Toshi MARUYAMA 09bbfad124 code format clean up app/views/projects/settings/_members.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12797 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 23:50:32 +00:00
Toshi MARUYAMA 67e3af6c97 code format clean up ProjectsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12796 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 23:50:14 +00:00
Toshi MARUYAMA f1572de51e code format clean up AuthSourcesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12795 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 23:49:55 +00:00
Toshi MARUYAMA e91bce3d05 use escaped "Can't" constant at TrackersControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12794 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 10:07:57 +00:00
Toshi MARUYAMA b825198e0f define constant of escaped "Can't" for tests
git-svn-id: http://svn.redmine.org/redmine/trunk@12793 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 10:07:41 +00:00
Toshi MARUYAMA a6d4cdb25b use escaped "can't" constant at TrackersControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12792 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 10:07:19 +00:00
Toshi MARUYAMA 1f2c5ac08e Rails4: fix "assert_template 'form'" fails at IssuesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12791 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 10:07:02 +00:00
Toshi MARUYAMA a464abefdd replace shoulda context "#subjects" at GanttHelperTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12790 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 10:06:46 +00:00
Toshi MARUYAMA 3ad3c691cc replace shoulda context "#number_of_rows_on_project" at GanttHelperTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12789 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 10:06:28 +00:00
Toshi MARUYAMA 8543dfd109 replace shoulda context "#number_of_rows" at GanttHelperTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12788 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 10:06:11 +00:00
Toshi MARUYAMA 10c6b0e84f define as private GanttHelperTest helper methods
git-svn-id: http://svn.redmine.org/redmine/trunk@12787 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 10:05:54 +00:00
Toshi MARUYAMA cfcdf06f89 replace shoulda context "with workflow privilege" at IssuesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12786 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 07:50:55 +00:00
Toshi MARUYAMA 06c53f878f replace shoulda context "without workflow privilege" at IssuesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12785 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 07:50:39 +00:00
Toshi MARUYAMA 05b2bd173e Rails4: use link_to instead of hard coded html at ApplicationHelperTest#test_wiki_links_within_local_file_generation_context
On Rails 4.0.2, test fails.

<pre>
  --- expected
  +++ actual
  @@ -1 +1 @@
  -"<p><a href=\"CookBook_documentation.html\" class=\"wiki-page\">documentation</a></p>"
  +"<p><a class=\"wiki-page\" href=\"CookBook_documentation.html\">documentation</a></p>"
</pre>

git-svn-id: http://svn.redmine.org/redmine/trunk@12784 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 07:50:20 +00:00
Toshi MARUYAMA 31cab06f91 code format clean up escaped "can't" constant
git-svn-id: http://svn.redmine.org/redmine/trunk@12783 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 04:41:27 +00:00
Toshi MARUYAMA 0d4551c270 use escaped "can't" constant at TrackersControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12782 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 04:32:37 +00:00
Toshi MARUYAMA c38fa97165 use escaped "can't" constant at WikisControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12781 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 04:32:20 +00:00
Toshi MARUYAMA 5e94d388b5 define constant of escaped "can't" for tests
git-svn-id: http://svn.redmine.org/redmine/trunk@12780 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 04:32:04 +00:00
Toshi MARUYAMA fe7c6057f9 code format clean up TrackersControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12779 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 04:31:46 +00:00
Toshi MARUYAMA 669a16376f code format clean up WikisControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12778 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-04 04:31:29 +00:00
Toshi MARUYAMA b87a7b8984 scm: mercurial: insert long id to DB unless existing id in DB is not short id (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12777 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 14:53:16 +00:00
Toshi MARUYAMA 85f15f694a scm: mercurial: add asserting first and last changeset to test_fetch_changesets_from_scratch (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12776 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 13:08:50 +00:00
Toshi MARUYAMA f9e7c24733 scm: mercurial: use scmid_for_assert in assert_parents (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12775 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 12:20:32 +00:00
Toshi MARUYAMA 58d906446d scm: mercurial: use scmid_for_assert in assert_entries (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12774 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 12:20:16 +00:00
Toshi MARUYAMA 642f13605e scm: mercurial: use scmid_for_assert in assert_entry (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12773 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 12:19:59 +00:00
Toshi MARUYAMA 1cda73c1b4 scm: mercurial: use scmid_for_assert in assert_copied_files (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12772 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 12:19:42 +00:00
Toshi MARUYAMA 396323726b scm: mercurial: add test helper method to switch short or long id (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12771 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 12:19:26 +00:00
Toshi MARUYAMA da071e5531 scm: mercurial: split test_parents to sub method (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12770 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 11:41:17 +00:00
Toshi MARUYAMA 4bde749d40 scm: mercurial: split test_copied_files to sub method (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12769 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 11:41:01 +00:00
Toshi MARUYAMA febd239d22 scm: mercurial: split test_entries_short_id to sub method (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12768 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 11:40:44 +00:00
Toshi MARUYAMA 1f2a520a46 scm: mercurial: split test_entry_short_id to sub method (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12767 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 11:40:28 +00:00
Toshi MARUYAMA b07c983740 scm: mercurial: split latest_changesets tag test to sub method (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12766 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 07:57:02 +00:00
Toshi MARUYAMA 074984688e scm: mercurial: split latest_changesets default branch test to sub method (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12765 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 07:56:46 +00:00
Toshi MARUYAMA 8c96db6e53 scm: mercurial: split latest_changesets tag test with path or not (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12764 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 07:56:31 +00:00
Toshi MARUYAMA 79e73095e5 scm: mercurial: add latest_changesets "default" branch test (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12763 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 06:34:31 +00:00
Toshi MARUYAMA 3698dd26cf scm: mercurial: split latest_changesets tag test with limit or not (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12762 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 06:34:15 +00:00
Toshi MARUYAMA 5872d079e6 scm: mercurial: use long id in adapter level (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12761 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 04:44:38 +00:00
Toshi MARUYAMA d301b8c0c1 scm: mercurial: switch short or long id of entry by existing value in DB (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12760 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 04:44:20 +00:00
Toshi MARUYAMA eb18660369 scm: mercurial: override entry and scm_entries (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12759 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 04:44:04 +00:00
Toshi MARUYAMA 07d7b47ddc scm: mercurial: add model entry test (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12758 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 04:43:48 +00:00
Toshi MARUYAMA 1662720d7b scm: mercurial: add model entries test (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12757 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 04:43:32 +00:00
Toshi MARUYAMA d26b4fc5b7 scm: mercurial: add adapter entry test (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12756 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 04:43:17 +00:00
Toshi MARUYAMA 8a35585bd2 scm: mercurial: add method to switch short or long id by existing value in DB (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12755 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 00:41:16 +00:00
Toshi MARUYAMA d45bf0a83e scm: split Repository#entries (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12754 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-02 00:40:59 +00:00
Toshi MARUYAMA f2ec6f8d77 back out r12752 (#14361)
Revision, Author and Comment of repository browser are broken.

git-svn-id: http://svn.redmine.org/redmine/trunk@12753 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-01 08:46:47 +00:00
Toshi MARUYAMA ae68ff1100 scm: mercurial: use long id in adapter level (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12752 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-01 07:47:04 +00:00
Toshi MARUYAMA 6ea2b7a43b scm: mercurial: split Repository::Mercurial#latest_changesets_cond for short and long id (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12751 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-01 07:46:45 +00:00
Toshi MARUYAMA 28fbc270fa scm: mercurial: add check scmid to RepositoryMercurialTest#test_fetch_changesets_from_scratch (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12750 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-01 06:08:22 +00:00
Toshi MARUYAMA 5dcecec1bd scm: mercurial: use 12 chars id for format_changeset_identifier (#14361)
git-svn-id: http://svn.redmine.org/redmine/trunk@12749 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-01 04:23:53 +00:00
Toshi MARUYAMA fdc0731cb5 scm: mercurial: split latest_changesets test to tag and branch
git-svn-id: http://svn.redmine.org/redmine/trunk@12748 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-01 03:45:33 +00:00
Toshi MARUYAMA 31af31eef7 remove redundant empty line from RepositoryMercurialTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12747 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-02-01 02:39:51 +00:00
Jean-Philippe Lang d651b93eff Adds some test helpers to cleanup tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@12746 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-31 18:13:42 +00:00
Jean-Philippe Lang 888823a449 Fixed calculation of done_ratio of parent task with child having estimated_time at 0 (#15870).
git-svn-id: http://svn.redmine.org/redmine/trunk@12745 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-31 17:42:46 +00:00
Toshi MARUYAMA e699458b3c Rails4 compatibility of WatcherTest#test_watcher_users
Rails4 has_many returns ActiveRecord::Associations::CollectionProxy not array

git-svn-id: http://svn.redmine.org/redmine/trunk@12744 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-31 15:35:48 +00:00
Toshi MARUYAMA 619857e1a4 remove unneeded Relation#all from Repository::Git model
git-svn-id: http://svn.redmine.org/redmine/trunk@12743 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-31 10:15:52 +00:00
Toshi MARUYAMA 8574948617 code format clean up Repository::Git model
git-svn-id: http://svn.redmine.org/redmine/trunk@12742 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-31 10:15:37 +00:00
Toshi MARUYAMA 7c56ed6004 fix source indent of Redmine::Scm::Adapters::AbstractAdapter#without_trailling_slash
git-svn-id: http://svn.redmine.org/redmine/trunk@12741 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-31 09:38:43 +00:00
Jean-Philippe Lang 5fc8cfe9e3 Removed debug output.
git-svn-id: http://svn.redmine.org/redmine/trunk@12740 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-30 22:27:08 +00:00
Jean-Philippe Lang d5a9af54fa Reverts r12669 and add a test for #15870.
git-svn-id: http://svn.redmine.org/redmine/trunk@12739 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-30 22:18:07 +00:00
Toshi MARUYAMA cb000a5d85 fix r12737 de.yml alphabetical order
git-svn-id: http://svn.redmine.org/redmine/trunk@12738 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-30 00:21:10 +00:00
Toshi MARUYAMA acb0d148d1 German translation updated by Daniel Felix (#15980)
git-svn-id: http://svn.redmine.org/redmine/trunk@12737 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-29 23:10:05 +00:00
Toshi MARUYAMA 35cc911192 update copyright year (#15977)
Contributed by Daniel Felix.

git-svn-id: http://svn.redmine.org/redmine/trunk@12736 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-29 22:45:39 +00:00
Toshi MARUYAMA a711cbb44e back out from r12715 to r12720: #connection replacing
These revisions have performance regression on Rails 3.2.16.

git-svn-id: http://svn.redmine.org/redmine/trunk@12735 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 07:21:47 +00:00
Toshi MARUYAMA 9e71d89cdb Gemfile: use awesome_nested_set 2.1.6 gem
git-svn-id: http://svn.redmine.org/redmine/trunk@12734 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 06:48:38 +00:00
Toshi MARUYAMA ba75aa504b move r12689 awesome_nested_set modification to config/initializers/10-patches.rb (#7920)
git-svn-id: http://svn.redmine.org/redmine/trunk@12733 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 06:47:46 +00:00
Toshi MARUYAMA 4f996fa5c2 remove unneeded Relation#all from TimeEntryQuery model
git-svn-id: http://svn.redmine.org/redmine/trunk@12732 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 02:19:20 +00:00
Toshi MARUYAMA ea8febad03 remove unneeded Relation#all from Principal model
git-svn-id: http://svn.redmine.org/redmine/trunk@12731 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 02:19:03 +00:00
Toshi MARUYAMA 8832cca13b remove unneeded Relation#all from Repository::Subversion model
git-svn-id: http://svn.redmine.org/redmine/trunk@12730 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 02:18:47 +00:00
Toshi MARUYAMA b6f066ddf3 remove unneeded Relation#all from Project model
git-svn-id: http://svn.redmine.org/redmine/trunk@12729 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 02:18:30 +00:00
Toshi MARUYAMA 051ed3557b remove unneeded Relation#all from MemberRole model
git-svn-id: http://svn.redmine.org/redmine/trunk@12728 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 02:18:13 +00:00
Toshi MARUYAMA 3b3a7c50a9 remove unneeded Relation#all from Journal model
git-svn-id: http://svn.redmine.org/redmine/trunk@12727 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 02:17:57 +00:00
Toshi MARUYAMA c489c28219 code format cleanup Repository::Subversion model
git-svn-id: http://svn.redmine.org/redmine/trunk@12726 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 01:42:31 +00:00
Toshi MARUYAMA 2bdf28262b remove unneeded Relation#all from IssueStatus model
git-svn-id: http://svn.redmine.org/redmine/trunk@12725 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 01:24:41 +00:00
Toshi MARUYAMA 9c7568c1a1 remove unneeded Relation#all from IssueQuery model
git-svn-id: http://svn.redmine.org/redmine/trunk@12724 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 01:09:24 +00:00
Toshi MARUYAMA ea8e5c74ec remove unneeded Relation#all from Mailer model
git-svn-id: http://svn.redmine.org/redmine/trunk@12723 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 01:09:09 +00:00
Toshi MARUYAMA ca3d706f56 remove unneeded Relation#all from IssuePriority model
git-svn-id: http://svn.redmine.org/redmine/trunk@12722 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 01:08:54 +00:00
Toshi MARUYAMA 077598fe4b remove unneeded Relation#all from WorkflowsController
git-svn-id: http://svn.redmine.org/redmine/trunk@12721 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 01:08:40 +00:00
Toshi MARUYAMA dff2721fbe Rails4: replace deprecated #connection from Query model
DEPRECATION WARNING: #connection is deprecated in favour of accessing it via the class.

git-svn-id: http://svn.redmine.org/redmine/trunk@12720 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 01:08:25 +00:00
Toshi MARUYAMA f5c5393d09 Rails4: replace deprecated #connection from Project model
DEPRECATION WARNING: #connection is deprecated in favour of accessing it via the class.

git-svn-id: http://svn.redmine.org/redmine/trunk@12719 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 01:08:09 +00:00
Toshi MARUYAMA b1d0107ac0 Rails4: replace deprecated #connection from Repository model
DEPRECATION WARNING: #connection is deprecated in favour of accessing it via the class.

git-svn-id: http://svn.redmine.org/redmine/trunk@12718 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 01:07:52 +00:00
Toshi MARUYAMA 6be972af35 Rails4: replace deprecated #connection from IssueQuery model
DEPRECATION WARNING: #connection is deprecated in favour of accessing it via the class.

git-svn-id: http://svn.redmine.org/redmine/trunk@12717 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 01:07:34 +00:00
Toshi MARUYAMA ecf27b3f12 Rails4: replace deprecated #connection from IssueCustomField model
DEPRECATION WARNING: #connection is deprecated in favour of accessing it via the class.

git-svn-id: http://svn.redmine.org/redmine/trunk@12716 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 01:07:17 +00:00
Toshi MARUYAMA 0daa1a1a4f Rails4: replace deprecated #connection from Issue model
DEPRECATION WARNING: #connection is deprecated in favour of accessing it via the class.

git-svn-id: http://svn.redmine.org/redmine/trunk@12715 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 01:06:58 +00:00
Toshi MARUYAMA 28b1b1ea90 remove unneeded Relation#all from UserTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12714 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 00:09:19 +00:00
Toshi MARUYAMA e63029cee4 remove unneeded Relation#all from ProjectTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12713 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 00:09:02 +00:00
Toshi MARUYAMA e746e5dd83 remove unneeded Relation#all from PrincipalTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12712 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 00:08:47 +00:00
Toshi MARUYAMA 45289b9791 remove unneeded Relation#all from IssueStatusTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12711 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 00:08:32 +00:00
Toshi MARUYAMA c47940f4a5 remove unneeded Relation#all from IssueTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12710 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-27 00:08:15 +00:00
Toshi MARUYAMA 9941a987e9 add more comment about awesome_nested_set 2-1-stable branch regression
git-svn-id: http://svn.redmine.org/redmine/trunk@12709 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-26 09:10:58 +00:00
Toshi MARUYAMA 38fa36d23b remove Rails4 deprecated Relation#all from IssueTest#test_visible_and_nested_set_scopes and add awesome_nested_set regression test
git-svn-id: http://svn.redmine.org/redmine/trunk@12708 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-26 09:05:59 +00:00
Toshi MARUYAMA 0139b0a0db Japanese translation updated by Go MAEDA (#15962)
git-svn-id: http://svn.redmine.org/redmine/trunk@12707 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-26 01:47:23 +00:00
Jean-Philippe Lang ddb6b7d1e9 Successful update notice for workflows (#15831).
git-svn-id: http://svn.redmine.org/redmine/trunk@12706 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-25 13:17:08 +00:00
Jean-Philippe Lang a2f869b43e Redirect to back_url or referer when clicking "Sign in" while already logged-in (#15926).
git-svn-id: http://svn.redmine.org/redmine/trunk@12705 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-25 12:35:05 +00:00
Jean-Philippe Lang 5faa1a4e6e REST API: Integer custom field validation fails when using non-string values (#15929).
git-svn-id: http://svn.redmine.org/redmine/trunk@12704 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-25 12:08:22 +00:00
Toshi MARUYAMA 20ff37ef42 Spanish translation updated by Borja Campina (#15959)
git-svn-id: http://svn.redmine.org/redmine/trunk@12703 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-25 06:02:58 +00:00
Toshi MARUYAMA d2bc5220dd Bulgarian translation updated by Ivan Cenov (#15956)
git-svn-id: http://svn.redmine.org/redmine/trunk@12702 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-25 06:02:42 +00:00
Toshi MARUYAMA 07962dd5c2 Bulgarian translation changed by Ivan Cenov (#15956)
* notice_account_activated
* setting_login_required

git-svn-id: http://svn.redmine.org/redmine/trunk@12701 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-25 06:02:25 +00:00
Toshi MARUYAMA 666a8a4aca move setting_default_projects_tracker_ids at de.yml to alphabetical order
git-svn-id: http://svn.redmine.org/redmine/trunk@12700 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-25 06:02:09 +00:00
Toshi MARUYAMA 5a030f3416 German translation updated by Daniel Felix (#15955)
git-svn-id: http://svn.redmine.org/redmine/trunk@12699 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-25 06:01:53 +00:00
Toshi MARUYAMA 0fefc3bab7 Russian translation updated by Kirill Bezrukov (#15953)
git-svn-id: http://svn.redmine.org/redmine/trunk@12698 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-25 06:01:36 +00:00
Toshi MARUYAMA 609b80e5b7 pt-BR translation for trunk updated by Leandro Gehlen (#15961)
git-svn-id: http://svn.redmine.org/redmine/trunk@12696 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-25 04:54:35 +00:00
Toshi MARUYAMA 02817281f5 pt-BR translation for 2.4-stable updated by Leandro Gehlen (#15960)
git-svn-id: http://svn.redmine.org/redmine/trunk@12695 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-25 04:33:00 +00:00
Toshi MARUYAMA e917aa7ed8 fix comment of awesome_nested_set new node lft and rgt value behavior change
git-svn-id: http://svn.redmine.org/redmine/trunk@12694 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-24 16:40:06 +00:00
Toshi MARUYAMA 17a5f26e50 adjust tests to awesome_nested_set new node lft and rgt value behavior change
git-svn-id: http://svn.redmine.org/redmine/trunk@12693 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-24 16:26:50 +00:00
Jean-Philippe Lang 0829ac775d Adds locales strings (#2691).
git-svn-id: http://svn.redmine.org/redmine/trunk@12692 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-24 10:29:06 +00:00
Jean-Philippe Lang e391be4086 Adds settings for disabling browser language detection and language preference (#2691).
git-svn-id: http://svn.redmine.org/redmine/trunk@12691 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-24 10:28:12 +00:00
Jean-Philippe Lang 6e6c6fac5c Adds firstname initials+lastname user format.
git-svn-id: http://svn.redmine.org/redmine/trunk@12690 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-24 09:23:11 +00:00
Toshi MARUYAMA 4b5ce4c089 graft r5285 to awesome_nested_set 2.1.6 (#7920)
git-svn-id: http://svn.redmine.org/redmine/trunk@12689 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-21 07:55:16 +00:00
Toshi MARUYAMA 4a57f5f7f3 add lib/plugins/awesome_nested_set/init.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@12688 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-21 07:55:00 +00:00
Toshi MARUYAMA 3f6a676622 import awesome_nested_set 2.1.6
64cc8bc8cf

git-svn-id: http://svn.redmine.org/redmine/trunk@12687 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-21 07:54:42 +00:00
Toshi MARUYAMA bdfcfb35a3 remove unneeded Project#acts_as_nested_set :order => 'name' option
git-svn-id: http://svn.redmine.org/redmine/trunk@12686 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-21 06:51:39 +00:00
Toshi MARUYAMA 2d2542008e graft r5285 to awesome_nested_set 2.1.5 (#7920)
git-svn-id: http://svn.redmine.org/redmine/trunk@12685 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-21 06:51:22 +00:00
Toshi MARUYAMA 65d2df44db back out r12679 awesome_nested_set 2.1.5 modification
git-svn-id: http://svn.redmine.org/redmine/trunk@12684 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-21 06:51:06 +00:00
Toshi MARUYAMA 962ecabc47 call Project#set_or_update_position_under in Project.rebuild_tree! (#12431)
git-svn-id: http://svn.redmine.org/redmine/trunk@12683 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-21 06:29:48 +00:00
Toshi MARUYAMA 94e3eb2b8b move awesome_nested_set leaf? modification to config/initializers/10-patches.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@12682 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-20 17:54:47 +00:00
Toshi MARUYAMA 89c43d24c8 back out r12680
<pre>
  1) Failure:
test_children(ProjectTest) [test/unit/project_test.rb:374]:
<[5, 3, 4]> expected but was
<[3, 4, 5]>.
</pre>

git-svn-id: http://svn.redmine.org/redmine/trunk@12681 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-20 13:35:05 +00:00
Toshi MARUYAMA 1c0c22de17 use :order_column option instead of :order for acts_as_nested_set
git-svn-id: http://svn.redmine.org/redmine/trunk@12680 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-20 12:53:01 +00:00
Toshi MARUYAMA bcec29d5e4 apply Redmine awesome_nested_set 2.1.5 modification
git-svn-id: http://svn.redmine.org/redmine/trunk@12679 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-20 05:59:50 +00:00
Toshi MARUYAMA 90777c1673 add lib/plugins/awesome_nested_set/init.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@12678 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-20 05:59:34 +00:00
Toshi MARUYAMA 6f78b3a408 import awesome_nested_set 2.1.5
60fe4f69e4

git-svn-id: http://svn.redmine.org/redmine/trunk@12677 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-20 05:59:16 +00:00
Toshi MARUYAMA 77f29deb29 svn propset svn:eol-style LF lib/plugins/awesome_nested_set/spec/*
git-svn-id: http://svn.redmine.org/redmine/trunk@12676 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-20 02:19:08 +00:00
Toshi MARUYAMA df9da6750d svn propset svn:eol-style LF lib/plugins/awesome_nested_set/.travis.yml
git-svn-id: http://svn.redmine.org/redmine/trunk@12675 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-20 01:53:58 +00:00
Toshi MARUYAMA 4d95f815d2 svn propset svn:eol-style LF lib/plugins/awesome_nested_set/.autotest
git-svn-id: http://svn.redmine.org/redmine/trunk@12674 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-20 01:47:06 +00:00
Jean-Philippe Lang a525bc8e98 Don't display default watchers checkboxes on the new issue form when there are more than 20 members (#8562).
git-svn-id: http://svn.redmine.org/redmine/trunk@12673 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-19 10:01:14 +00:00
Toshi MARUYAMA b933cd7a65 add newline at end of lib/plugins/awesome_nested_set/init.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@12672 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-19 09:59:25 +00:00
Jean-Philippe Lang caa7af66e6 Prevents no method errors when reloading in development mode.
git-svn-id: http://svn.redmine.org/redmine/trunk@12671 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-19 09:51:04 +00:00
Jean-Philippe Lang bacc250816 Focus first text field automatically (#13134).
git-svn-id: http://svn.redmine.org/redmine/trunk@12670 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-19 08:57:47 +00:00
Jean-Philippe Lang 6f1cda4852 Make sure that we don't set the done ratio to a value > 100% (#15870).
git-svn-id: http://svn.redmine.org/redmine/trunk@12669 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-19 08:35:59 +00:00
Toshi MARUYAMA 364b334d89 remove JRuby PostgreSQL from allow_failures of .travis.yml
Tests pass on Travis.
* jruby 1.7.9 (1.9.3p392) 2014-01-09 87b108a on Java HotSpot(TM) 64-Bit Server VM 1.7.0_45-b18 [linux-amd64]
* jdbc-postgres (9.3.1100)
* activerecord-jdbc-adapter (1.3.5)
* activerecord-jdbcpostgresql-adapter (1.3.5)

git-svn-id: http://svn.redmine.org/redmine/trunk@12668 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-19 02:24:44 +00:00
Toshi MARUYAMA 5c0e3fcf8d svn propset svn:eol-style native .travis.yml
git-svn-id: http://svn.redmine.org/redmine/trunk@12667 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-19 00:09:31 +00:00
Toshi MARUYAMA a27e049eaa fix typo of .travis.yml
git-svn-id: http://svn.redmine.org/redmine/trunk@12666 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-19 00:07:13 +00:00
Toshi MARUYAMA 1951aeac78 add .travis.yml and switch database user/password by environments
git-svn-id: http://svn.redmine.org/redmine/trunk@12665 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-18 23:59:32 +00:00
Toshi MARUYAMA caf49264c8 Rails4: replace deprecated Relation#update_all at ChangeRepositoriesToFullSti db migration
git-svn-id: http://svn.redmine.org/redmine/trunk@12664 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-17 01:41:06 +00:00
Jean-Philippe Lang f890c775f1 Show warning when exported issues exceed the limit (#13770).
git-svn-id: http://svn.redmine.org/redmine/trunk@12663 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-12 10:39:42 +00:00
Jean-Philippe Lang 682f0231ff Adds favicon to ATOM feeds (#14309).
git-svn-id: http://svn.redmine.org/redmine/trunk@12662 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-12 10:03:59 +00:00
Jean-Philippe Lang 1eda38be4c Adds #favicon_path and #favicon_url helpers.
git-svn-id: http://svn.redmine.org/redmine/trunk@12661 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-12 09:58:07 +00:00
Jean-Philippe Lang 5df064ed85 Fixed Changeset#text_tag for changeset with hash and repository identifier (#13544).
git-svn-id: http://svn.redmine.org/redmine/trunk@12660 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-12 09:19:47 +00:00
Jean-Philippe Lang b25c7003da Adds a task for moving Redmine data to a different DBMS.
git-svn-id: http://svn.redmine.org/redmine/trunk@12659 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-12 09:02:31 +00:00
Jean-Philippe Lang b9f45c80c6 Code cleanup (#14766).
Patch by Daniel Felix.

git-svn-id: http://svn.redmine.org/redmine/trunk@12658 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 13:29:53 +00:00
Jean-Philippe Lang e9689f5fe3 Removes duplicate ids (#15485).
git-svn-id: http://svn.redmine.org/redmine/trunk@12657 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 12:55:21 +00:00
Jean-Philippe Lang d302450731 Removes duplicate ids (#15485).
git-svn-id: http://svn.redmine.org/redmine/trunk@12656 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 12:47:26 +00:00
Jean-Philippe Lang d3106af830 Removes duplicate ids (#15485).
git-svn-id: http://svn.redmine.org/redmine/trunk@12655 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 12:45:57 +00:00
Jean-Philippe Lang f4f3756fcc Removes duplicate ids (#15485).
git-svn-id: http://svn.redmine.org/redmine/trunk@12654 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 12:45:19 +00:00
Jean-Philippe Lang 9fe24bc88f Removes duplicate ids (#15485).
git-svn-id: http://svn.redmine.org/redmine/trunk@12653 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 12:42:11 +00:00
Jean-Philippe Lang 0711c585b6 Adds missing permissions on attachments/upload (#15664).
git-svn-id: http://svn.redmine.org/redmine/trunk@12652 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 12:27:01 +00:00
Jean-Philippe Lang 4e151a4722 Syntax error with ruby1.8.
git-svn-id: http://svn.redmine.org/redmine/trunk@12651 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 11:50:47 +00:00
Jean-Philippe Lang 9ad2ca61da Fixed: cannot retrieve members for closed projects through the REST API (#15848).
git-svn-id: http://svn.redmine.org/redmine/trunk@12650 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 11:47:26 +00:00
Jean-Philippe Lang de19424ea5 Adds project status to GET /projects/:id and GET /projects API response (#15815).
git-svn-id: http://svn.redmine.org/redmine/trunk@12649 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 11:33:47 +00:00
Jean-Philippe Lang a89468ebc8 Adds rel=stylesheet condition for stylesheets assertions.
git-svn-id: http://svn.redmine.org/redmine/trunk@12648 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 11:28:09 +00:00
Jean-Philippe Lang fa52c5d9fc Use #assert_select instead of #assert_tag.
git-svn-id: http://svn.redmine.org/redmine/trunk@12647 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 11:26:53 +00:00
Jean-Philippe Lang 8b999962de Make favicon themeable (#15689).
Patch by Felix Schäfer modified by Jean-Philippe Lang.

git-svn-id: http://svn.redmine.org/redmine/trunk@12646 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 11:22:46 +00:00
Jean-Philippe Lang 2db3338ab2 Wrap filters, options and buttons with extra div (#15362).
git-svn-id: http://svn.redmine.org/redmine/trunk@12645 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 11:12:03 +00:00
Toshi MARUYAMA 2a8ae016c5 Rails4: replace deprecated find_all_by_* at TimelogControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12644 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 10:14:24 +00:00
Toshi MARUYAMA 8f43b53077 Rails4: replace deprecated Relation#first with finder options at TrackersControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12643 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 10:14:08 +00:00
Toshi MARUYAMA eab8f307f9 Rails4: replace deprecated Relation#first with finder options at TimelogControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12642 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 10:13:53 +00:00
Toshi MARUYAMA abd6471270 Rails4: replace deprecated Relation#first with finder options at RepositoriesGitControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12641 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 10:13:37 +00:00
Toshi MARUYAMA 309e588440 Rails4: replace deprecated Relation#first with finder options at RepositoriesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12640 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 10:13:21 +00:00
Toshi MARUYAMA b47fc8f618 Rails4: replace deprecated Relation#first with finder options at MessagesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12639 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 10:13:05 +00:00
Toshi MARUYAMA 190bb9af30 Rails4: replace deprecated Relation#first with finder options at IssuesControllerTransactionTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12638 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 10:12:49 +00:00
Toshi MARUYAMA 1bb79568e5 Rails4: replace deprecated Relation#update_all at SearchControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12637 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 09:25:12 +00:00
Toshi MARUYAMA 45496b0eb2 Rails4: replace deprecated Relation#first with finder options at UsersControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12636 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 09:24:56 +00:00
Toshi MARUYAMA 378a3e684f Rails4: replace deprecated Relation#first with finder options at WikiControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12635 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 09:24:40 +00:00
Toshi MARUYAMA a313d540a6 code format cleanup WikiControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12634 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 09:24:24 +00:00
Toshi MARUYAMA 6097d6b1bf Rails4: replace deprecated find_all_by_* at TimelogCustomFieldsVisibilityTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12633 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 09:24:08 +00:00
Toshi MARUYAMA 6e8d8da1f3 Rails4: replace deprecated Relation#update_all at ProjectEnumerationsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12632 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 09:23:52 +00:00
Toshi MARUYAMA e11c68e417 Rails4: replace deprecated find_all_by_* at ProjectEnumerationsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12631 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 09:23:36 +00:00
Toshi MARUYAMA d401f86b0d fix find_all_by_id(n1, n2) parameter at TimelogCustomFieldsVisibilityTest
find_all_by_id(n1, n2) returns only n1 result.

git-svn-id: http://svn.redmine.org/redmine/trunk@12630 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 08:50:21 +00:00
Toshi MARUYAMA 97a4211b03 code format cleanup TimelogCustomFieldsVisibilityTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12629 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 08:50:07 +00:00
Toshi MARUYAMA a516a1bdb2 Rails4: replace deprecated find_all_by_* at IssuesCustomFieldsVisibilityTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12628 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 08:32:28 +00:00
Toshi MARUYAMA 8c595df595 Rails4: replace deprecated find_all_by_* at IssuesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12627 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 08:32:12 +00:00
Toshi MARUYAMA 65ba233c62 Rails4: replace deprecated Relation#last with finder options at MessagesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12626 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 07:47:18 +00:00
Toshi MARUYAMA 7ac013fbe8 Rails4: replace deprecated Relation#last with finder options at IssuesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12625 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 07:47:02 +00:00
Toshi MARUYAMA 15031f6173 code format cleanup ProjectEnumerationsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12624 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 07:46:46 +00:00
Toshi MARUYAMA e30aa4b245 code format cleanup MessagesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12623 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 07:46:29 +00:00
Toshi MARUYAMA 20482fdee3 Rails4: replace deprecated find_all_by_* at IssuesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12622 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 07:22:39 +00:00
Toshi MARUYAMA ca4ea40888 fix find_all_by_id(n1, n2) parameter at IssuesCustomFieldsVisibilityTest#test_index_with_partial_custom_field_visibility
find_all_by_id(n1, n2) returns only n1 result.

git-svn-id: http://svn.redmine.org/redmine/trunk@12621 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 07:05:48 +00:00
Toshi MARUYAMA 7484cf07b6 cleanup syntax of Relation#all at WikiController#export
git-svn-id: http://svn.redmine.org/redmine/trunk@12620 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 06:03:38 +00:00
Toshi MARUYAMA 39ceaa7d55 cleanup syntax of Relation#all at app/views/watchers/_new.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12619 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 05:51:35 +00:00
Toshi MARUYAMA 2066969c7d code format cleanup WikiController
git-svn-id: http://svn.redmine.org/redmine/trunk@12618 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 05:51:18 +00:00
Toshi MARUYAMA 3e17eb2956 code format cleanup app/views/watchers/_new.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12617 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-11 05:26:33 +00:00
Toshi MARUYAMA a7b8e6c02a Rails4: replace deprecated find_all_by_* at WatchersController
git-svn-id: http://svn.redmine.org/redmine/trunk@12616 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 12:49:52 +00:00
Toshi MARUYAMA a3f0dae9c4 Rails4: replace deprecated find_all_by_* at RepositoriesController#committers
git-svn-id: http://svn.redmine.org/redmine/trunk@12615 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 12:49:35 +00:00
Toshi MARUYAMA 073b403bd9 Rails4: replace deprecated Relation#update_all at Project#create_time_entry_activity_if_needed
git-svn-id: http://svn.redmine.org/redmine/trunk@12614 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 12:49:20 +00:00
Toshi MARUYAMA 1c71eccff2 remove unneeded Relation#all from app/views/settings/_repositories.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12613 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 12:49:04 +00:00
Toshi MARUYAMA fa544d9934 Rails4: replace deprecated Relation#count with finder options at UsersHelper#users_status_options_for_select
git-svn-id: http://svn.redmine.org/redmine/trunk@12612 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 12:48:48 +00:00
Toshi MARUYAMA 9420d7e345 Rails4: replace deprecated Relation#first with finder options at ApiTest::VersionsTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12611 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 12:24:19 +00:00
Toshi MARUYAMA 7a4e325b36 remove unneeded Relation#all from app/views/settings/_projects.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12610 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 12:13:10 +00:00
Toshi MARUYAMA 373082fcbf code format cleanup app/views/settings/_repositories.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12609 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 12:12:53 +00:00
Toshi MARUYAMA ea9b40ab4d Rails4: replace deprecated Relation#first with finder options at ApiTest::VersionsTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12608 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 11:25:25 +00:00
Toshi MARUYAMA c538543583 Rails4: replace deprecated Relation#first with finder options at ApiTest::UsersTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12607 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 11:24:59 +00:00
Toshi MARUYAMA 7f93cc74b4 Rails4: replace deprecated Relation#first with finder options at ApiTest::TimeEntriesTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12606 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 11:24:34 +00:00
Toshi MARUYAMA 505483f224 Rails4: replace deprecated Relation#first with finder options at ApiTest::ProjectsTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12605 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 11:24:00 +00:00
Toshi MARUYAMA e03cfe1443 remove unneeded Relation#all from RepositoriesHelper#render_changeset_changes
git-svn-id: http://svn.redmine.org/redmine/trunk@12604 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 11:23:28 +00:00
Toshi MARUYAMA b02429e864 Rails4: replace deprecated find_all_by_* at TimelogController#find_time_entries
git-svn-id: http://svn.redmine.org/redmine/trunk@12603 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 10:40:46 +00:00
Toshi MARUYAMA c57490f48e cleanup syntax of Relation#all at QueriesController#index
git-svn-id: http://svn.redmine.org/redmine/trunk@12602 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 10:30:57 +00:00
Toshi MARUYAMA 72715ec78e cleanup syntax of Relation#all at MembersController#index
git-svn-id: http://svn.redmine.org/redmine/trunk@12601 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 10:30:33 +00:00
Toshi MARUYAMA fe6ef59e37 cleanup syntax of Relation#all at IssueStatusesController#index
git-svn-id: http://svn.redmine.org/redmine/trunk@12600 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 10:30:10 +00:00
Toshi MARUYAMA d02bcbcee5 Rails4: replace deprecated Relation#first with finder options at integration IssuesTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12599 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 08:39:32 +00:00
Toshi MARUYAMA 1c938cd1d3 Rails4: replace deprecated Relation#first with finder options at ApiTest::IssuesTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12598 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 08:38:59 +00:00
Toshi MARUYAMA b6d6325198 Rails4: replace deprecated Relation#first with finder options at ApiTest::IssueRelationsTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12597 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 08:38:36 +00:00
Toshi MARUYAMA 3480d46ff3 Rails4: replace deprecated Relation#first with finder options at ApiTest::IssueCategoriesTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12596 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 08:38:09 +00:00
Toshi MARUYAMA c020578820 Rails4: replace deprecated Relation#first with finder options at ApiTest::AttachmentsTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12595 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 08:37:33 +00:00
Toshi MARUYAMA b652f7fc27 cleanup syntax of Relation#all at NewsController#index
git-svn-id: http://svn.redmine.org/redmine/trunk@12594 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 08:13:47 +00:00
Toshi MARUYAMA 99fe35be42 remove unneeded Relation#all from AuthSource#authenticate
git-svn-id: http://svn.redmine.org/redmine/trunk@12593 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 08:00:57 +00:00
Toshi MARUYAMA 4292f4116b Rails4: replace deprecated Relation#count with finder options at ProjectsController#show
git-svn-id: http://svn.redmine.org/redmine/trunk@12592 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 07:46:53 +00:00
Toshi MARUYAMA f7a1664399 cleanup syntax of Relation#all at app/views/wiki/rename.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12591 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 07:46:23 +00:00
Toshi MARUYAMA 6f4d3c1c64 Rails4: replace deprecated Relation#first with finder options at IssuesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12590 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 05:46:33 +00:00
Toshi MARUYAMA 57740505b0 remove unneeded Relation#all from IssuesControllerTest#test_bulk_copy_to_another_project
git-svn-id: http://svn.redmine.org/redmine/trunk@12589 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 05:46:15 +00:00
Toshi MARUYAMA 56a3c1ad40 Rails4: replace deprecated Relation#sum with finder options at Issue#total_spent_hours
git-svn-id: http://svn.redmine.org/redmine/trunk@12588 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 05:02:44 +00:00
Toshi MARUYAMA 5d535f8996 cleanup syntax of Relation#all at app/views/wiki/edit.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12587 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 04:45:46 +00:00
Toshi MARUYAMA c1c1b548d0 remove unneeded Relation#all from IssuesControllerTest#test_bulk_copy_should_allow_not_changing_the_issue_attributes
git-svn-id: http://svn.redmine.org/redmine/trunk@12586 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 04:45:28 +00:00
Toshi MARUYAMA 3fcd5d529c add missing Relation#all at WorkflowsController#copy of r12583
git-svn-id: http://svn.redmine.org/redmine/trunk@12585 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 04:19:47 +00:00
Toshi MARUYAMA c7723e9bc9 Rails4: replace deprecated Relation#first with finder options at IssueRelationsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12584 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 04:11:53 +00:00
Toshi MARUYAMA ee49bdd81b Rails4: replace deprecated find_all_by_* at WorkflowsController#copy
git-svn-id: http://svn.redmine.org/redmine/trunk@12583 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 04:11:36 +00:00
Toshi MARUYAMA efb5d5769a Rails4: replace deprecated Relation#last with finder options at IssuesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12582 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 04:11:20 +00:00
Toshi MARUYAMA c0303bf47c remove unneeded Relation#all from WorkflowsControllerTest#status_transitions
git-svn-id: http://svn.redmine.org/redmine/trunk@12581 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 03:54:23 +00:00
Toshi MARUYAMA 0a72533b59 Rails4: replace deprecated Relation#update_all at IssuesController
git-svn-id: http://svn.redmine.org/redmine/trunk@12580 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 03:39:51 +00:00
Toshi MARUYAMA 09147940fa Rails4: replace deprecated find_all_by_* at IssuesController
git-svn-id: http://svn.redmine.org/redmine/trunk@12579 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 03:39:35 +00:00
Toshi MARUYAMA 7c10f41ce3 Rails4: replace deprecated Relation#first with finder options at AttachmentsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12578 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-10 01:21:07 +00:00
Toshi MARUYAMA d852b8a4e6 remove unneeded Relation#all from RepositorySubversionTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12577 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 09:55:26 +00:00
Toshi MARUYAMA e41271f2bd remove unneeded Relation#all from RepositoryMercurialTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12576 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 09:55:10 +00:00
Toshi MARUYAMA 776bf76f46 remove unneeded Relation#all from RepositoryDarcsTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12575 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 09:54:54 +00:00
Toshi MARUYAMA 4ab85ff0cb remove unneeded Relation#all from RepositoryCvsTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12574 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 09:54:37 +00:00
Toshi MARUYAMA 890851eb85 remove unneeded Relation#all from RepositoryBazaarTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12573 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 09:54:21 +00:00
Toshi MARUYAMA ac72e7a8d5 remove unneeded Relation#all from Watcher#prune
git-svn-id: http://svn.redmine.org/redmine/trunk@12572 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 08:35:10 +00:00
Toshi MARUYAMA 907663f83c Rails4: replace deprecated find_all_by_* at UserTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12571 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 08:14:21 +00:00
Toshi MARUYAMA b3dbe07c95 Rails4: replace deprecated find_all_by_* at FieldFormat
git-svn-id: http://svn.redmine.org/redmine/trunk@12570 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 08:14:06 +00:00
Toshi MARUYAMA 6dbb9c3677 remove unneeded Relation#all from Watcher#prune_single_user
git-svn-id: http://svn.redmine.org/redmine/trunk@12569 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 07:41:50 +00:00
Toshi MARUYAMA 05aa146fad code format cleanup Watcher model
git-svn-id: http://svn.redmine.org/redmine/trunk@12568 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 07:41:34 +00:00
Toshi MARUYAMA 8a9db2841d backout r12562 : remove unneeded Relation#all from Repository::Mercurial#latest_changesets
git-svn-id: http://svn.redmine.org/redmine/trunk@12567 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 07:07:06 +00:00
Toshi MARUYAMA eb98a1f714 backout r12540 : remove unneeded Relation#all from News#latest
git-svn-id: http://svn.redmine.org/redmine/trunk@12566 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 07:06:50 +00:00
Toshi MARUYAMA a6da09026a Rails4: replace deprecated Relation#first with finder options at WikiContentTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12565 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 06:43:49 +00:00
Toshi MARUYAMA d305d15373 Rails4: replace deprecated Relation#first with finder options at UserTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12564 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 06:43:33 +00:00
Toshi MARUYAMA 3ca03beb6f Rails4: replace deprecated find_all_by_* at IssueQuery model
git-svn-id: http://svn.redmine.org/redmine/trunk@12563 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 06:34:40 +00:00
Toshi MARUYAMA 1ddabbc874 remove unneeded Relation#all from Repository::Mercurial#latest_changesets
git-svn-id: http://svn.redmine.org/redmine/trunk@12562 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 05:25:05 +00:00
Toshi MARUYAMA 5315943bb9 remove trailing white-spaces from RepositoryTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12561 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 05:09:44 +00:00
Toshi MARUYAMA 01e22fc4b8 code format cleanup RepositoryTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12560 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 05:09:28 +00:00
Toshi MARUYAMA 205e727565 Rails4: replace deprecated find_all_by_* at ProjectTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12559 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 05:09:10 +00:00
Toshi MARUYAMA 56a40b3579 Rails4: replace deprecated find_all_by_* at RepositoryTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12558 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 05:08:54 +00:00
Toshi MARUYAMA 95bc7bf189 Rails4: replace deprecated Relation#update_all at RepositoryTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12557 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 05:08:38 +00:00
Toshi MARUYAMA 7960f543a4 remove unneeded Relation#all from ProjectTest#test_destroy
git-svn-id: http://svn.redmine.org/redmine/trunk@12556 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 04:30:17 +00:00
Toshi MARUYAMA ab46ef7c15 Rails4: replace deprecated Relation#update_all at QueryTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12555 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 04:24:24 +00:00
Toshi MARUYAMA 494a13d004 Rails4: replace deprecated Relation#update_all at ProjectTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12554 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 04:24:07 +00:00
Toshi MARUYAMA d15183b2e7 Rails4: replace deprecated Relation#update_all at WatcherTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12553 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 04:23:51 +00:00
Toshi MARUYAMA d7f986b6a8 Rails4: replace deprecated Relation#update_all at ProjectNestedSetTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12552 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 04:23:36 +00:00
Toshi MARUYAMA 394628f205 Rails4: replace deprecated Relation#first with finder options at MailHandlerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12551 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 04:23:19 +00:00
Toshi MARUYAMA 132021f895 Rails4: replace deprecated Relation#first with finder options at CipheringTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12550 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 04:23:03 +00:00
Toshi MARUYAMA bb54f0b7c5 Rails4: replace deprecated Relation#first with finder options at IssueTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12549 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 04:22:47 +00:00
Toshi MARUYAMA a6c18dce13 Rails4: replace deprecated find_all_by_* at Tracker model
git-svn-id: http://svn.redmine.org/redmine/trunk@12548 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 03:51:14 +00:00
Toshi MARUYAMA 92a948855e Rails4: replace deprecated Relation#update_all at IssueTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12547 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 03:35:14 +00:00
Toshi MARUYAMA d12c8e8397 Rails4: replace deprecated Relation#update_all at Repository model
git-svn-id: http://svn.redmine.org/redmine/trunk@12546 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 03:34:58 +00:00
Toshi MARUYAMA 4245a88542 Rails4: replace deprecated find_all_by_* at WikiPageTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12545 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 02:37:21 +00:00
Toshi MARUYAMA ecda4d33e8 Rails4: replace deprecated Relation#update_all at User model
git-svn-id: http://svn.redmine.org/redmine/trunk@12544 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 02:37:06 +00:00
Toshi MARUYAMA 09884154c9 code format cleanup ChangesetTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12543 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 00:06:06 +00:00
Toshi MARUYAMA facf04593f remove unneeded Relation#all from MailHandler#add_watchers
git-svn-id: http://svn.redmine.org/redmine/trunk@12542 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 00:05:50 +00:00
Toshi MARUYAMA c0e587ffc4 remove unneeded Relation#all from Project#copy_issues
git-svn-id: http://svn.redmine.org/redmine/trunk@12541 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 00:05:33 +00:00
Toshi MARUYAMA ca4dcdc3af remove unneeded Relation#all from News#latest
git-svn-id: http://svn.redmine.org/redmine/trunk@12540 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 00:05:14 +00:00
Toshi MARUYAMA d9624990e0 remove unneeded Relation#all from ChangesetTest#test_ref_keywords_closing_with_timelog
git-svn-id: http://svn.redmine.org/redmine/trunk@12539 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 00:04:56 +00:00
Toshi MARUYAMA ac214f5480 Rails4: replace deprecated Relation#first with finder options at ChangesetTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12538 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-09 00:04:38 +00:00
Toshi MARUYAMA 5feb02c31d Rails4: replace deprecated Relation#calculate with finder options at Issue model
git-svn-id: http://svn.redmine.org/redmine/trunk@12537 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 14:53:29 +00:00
Toshi MARUYAMA 66bdc014d4 remove unneeded Relation#all from Group#user_removed
git-svn-id: http://svn.redmine.org/redmine/trunk@12536 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 13:26:02 +00:00
Toshi MARUYAMA 1c2c4c484e Rails4: replace deprecated find_all_by_* at WikiPageTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12535 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 12:43:27 +00:00
Toshi MARUYAMA 143a1d8ec3 remove unneeded Relation#all from WikiPage#handle_redirects
git-svn-id: http://svn.redmine.org/redmine/trunk@12534 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 12:43:10 +00:00
Toshi MARUYAMA 95d86daef3 Rails4: replace deprecated find_all_by_* at WikiPage model
git-svn-id: http://svn.redmine.org/redmine/trunk@12533 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 12:42:53 +00:00
Toshi MARUYAMA 8aa22a05f4 Rails4: replace deprecated Relation#update_all at Issue model
git-svn-id: http://svn.redmine.org/redmine/trunk@12532 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 12:20:52 +00:00
Toshi MARUYAMA 84f43584f9 Rails4: replace deprecated Relation#update_all at IssueCategory model
git-svn-id: http://svn.redmine.org/redmine/trunk@12531 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 12:20:35 +00:00
Toshi MARUYAMA fb877ddcfb Rails4: replace deprecated Relation#update_all at GroupTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12530 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 12:20:16 +00:00
Toshi MARUYAMA 9f079015bf Rails4: replace deprecated Relation#update_all at Group model
git-svn-id: http://svn.redmine.org/redmine/trunk@12529 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 12:19:59 +00:00
Toshi MARUYAMA 599ac20570 Rails4: replace deprecated Relation#update_all at Issue model
git-svn-id: http://svn.redmine.org/redmine/trunk@12528 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 10:27:37 +00:00
Toshi MARUYAMA e80d9bb69a Rails4: replace deprecated Relation#update_all at IssueTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12527 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 10:11:32 +00:00
Toshi MARUYAMA 78ca50560a Rails4: replace deprecated Relation#update_all at acts_as_list
git-svn-id: http://svn.redmine.org/redmine/trunk@12526 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 10:11:16 +00:00
Toshi MARUYAMA 74ccf34361 Rails4: replace deprecated Relation#first with finder options at IssueCategoryTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12525 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 10:11:00 +00:00
Toshi MARUYAMA 2b36ff7016 Rails4: replace deprecated Relation#update_all at User model
git-svn-id: http://svn.redmine.org/redmine/trunk@12524 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 06:58:33 +00:00
Toshi MARUYAMA ce2e9158a5 Rails4: replace deprecated find_all_by_* at ProjectEnumerationsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12523 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 06:42:52 +00:00
Toshi MARUYAMA 184ea832d6 Rails4: replace deprecated Relation#first with finder options at NewsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12522 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 06:26:25 +00:00
Toshi MARUYAMA 4f28ed2fb4 Rails4: replace deprecated Relation#first with finder options at NewsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12521 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 06:23:43 +00:00
Toshi MARUYAMA 273e7420d4 Rails4: replace deprecated passing options to find at MessagesController
git-svn-id: http://svn.redmine.org/redmine/trunk@12520 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 06:11:46 +00:00
Toshi MARUYAMA c92f425309 Rails4: replace deprecated Relation#update_all at IssuesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12519 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 06:03:54 +00:00
Toshi MARUYAMA d731c036fb Rails4: replace deprecated find_all_by_* at GroupsController
git-svn-id: http://svn.redmine.org/redmine/trunk@12518 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 05:55:52 +00:00
Toshi MARUYAMA 251e3cc7fa remove unneeded Relation#all from app/views/custom_fields/_form.html.erb
git-svn-id: http://svn.redmine.org/redmine/trunk@12517 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 05:36:34 +00:00
Toshi MARUYAMA 585d93e499 Rails4: replace deprecated Relation#first with finder options at WikiPageTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12516 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 05:14:18 +00:00
Toshi MARUYAMA 2977f95ad9 Rails4: replace deprecated find_all_by_* at WikiPage model
git-svn-id: http://svn.redmine.org/redmine/trunk@12515 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 05:09:05 +00:00
Toshi MARUYAMA 035c68f1a9 Rails4: replace deprecated Relation#first with finder options at ChangesetTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12514 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 05:02:14 +00:00
Toshi MARUYAMA 4ca6fb4226 Rails4: replace deprecated Relation#update_all at BoardsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12513 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 04:58:29 +00:00
Toshi MARUYAMA 30e3e7e0b4 Rails4: replace deprecated Relation#update_all at Member model
git-svn-id: http://svn.redmine.org/redmine/trunk@12512 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 04:58:13 +00:00
Toshi MARUYAMA 5b77bd0076 Rails4: replace deprecated Relation#update_all at IssueStatus model
git-svn-id: http://svn.redmine.org/redmine/trunk@12511 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 04:57:56 +00:00
Toshi MARUYAMA c4a9339e3f Rails4: replace deprecated Relation#update_all at Enumeration model
git-svn-id: http://svn.redmine.org/redmine/trunk@12510 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 04:57:38 +00:00
Toshi MARUYAMA d9dc18011d Rails4: replace deprecated Relation#first with finder options at IssueCategoriesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12509 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 04:32:31 +00:00
Toshi MARUYAMA 7d4420fe19 Rails4: replace deprecated Relation#first with finder options at GroupsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12508 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 04:32:16 +00:00
Toshi MARUYAMA 848edf35fa Rails4: replace deprecated Relation#first with finder options at DocumentsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12507 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 04:32:00 +00:00
Toshi MARUYAMA 6204bcb34e Rails4: replace deprecated Relation#first with finder options at BoardsControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12506 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 04:31:45 +00:00
Toshi MARUYAMA 375eca924c Rails4: replace deprecated Relation#first with finder options at AccountControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12505 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 04:31:29 +00:00
Toshi MARUYAMA 76110407b7 Rails4: replace deprecated Relation#update_all at acts_as_list
git-svn-id: http://svn.redmine.org/redmine/trunk@12504 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 04:13:18 +00:00
Toshi MARUYAMA 6dcfa742fd Rails4: replace deprecated Relation#update_all at Board model
git-svn-id: http://svn.redmine.org/redmine/trunk@12503 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 04:03:11 +00:00
Toshi MARUYAMA ab6ac3b08f Rails4: replace deprecated Relation#update_all at Message model
git-svn-id: http://svn.redmine.org/redmine/trunk@12502 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 03:51:50 +00:00
Toshi MARUYAMA 0788000809 Rails4: replace deprecated Relation#first with finder options at AccountControllerOpenidTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12501 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 03:31:04 +00:00
Toshi MARUYAMA 8a6f4c3880 Rails4: replace deprecated Relation#first with finder options at AttachmentTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12500 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-08 02:49:09 +00:00
Toshi MARUYAMA 89b5518e0b Rails4: replace deprecated find_all_by_* at Journal model
git-svn-id: http://svn.redmine.org/redmine/trunk@12499 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-07 15:55:03 +00:00
Toshi MARUYAMA 52bcc01b32 Rails4: replace deprecated find_all_by_* at IssueQuery model
git-svn-id: http://svn.redmine.org/redmine/trunk@12498 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-07 15:54:47 +00:00
Toshi MARUYAMA d020a06c5c Rails4: replace deprecated find_all_by_* at ProjectTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12497 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-07 15:43:21 +00:00
Toshi MARUYAMA d884d09cc2 Rails4: replace deprecated find_all_by_* at MessageTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12496 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-07 15:43:05 +00:00
Toshi MARUYAMA 8dc4992973 Rails4: replace deprecated find_all_by_* at IssueTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12495 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-07 15:42:49 +00:00
Toshi MARUYAMA 1d0c93792b Rails4: replace deprecated Relation#update_all at SetDefaultRepositories db migration
git-svn-id: http://svn.redmine.org/redmine/trunk@12494 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-07 14:54:20 +00:00
Toshi MARUYAMA 9eaa4a7c1a Rails4: replace deprecated Relation#update_all at Repository model
git-svn-id: http://svn.redmine.org/redmine/trunk@12493 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-07 14:54:05 +00:00
Toshi MARUYAMA 691e218a75 add unit test to have one default repository
git-svn-id: http://svn.redmine.org/redmine/trunk@12492 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-07 14:53:49 +00:00
Toshi MARUYAMA f8df0e729c Rails4: deprecated find_by methods with options at ApplicationHelper
git-svn-id: http://svn.redmine.org/redmine/trunk@12491 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-07 14:11:03 +00:00
Toshi MARUYAMA a8c8266b9d Rails4: replace deprecated Relation#update_all at application helper test
git-svn-id: http://svn.redmine.org/redmine/trunk@12490 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-07 13:26:13 +00:00
Toshi MARUYAMA 14fa4dc683 Rails4: replace deprecated Relation#update_all at IssuePriority model
git-svn-id: http://svn.redmine.org/redmine/trunk@12489 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-07 12:33:43 +00:00
Toshi MARUYAMA 0bc3ef5014 Rails4: replace deprecated Relation#update_all at db migrations
git-svn-id: http://svn.redmine.org/redmine/trunk@12488 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-07 10:03:11 +00:00
Toshi MARUYAMA a5f028a242 use lambda form in acts_as_tree scope (#12499)
git-svn-id: http://svn.redmine.org/redmine/trunk@12487 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-07 10:02:50 +00:00
Toshi MARUYAMA e17bf40fe1 use lambda form in Version model scope (#12499)
git-svn-id: http://svn.redmine.org/redmine/trunk@12486 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-07 07:51:15 +00:00
Toshi MARUYAMA 73b27124f1 Rails4: replace deprecated Relation#update_all at CreateCustomFieldsRoles db migration
git-svn-id: http://svn.redmine.org/redmine/trunk@12485 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-07 07:50:59 +00:00
Jean-Philippe Lang d2f540358f Store mime type lookups in a hash.
git-svn-id: http://svn.redmine.org/redmine/trunk@12484 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-05 17:56:21 +00:00
Jean-Philippe Lang e1189c5335 Use the mime-types gem for getting mime types from filenames (#15790).
git-svn-id: http://svn.redmine.org/redmine/trunk@12483 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-05 16:35:59 +00:00
Jean-Philippe Lang 1f50862586 Use Rails.application.config.i18n.load_path for adding plugin locales (#12753).
Patch by Takeshi Yaegashi.

git-svn-id: http://svn.redmine.org/redmine/trunk@12482 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-05 14:46:22 +00:00
Jean-Philippe Lang 77ac3b7891 Reduces the number of subqueries when searching with many custom fields set as searchable (#15781).
git-svn-id: http://svn.redmine.org/redmine/trunk@12481 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-05 14:23:36 +00:00
Jean-Philippe Lang 7087dbb5b4 Fixed assertion for postgresql and sqlite (#8842).
git-svn-id: http://svn.redmine.org/redmine/trunk@12480 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-04 08:22:50 +00:00
Jean-Philippe Lang 3c540594dc Fixed test failure with ruby1.8 (#8842).
git-svn-id: http://svn.redmine.org/redmine/trunk@12479 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-03 19:42:43 +00:00
Jean-Philippe Lang 429b3a5dae Fixed test failure with sqlite (#8842).
git-svn-id: http://svn.redmine.org/redmine/trunk@12478 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-03 16:36:04 +00:00
Jean-Philippe Lang a4d3da988a Allow filtering with timestamp (#8842).
git-svn-id: http://svn.redmine.org/redmine/trunk@12477 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-03 15:54:49 +00:00
Jean-Philippe Lang 58a63c49c4 Fixed that magic links to existing attachments are not converted when previewing issue notes.
git-svn-id: http://svn.redmine.org/redmine/trunk@12476 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-03 14:42:15 +00:00
Toshi MARUYAMA 4ccc7dff14 svn propset svn:eol-style native test fixture (#15785)
git-svn-id: http://svn.redmine.org/redmine/trunk@12475 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-01 05:57:50 +00:00
Toshi MARUYAMA 803a0a030e support more character encoding in incoming emails (#15785)
Supporting encodings of iconv on Ruby 1.8 depend on iconv implementation.
glibc-common-2.12-1.132 on CentOS6 does not support ks_c_5601-1987.

Contributed by Felix Schäfer.

git-svn-id: http://svn.redmine.org/redmine/trunk@12474 e93f8b46-1217-0410-a6f0-8f06a7374b81
2014-01-01 05:54:28 +00:00
Toshi MARUYAMA 3ace0292c2 Rails4: replace deprecated find_by_id at Changeset class
git-svn-id: http://svn.redmine.org/redmine/trunk@12473 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-29 13:49:09 +00:00
Toshi MARUYAMA 9cefc90b0b Rails4: scm: reload repository after destroying changesets in incremental fetch test
git-svn-id: http://svn.redmine.org/redmine/trunk@12472 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-29 13:48:52 +00:00
Toshi MARUYAMA e9470e5585 explicitly define fix has_and_belongs_to_many join_table at Group and User
Rails4 cannot resolve automatically.

git-svn-id: http://svn.redmine.org/redmine/trunk@12471 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-27 23:33:15 +00:00
Toshi MARUYAMA 24904b4a03 Rails4 compatibility of RepositoryTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12470 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-27 03:40:30 +00:00
Toshi MARUYAMA 74dbb35b87 fix find_all_by_id(n1, n2) parameter at test_member_of_scope_should_return_the_union_of_all_members of PrincipalTest
find_all_by_id(n1, n2) returns only n1 result.

git-svn-id: http://svn.redmine.org/redmine/trunk@12469 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-27 03:26:05 +00:00
Toshi MARUYAMA 2959818688 fix find_all_by_id(n1, n2) parameter at test_not_member_of_scope_should_return_users_that_have_no_memberships of PrincipalTest
find_all_by_id(n1, n2) returns only n1 result.

git-svn-id: http://svn.redmine.org/redmine/trunk@12468 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-27 03:25:49 +00:00
Toshi MARUYAMA 8ec6004a7f fix find_all_by_id(n1, n2) parameter at test_show_export_to_pdf_with_changesets of IssuesControllerTest
find_all_by_id(n1, n2) returns only n1 result.

git-svn-id: http://svn.redmine.org/redmine/trunk@12467 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-27 03:25:32 +00:00
Toshi MARUYAMA 9c8e00057e Rails4 compatibility of ProjectTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12466 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-26 10:45:13 +00:00
Toshi MARUYAMA 25a0bde311 Rails4 compatibility of version group count
git-svn-id: http://svn.redmine.org/redmine/trunk@12465 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-26 10:33:18 +00:00
Toshi MARUYAMA 61c6858b05 code format cleanup Principal class
git-svn-id: http://svn.redmine.org/redmine/trunk@12464 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-26 09:19:56 +00:00
Toshi MARUYAMA c97986aa52 remove unneeded including ApplicationHelper from helper tests
git-svn-id: http://svn.redmine.org/redmine/trunk@12463 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-26 04:27:21 +00:00
Toshi MARUYAMA e9a48cf86a remove unneeded 'redmine/field_format' requirement from FieldFormatTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12462 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-26 04:11:16 +00:00
Toshi MARUYAMA 461c93a2dc fix typo redcarpet requirement in lib/redmine.rb (#15520)
git-svn-id: http://svn.redmine.org/redmine/trunk@12461 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-26 03:52:25 +00:00
Toshi MARUYAMA ce57d7b24a fix Pagination helper test class name
git-svn-id: http://svn.redmine.org/redmine/trunk@12460 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-26 03:18:57 +00:00
Toshi MARUYAMA 60640d4a59 Traditional Chinese translation updated by ChunChang Lo (#15764)
git-svn-id: http://svn.redmine.org/redmine/trunk@12457 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-24 05:47:48 +00:00
Toshi MARUYAMA e10aa2529d change requirement in bazaar lib as same with other scm libs (#15756)
git-svn-id: http://svn.redmine.org/redmine/trunk@12456 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-24 05:06:36 +00:00
Jean-Philippe Lang a657a12450 Don't load redcarpet with JRuby.
git-svn-id: http://svn.redmine.org/redmine/trunk@12453 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-23 17:07:51 +00:00
Jean-Philippe Lang 471e01ca50 Adds experimental support for Markdown formatting with redcarpet (#15520).
git-svn-id: http://svn.redmine.org/redmine/trunk@12452 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-23 13:05:10 +00:00
Jean-Philippe Lang 6311ade827 Rescue syntax highlighter exceptions.
git-svn-id: http://svn.redmine.org/redmine/trunk@12451 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-23 12:39:18 +00:00
Jean-Philippe Lang 0dc98aabe6 Adds an option for formatter display name.
git-svn-id: http://svn.redmine.org/redmine/trunk@12450 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-23 12:33:42 +00:00
Jean-Philippe Lang 0fabbd281e Updates for 2.4.2 release.
git-svn-id: http://svn.redmine.org/redmine/trunk@12447 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-23 08:46:47 +00:00
Toshi MARUYAMA f81f5589f9 Bulgarian translation updated by Ivan Cenov (#15755)
git-svn-id: http://svn.redmine.org/redmine/trunk@12446 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-23 02:20:21 +00:00
Jean-Philippe Lang b8c94d93e9 Fixed slow SELECT ... FOR UPDATE query when deleting an issue.
git-svn-id: http://svn.redmine.org/redmine/trunk@12445 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-22 15:49:53 +00:00
Toshi MARUYAMA 14bd57eb47 back out r12441
It is not compatible with Ruby 1.8.7.

git-svn-id: http://svn.redmine.org/redmine/trunk@12443 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-22 14:41:44 +00:00
Jean-Philippe Lang 4333a80bc1 Adds support for links on values for various custom field formats (#1358).
git-svn-id: http://svn.redmine.org/redmine/trunk@12442 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-22 14:09:33 +00:00
Toshi MARUYAMA b8b358a85f Rails4 compatibility of stylesheet_link_tag and javascript_include_tag at ApplicationHelper
git-svn-id: http://svn.redmine.org/redmine/trunk@12441 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-22 12:58:04 +00:00
Toshi MARUYAMA 90d3bb28b2 add stderr to config.active_support.deprecation in test and dev env
git-svn-id: http://svn.redmine.org/redmine/trunk@12440 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-22 12:39:56 +00:00
Toshi MARUYAMA b9db2228c0 replace deprecated Version#completed_pourcent at lib/redmine/helpers/gantt.rb (#12724)
git-svn-id: http://svn.redmine.org/redmine/trunk@12439 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-22 12:39:38 +00:00
Jean-Philippe Lang 5ee277fa22 Fixed that OpenID authentication fails with 422 error due to token verification (#15735).
git-svn-id: http://svn.redmine.org/redmine/trunk@12438 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-21 12:04:38 +00:00
Toshi MARUYAMA 2db5fc1a66 use environment variable for running independent tests (units etc.) in ci.rake
git-svn-id: http://svn.redmine.org/redmine/trunk@12437 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-21 12:00:08 +00:00
Jean-Philippe Lang bea821166d Fixed multiple scrollbars in project tree (#15741).
git-svn-id: http://svn.redmine.org/redmine/trunk@12435 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-21 11:34:28 +00:00
Toshi MARUYAMA 637e450824 make WatchersHelperTest passes when config.threadsafe! is enabled (#12097)
git-svn-id: http://svn.redmine.org/redmine/trunk@12428 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-21 11:13:39 +00:00
Toshi MARUYAMA fc4df508f0 make IssuesHelperTest passes when config.threadsafe! is enabled (#12097)
git-svn-id: http://svn.redmine.org/redmine/trunk@12427 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-21 11:08:51 +00:00
Toshi MARUYAMA 694394b04e use environment variable for extacting SCM repositories in ci.rake
git-svn-id: http://svn.redmine.org/redmine/trunk@12426 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-21 09:30:53 +00:00
Toshi MARUYAMA f9b5543075 fix svn raw diff failure on svn version 1.6.17 (revision 1128011)
git-svn-id: http://svn.redmine.org/redmine/trunk@12424 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-20 17:17:08 +00:00
Toshi MARUYAMA 3e4d4a0c1a Rails4 compatibility of Setting model
git-svn-id: http://svn.redmine.org/redmine/trunk@12423 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-20 11:54:23 +00:00
Toshi MARUYAMA 9b5ce4b7b4 Rails4: db migrate: replace "Permission.find_by_controller_and_action"
git-svn-id: http://svn.redmine.org/redmine/trunk@12422 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-20 07:10:46 +00:00
Jean-Philippe Lang 5c5ba0c61a Fixed that time entries custom values are not deleted when deleting a project or an issue (#15709).
git-svn-id: http://svn.redmine.org/redmine/trunk@12421 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-18 18:39:09 +00:00
Jean-Philippe Lang d4297ca3ff Fixed that text/plain attachments are added to issue description (#15684).
git-svn-id: http://svn.redmine.org/redmine/trunk@12420 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-18 18:13:13 +00:00
Jean-Philippe Lang 0ee2af4c06 Fixed that previous assignee is not notified on issue update (#15714).
git-svn-id: http://svn.redmine.org/redmine/trunk@12419 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-17 20:48:18 +00:00
Toshi MARUYAMA 82fb19a464 Traditional Chinese translation updated by ChunChang Lo (#15710)
git-svn-id: http://svn.redmine.org/redmine/trunk@12418 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-16 07:48:06 +00:00
Jean-Philippe Lang d5feb01b7e Removed unused variable.
git-svn-id: http://svn.redmine.org/redmine/trunk@12417 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-15 11:03:48 +00:00
Jean-Philippe Lang 77665b5252 Store relation type instead of i18n key in journals (#15704).
git-svn-id: http://svn.redmine.org/redmine/trunk@12416 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-15 11:02:24 +00:00
Jean-Philippe Lang 13756eb3a8 Fixed that links for relations in notifications do not include hostname (#15677).
git-svn-id: http://svn.redmine.org/redmine/trunk@12415 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-15 10:32:03 +00:00
Jean-Philippe Lang c6fc1a8047 Fixed that filtering time entries on activity does not take care of activity overrides (#15623).
git-svn-id: http://svn.redmine.org/redmine/trunk@12414 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-15 09:49:12 +00:00
Jean-Philippe Lang a4a91cab7e Add project identifier substitution option to the URL-pattern property of link format custom fields (#15701).
Patch by Mischa The Evil.

git-svn-id: http://svn.redmine.org/redmine/trunk@12413 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-15 08:53:02 +00:00
Jean-Philippe Lang 3d36b7d91a Typos in test names (#15701).
Patch by Mischa The Evil.

git-svn-id: http://svn.redmine.org/redmine/trunk@12412 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-15 08:49:45 +00:00
Toshi MARUYAMA 35d1ef2532 Bulgarian translation updated by Ivan Cenov (#15700)
git-svn-id: http://svn.redmine.org/redmine/trunk@12409 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-15 04:16:06 +00:00
Toshi MARUYAMA 3f4e2a0469 Russian translation updated by Alex Stein (#15696)
git-svn-id: http://svn.redmine.org/redmine/trunk@12408 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-15 04:05:12 +00:00
Toshi MARUYAMA 8bebe8016e Spanish translation updated by Borja Campina (#15688)
git-svn-id: http://svn.redmine.org/redmine/trunk@12407 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-15 03:46:13 +00:00
Jean-Philippe Lang a06952ed8a Adds tests for custom field description.
git-svn-id: http://svn.redmine.org/redmine/trunk@12406 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-14 11:26:47 +00:00
Jean-Philippe Lang e715c4b847 Removed default values on custom field min and max length.
git-svn-id: http://svn.redmine.org/redmine/trunk@12405 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-14 10:01:45 +00:00
Jean-Philippe Lang 3e5f1e326a ruby1.8 compatibility.
git-svn-id: http://svn.redmine.org/redmine/trunk@12404 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-14 09:24:37 +00:00
Jean-Philippe Lang a59dc1658b Removed hardcoded format in API response.
git-svn-id: http://svn.redmine.org/redmine/trunk@12403 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-14 09:00:05 +00:00
Jean-Philippe Lang ebb8e86122 Removed hardcoded formats for right-click edit.
git-svn-id: http://svn.redmine.org/redmine/trunk@12402 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-14 08:57:30 +00:00
Jean-Philippe Lang 32f782f1aa Adds translations.
git-svn-id: http://svn.redmine.org/redmine/trunk@12401 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-14 08:29:09 +00:00
Jean-Philippe Lang 2e2e2cfe42 Merged custom fields format refactoring.
git-svn-id: http://svn.redmine.org/redmine/trunk@12400 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-14 08:22:43 +00:00
Toshi MARUYAMA c74f6d9f9b add tests for non member watchers (#15622)
git-svn-id: http://svn.redmine.org/redmine/trunk@12396 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-09 06:16:03 +00:00
Toshi MARUYAMA 4823d03423 fix indents of OpenID tests in UserTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12395 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-09 06:15:52 +00:00
Toshi MARUYAMA 478a23bfa3 code format clean up UserTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12394 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-09 06:15:42 +00:00
Toshi MARUYAMA 0e4657cfad code format clean up MemberTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12393 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-09 06:15:31 +00:00
Toshi MARUYAMA 424393c28c code format clean up WatchersControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12392 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-09 06:15:20 +00:00
Toshi MARUYAMA 3782836e73 fix disable to run test environment
git-svn-id: http://svn.redmine.org/redmine/trunk@12387 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-09 04:30:51 +00:00
Toshi MARUYAMA 7c15737ff2 remove duplicate test from UsersControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12368 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-07 02:10:08 +00:00
Toshi MARUYAMA dce3d904a7 fix duplicate test name in IssuesControllerTest
git-svn-id: http://svn.redmine.org/redmine/trunk@12367 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-07 02:09:57 +00:00
Toshi MARUYAMA f1175fda70 prevent i18n deprecated warning
i18n 0.6.4 on Rails 3.2.16 changes behavior.
3b6e56e06f

git-svn-id: http://svn.redmine.org/redmine/trunk@12365 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-07 01:32:22 +00:00
Toshi MARUYAMA a624204f1b remove extra empty lines from test/unit/changeset_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@12364 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-06 23:42:06 +00:00
Toshi MARUYAMA 436d44962d add test to send one mail with both settngs in creating issue (#15612)
git-svn-id: http://svn.redmine.org/redmine/trunk@12363 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-06 23:22:38 +00:00
Toshi MARUYAMA b212fdb72b add test not to send mail with no settng in creating issue (#15612)
git-svn-id: http://svn.redmine.org/redmine/trunk@12362 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-06 23:22:26 +00:00
Toshi MARUYAMA dceee1ea9a explicitly use mail send setting in unit issue test (#15612)
git-svn-id: http://svn.redmine.org/redmine/trunk@12361 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-06 23:22:15 +00:00
Toshi MARUYAMA 9223ab4252 remove "address_separator" etc. from tr.yml
These keys are not in other yamls.
These keys were removed from Rails i18n on 2011-11-21.
29f3cba4eb

git-svn-id: http://svn.redmine.org/redmine/trunk@12360 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-05 03:41:47 +00:00
Toshi MARUYAMA be002a1076 Turkish translation updated by Mert Salih Kaplan (#15601)
git-svn-id: http://svn.redmine.org/redmine/trunk@12358 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-05 02:59:16 +00:00
Toshi MARUYAMA afda064058 remove trailing white-spaces from test/unit/attachment_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@12356 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-04 07:09:17 +00:00
Toshi MARUYAMA 8a123b178c update Rails version 3.2.16
git-svn-id: http://svn.redmine.org/redmine/trunk@12355 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-12-04 07:04:15 +00:00
Jean-Philippe Lang 6032263d9b Fixed that preferences are not preserved when adding a user fails (#15552).
git-svn-id: http://svn.redmine.org/redmine/trunk@12350 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-29 21:43:29 +00:00
Jean-Philippe Lang e494983e1f Fixed that CSS class for done ratio is not properly generated (#15523).
Patch by Go MAEDA.

git-svn-id: http://svn.redmine.org/redmine/trunk@12349 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-29 21:23:21 +00:00
Jean-Philippe Lang 23974fb0ce Fixed that validating a Setting with invalid name triggers an error (#15551).
git-svn-id: http://svn.redmine.org/redmine/trunk@12348 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-29 21:18:35 +00:00
Jean-Philippe Lang 088ab2e686 Fixed that the label element may contain at most one input.
git-svn-id: http://svn.redmine.org/redmine/trunk@12346 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-27 13:31:24 +00:00
Toshi MARUYAMA 391b5ec6ef use escaping html in wiki_syntax_detailed.html
git-svn-id: http://svn.redmine.org/redmine/trunk@12340 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-25 05:23:09 +00:00
Toshi MARUYAMA 41478dc664 Japanese translation updated by Go MAEDA (#15524)
git-svn-id: http://svn.redmine.org/redmine/trunk@12339 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-25 05:22:32 +00:00
Toshi MARUYAMA a528aa0333 use escaping html in Russian wiki_syntax.html (#9442)
git-svn-id: http://svn.redmine.org/redmine/trunk@12331 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-23 23:39:56 +00:00
Toshi MARUYAMA 9c0debd2c1 Russian wiki syntax help translations by Denis Savitsky (#9442)
git-svn-id: http://svn.redmine.org/redmine/trunk@12326 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-23 18:43:46 +00:00
Jean-Philippe Lang 8578a46b35 Extract generic formatting options to an helper.
git-svn-id: http://svn.redmine.org/redmine/trunk@12319 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-23 10:50:41 +00:00
Jean-Philippe Lang 8a1f26617d Don't create duplicate wikis in test (#15420).
Patch by George Gensure.

git-svn-id: http://svn.redmine.org/redmine/trunk@12317 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-23 09:13:48 +00:00
Jean-Philippe Lang 436ab28443 Updates for 2.4.1 release.
git-svn-id: http://svn.redmine.org/redmine/trunk@12314 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-23 08:26:39 +00:00
Jean-Philippe Lang 5c0078c63a Fixed that non-GET API requests respond with 422 (#15427).
git-svn-id: http://svn.redmine.org/redmine/trunk@12311 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-22 22:57:30 +00:00
Jean-Philippe Lang bba304ef39 Fixed that the sidebar may be displayed empty (#15414).
git-svn-id: http://svn.redmine.org/redmine/trunk@12310 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-20 19:17:20 +00:00
Jean-Philippe Lang 7df9f8d31e Use pagination css class for search results pagination (#15398).
git-svn-id: http://svn.redmine.org/redmine/trunk@12309 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-19 19:37:15 +00:00
Jean-Philippe Lang 00683d52f8 HTML5 conformance of error pages (#15381).
git-svn-id: http://svn.redmine.org/redmine/trunk@12308 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-19 19:21:48 +00:00
Toshi MARUYAMA 508a14c43f Czech "message" and "changeset" translation changed by Karel Pičman (#15391, #15403)
git-svn-id: http://svn.redmine.org/redmine/trunk@12303 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-19 12:24:33 +00:00
Toshi MARUYAMA 5a6e93584e fix wiki syntax "bold italic" (#15391, #15401)
Contributed by Karel Pičman.

git-svn-id: http://svn.redmine.org/redmine/trunk@12302 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-19 12:24:23 +00:00
Toshi MARUYAMA bd6c4b1a9c Czech Wiki syntax traslation updated by Karel Pičman (#15391, #15400)
git-svn-id: http://svn.redmine.org/redmine/trunk@12301 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-19 12:23:46 +00:00
Toshi MARUYAMA b9f1cdf8f5 German translation updated by Daniel Felix (#15395)
git-svn-id: http://svn.redmine.org/redmine/trunk@12300 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-19 12:23:33 +00:00
Toshi MARUYAMA 420a26de3f Czech traslation for 2.4-stable updated by Karel Pičman (#15391, #15402)
git-svn-id: http://svn.redmine.org/redmine/trunk@12299 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-19 12:23:21 +00:00
Jean-Philippe Lang bc0ec54afa Removed database_cleaner dependency (#15377).
git-svn-id: http://svn.redmine.org/redmine/trunk@12298 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-18 21:56:26 +00:00
Toshi MARUYAMA 8c3da81a1a Traditional Chinese translation updated by ChunChang Lo (#15376)
git-svn-id: http://svn.redmine.org/redmine/trunk@12296 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-18 08:18:59 +00:00
Jean-Philippe Lang dcbca130d1 CHANGELOG for 2.4.0.
git-svn-id: http://svn.redmine.org/redmine/trunk@12292 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-17 11:21:54 +00:00
Jean-Philippe Lang b1a1720f04 Bulgarian translation by Ivan Cenov (#15369).
git-svn-id: http://svn.redmine.org/redmine/trunk@12288 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-16 08:47:18 +00:00
Jean-Philippe Lang 0a5632013f Fixed UI tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@12287 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-16 08:46:22 +00:00
Jean-Philippe Lang 67aa2cb34e Use :button_edit instead of :button_update for editing issues (#15275).
git-svn-id: http://svn.redmine.org/redmine/trunk@12285 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-16 08:32:09 +00:00
Jean-Philippe Lang f5985b3cd5 Use :button_save instead of :button_update on committers form (#15275).
git-svn-id: http://svn.redmine.org/redmine/trunk@12284 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-16 08:28:29 +00:00
Jean-Philippe Lang 3d7c3041b8 Removed deferred tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@12283 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-16 07:58:35 +00:00
Jean-Philippe Lang f69b4da75f Add an indication to admin/info whether or not ImageMagick convert is available (#15311).
Patch by Mischa The Evil.

git-svn-id: http://svn.redmine.org/redmine/trunk@12278 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-15 20:11:00 +00:00
Jean-Philippe Lang 71c61f4996 Fixed that update_form always proposes the default status when updating an existing issue (#15344).
git-svn-id: http://svn.redmine.org/redmine/trunk@12277 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-15 19:59:19 +00:00
Toshi MARUYAMA 8910b7c605 fix repository tree can't handle two loading at once (#13348)
Contributed by Vadim Pushtaev.

git-svn-id: http://svn.redmine.org/redmine/trunk@12274 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-13 09:42:13 +00:00
Jean-Philippe Lang a22242ed20 Fixed uninitialized constant Redmine::Scm::Adapters::CommandFailed error when reloading in development mode.
git-svn-id: http://svn.redmine.org/redmine/trunk@12273 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-11 22:02:21 +00:00
Jean-Philippe Lang 6ae4bd7842 Fixed repository browser alignment (#15307).
git-svn-id: http://svn.redmine.org/redmine/trunk@12272 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-11 21:46:05 +00:00
Jean-Philippe Lang f8c2da3432 Removed svn:mergeinfo properties from trunk.
git-svn-id: http://svn.redmine.org/redmine/trunk@12269 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-11 21:13:59 +00:00
Jean-Philippe Lang 967564cba0 Removed deprecated align and width html attributes (#15307).
git-svn-id: http://svn.redmine.org/redmine/trunk@12268 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-11 21:01:21 +00:00
Jean-Philippe Lang 0569005759 Code cleanup: unverified request no longer raises a InvalidAuthenticityToken exception.
git-svn-id: http://svn.redmine.org/redmine/trunk@12267 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-11 20:59:17 +00:00
Toshi MARUYAMA 81d6952587 ci.rake: code format cleanup
git-svn-id: http://svn.redmine.org/redmine/trunk@12266 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-10 22:59:10 +00:00
Jean-Philippe Lang 8525e56c33 Adds a CSS class for reorder links (#15307).
git-svn-id: http://svn.redmine.org/redmine/trunk@12265 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-10 13:24:07 +00:00
Jean-Philippe Lang 3096b6183e Set version to 2.4.0.
git-svn-id: http://svn.redmine.org/redmine/trunk@12263 e93f8b46-1217-0410-a6f0-8f06a7374b81
2013-11-10 11:21:21 +00:00
424 changed files with 9663 additions and 5137 deletions

38
.travis.yml Normal file
View File

@ -0,0 +1,38 @@
# Redmine runs tests on own continuous integration server.
# http://www.redmine.org/projects/redmine/wiki/Continuous_integration
# You can also run tests on your environment.
language: ruby
rvm:
- 1.8.7
- 1.9.3
- 2.0
- 2.1
- jruby
matrix:
allow_failures:
# SCM tests fail randomly due to IO.popen().
# https://github.com/jruby/jruby/issues/779
- rvm: jruby
env:
- "TEST_SUITE=units DATABASE_ADAPTER=postgresql"
- "TEST_SUITE=functionals DATABASE_ADAPTER=postgresql"
- "TEST_SUITE=integration DATABASE_ADAPTER=postgresql"
- "TEST_SUITE=units DATABASE_ADAPTER=mysql"
- "TEST_SUITE=functionals DATABASE_ADAPTER=mysql"
- "TEST_SUITE=integration DATABASE_ADAPTER=mysql"
- "TEST_SUITE=units DATABASE_ADAPTER=sqlite3"
- "TEST_SUITE=functionals DATABASE_ADAPTER=sqlite3"
- "TEST_SUITE=integration DATABASE_ADAPTER=sqlite3"
before_install:
- "sudo apt-get update -qq"
- "sudo apt-get --no-install-recommends install bzr cvs git mercurial subversion"
script:
- "SCMS=bazaar,cvs,subversion,git,mercurial,filesystem"
- "export SCMS"
- "git --version"
- "bundle install"
- "RUN_ON_NOT_OFFICIAL='' RUBY_VER=1.9 BRANCH=trunk bundle exec rake config/database.yml"
- "bundle install"
- "JRUBY_OPTS=-J-Xmx1024m bundle exec rake ci"
notifications:
email: false

15
Gemfile
View File

@ -1,11 +1,13 @@
source 'https://rubygems.org'
gem "rails", "3.2.17"
gem "rails", "3.2.18"
gem "rake", "~> 10.1.1"
gem "jquery-rails", "~> 2.0.2"
gem "coderay", "~> 1.1.0"
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
gem "builder", "3.0.0"
gem "request_store"
gem "mime-types"
# Optional gem for LDAP authentication
group :ldap do
@ -18,14 +20,20 @@ group :openid do
gem "rack-openid"
end
# Optional gem for exporting the gantt to a PNG file, not supported with jruby
platforms :mri, :mingw do
# Optional gem for exporting the gantt to a PNG file, not supported with jruby
group :rmagick do
# RMagick 2 supports ruby 1.9
# RMagick 1 would be fine for ruby 1.8 but Bundler does not support
# different requirements for the same gem on different platforms
gem "rmagick", ">= 2.0.0"
end
# Optional Markdown support, not for JRuby
group :markdown do
# TODO: upgrade to redcarpet 3.x when ruby1.8 support is dropped
gem "redcarpet", "~> 2.3.0"
end
end
platforms :jruby do
@ -78,11 +86,10 @@ end
group :test do
gem "shoulda", "~> 3.3.2"
gem "mocha", ">= 0.14", :require => 'mocha/api'
gem "mocha", "~> 1.0.0", :require => 'mocha/api'
if RUBY_VERSION >= '1.9.3'
gem "capybara", "~> 2.1.0"
gem "selenium-webdriver"
gem "database_cleaner"
end
end

View File

@ -34,7 +34,7 @@ class AccountController < ApplicationController
def login
if request.get?
if User.current.logged?
redirect_to home_url
redirect_back_or_default home_url, :referer => true
end
else
authenticate_user

View File

@ -44,6 +44,7 @@ class ApplicationController < ActionController::Base
unless api_request?
super
cookies.delete(autologin_cookie_name)
self.logged_user = nil
render_error :status => 422, :message => "Invalid form authenticity token."
end
end
@ -119,7 +120,7 @@ class ApplicationController < ActionController::Base
if (key = api_key_from_request)
# Use API key
user = User.find_by_api_key(key)
else
elsif request.authorization.to_s =~ /\ABasic /i
# HTTP Basic, either username/password or API key/random
authenticate_with_http_basic do |username, password|
user = User.try_to_login(username, password) || User.find_by_api_key(username)
@ -201,7 +202,7 @@ class ApplicationController < ActionController::Base
if User.current.logged?
lang = find_language(User.current.language)
end
if lang.nil? && request.env['HTTP_ACCEPT_LANGUAGE']
if lang.nil? && !Setting.force_default_language_for_anonymous? && request.env['HTTP_ACCEPT_LANGUAGE']
accept_lang = parse_qvalues(request.env['HTTP_ACCEPT_LANGUAGE']).first
if !accept_lang.blank?
accept_lang = accept_lang.downcase
@ -373,13 +374,13 @@ class ApplicationController < ActionController::Base
url
end
def redirect_back_or_default(default)
def redirect_back_or_default(default, options={})
back_url = params[:back_url].to_s
if back_url.present?
begin
uri = URI.parse(back_url)
# do not redirect user to another host or to the login or register page
if ((uri.relative? && back_url.match(%r{\A/\w})) || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)})
if ((uri.relative? && back_url.match(%r{\A/(\w.*)?\z})) || (uri.host == request.host)) && !uri.path.match(%r{/(login|account/register)})
redirect_to(back_url)
return
end
@ -387,6 +388,9 @@ class ApplicationController < ActionController::Base
logger.warn("Could not redirect to invalid URL #{back_url}")
# redirect to default
end
elsif options[:referer]
redirect_to_referer_or default
return
end
redirect_to default
false
@ -554,7 +558,7 @@ class ApplicationController < ActionController::Base
# Returns a string that can be used as filename value in Content-Disposition header
def filename_for_content_disposition(name)
request.env['HTTP_USER_AGENT'] =~ %r{MSIE} ? ERB::Util.url_encode(name) : name
request.env['HTTP_USER_AGENT'] =~ %r{(MSIE|Trident)} ? ERB::Util.url_encode(name) : name
end
def api_request?

View File

@ -55,12 +55,10 @@ class ContextMenusController < ApplicationController
@options_by_custom_field = {}
if @can[:edit]
custom_fields = @issues.map(&:available_custom_fields).reduce(:&).select do |f|
%w(bool list user version).include?(f.field_format) && !f.multiple?
end
custom_fields = @issues.map(&:editable_custom_fields).reduce(:&).reject(&:multiple?)
custom_fields.each do |field|
values = field.possible_values_options(@projects)
if values.any?
if values.present?
@options_by_custom_field[field] = values
end
end

View File

@ -27,7 +27,6 @@ class CustomFieldsController < ApplicationController
respond_to do |format|
format.html {
@custom_fields_by_type = CustomField.all.group_by {|f| f.class.name }
@tab = params[:tab] || 'IssueCustomField'
}
format.api {
@custom_fields = CustomField.all
@ -36,6 +35,8 @@ class CustomFieldsController < ApplicationController
end
def new
@custom_field.field_format = 'string' if @custom_field.field_format.blank?
@custom_field.default_value = nil
end
def create
@ -75,9 +76,7 @@ class CustomFieldsController < ApplicationController
def build_new_custom_field
@custom_field = CustomField.new_subclass_instance(params[:type], params[:custom_field])
if @custom_field.nil?
render_404
else
@custom_field.default_value = nil
render :action => 'select_type'
end
end

View File

@ -90,7 +90,7 @@ class GroupsController < ApplicationController
end
def add_users
@users = User.find_all_by_id(params[:user_id] || params[:user_ids])
@users = User.where(:id => (params[:user_id] || params[:user_ids])).all
@group.users << @users if request.post?
respond_to do |format|
format.html { redirect_to edit_group_path(@group, :tab => 'users') }

View File

@ -29,7 +29,7 @@ class IssueStatusesController < ApplicationController
render :action => "index", :layout => false if request.xhr?
}
format.api {
@issue_statuses = IssueStatus.all(:order => 'position')
@issue_statuses = IssueStatus.order('position').all
}
end
end

View File

@ -62,10 +62,14 @@ class IssuesController < ApplicationController
case params[:format]
when 'csv', 'pdf'
@limit = Setting.issues_export_limit.to_i
if params[:columns] == 'all'
@query.column_names = @query.available_inline_columns.map(&:name)
end
when 'atom'
@limit = Setting.feeds_limit.to_i
when 'xml', 'json'
@offset, @limit = api_offset_and_limit
@query.column_names = %w(author)
else
@limit = per_page_option
end
@ -297,7 +301,7 @@ class IssuesController < ApplicationController
else
@saved_issues = @issues
@unsaved_issues = unsaved_issues
@issues = Issue.visible.find_all_by_id(@unsaved_issues.map(&:id))
@issues = Issue.visible.where(:id => @unsaved_issues.map(&:id)).all
bulk_edit
render :action => 'bulk_edit'
end
@ -310,14 +314,15 @@ class IssuesController < ApplicationController
when 'destroy'
# nothing to do
when 'nullify'
TimeEntry.update_all('issue_id = NULL', ['issue_id IN (?)', @issues])
TimeEntry.where(['issue_id IN (?)', @issues]).update_all('issue_id = NULL')
when 'reassign'
reassign_to = @project.issues.find_by_id(params[:reassign_to_id])
if reassign_to.nil?
flash.now[:error] = l(:error_issue_not_found_in_project)
return
else
TimeEntry.update_all("issue_id = #{reassign_to.id}", ['issue_id IN (?)', @issues])
TimeEntry.where(['issue_id IN (?)', @issues]).
update_all("issue_id = #{reassign_to.id}")
end
else
# display the destroy form if it's a user request
@ -427,7 +432,10 @@ class IssuesController < ApplicationController
@priorities = IssuePriority.active
@allowed_statuses = @issue.new_statuses_allowed_to(User.current, @issue.new_record?)
@available_watchers = (@issue.project.users.sort + @issue.watcher_users).uniq
@available_watchers = @issue.watcher_users
if @issue.project.users.count <= 20
@available_watchers = (@available_watchers + @issue.project.users.sort).uniq
end
end
def check_for_default_issue_status

View File

@ -66,7 +66,7 @@ class JournalsController < ApplicationController
text = @issue.description
end
# Replaces pre blocks with [...]
text = text.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]')
text = text.to_s.strip.gsub(%r{<pre>(.*?)</pre>}m, '[...]')
@content = "#{ll(Setting.default_language, :text_user_wrote, user)}\n> "
@content << text.gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
rescue ActiveRecord::RecordNotFound

View File

@ -28,12 +28,11 @@ class MembersController < ApplicationController
@member_count = @project.member_principals.count
@member_pages = Paginator.new @member_count, @limit, params['page']
@offset ||= @member_pages.offset
@members = @project.member_principals.all(
:order => "#{Member.table_name}.id",
:limit => @limit,
:offset => @offset
)
@members = @project.member_principals.
order("#{Member.table_name}.id").
limit(@limit).
offset(@offset).
all
respond_to do |format|
format.html { head 406 }
format.api

View File

@ -113,7 +113,7 @@ class MessagesController < ApplicationController
@subject = "RE: #{@subject}" unless @subject.starts_with?('RE:')
@content = "#{ll(Setting.default_language, :text_user_wrote, @message.author)}\n> "
@content << @message.content.to_s.strip.gsub(%r{<pre>((.|\s)*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
@content << @message.content.to_s.strip.gsub(%r{<pre>(.*?)</pre>}m, '[...]').gsub(/(\r?\n|\r\n?)/, "\n> ") + "\n\n"
end
def preview
@ -126,14 +126,14 @@ class MessagesController < ApplicationController
private
def find_message
return unless find_board
@message = @board.messages.find(params[:id], :include => :parent)
@message = @board.messages.includes(:parent).find(params[:id])
@topic = @message.root
rescue ActiveRecord::RecordNotFound
render_404
end
def find_board
@board = Board.find(params[:board_id], :include => :project)
@board = Board.includes(:project).find(params[:board_id])
@project = @board.project
rescue ActiveRecord::RecordNotFound
render_404

View File

@ -139,7 +139,7 @@ class MyController < ApplicationController
@blocks = @user.pref[:my_page_layout] || DEFAULT_LAYOUT.dup
@block_options = []
BLOCKS.each do |k, v|
unless %w(top left right).detect {|f| (@blocks[f] ||= []).include?(k)}
unless @blocks.values.flatten.include?(k)
@block_options << [l("my.blocks.#{v}", :default => [v, v.to_s.humanize]), k.dasherize]
end
end

View File

@ -42,11 +42,11 @@ class NewsController < ApplicationController
@news_count = scope.count
@news_pages = Paginator.new @news_count, @limit, params['page']
@offset ||= @news_pages.offset
@newss = scope.all(:include => [:author, :project],
:order => "#{News.table_name}.created_on DESC",
:offset => @offset,
:limit => @limit)
@newss = scope.includes([:author, :project]).
order("#{News.table_name}.created_on DESC").
limit(@limit).
offset(@offset).
all
respond_to do |format|
format.html {
@news = News.new # for adding news inline

View File

@ -151,8 +151,8 @@ class ProjectsController < ApplicationController
cond = @project.project_condition(Setting.display_subprojects_issues?)
@open_issues_by_tracker = Issue.visible.open.where(cond).count(:group => :tracker)
@total_issues_by_tracker = Issue.visible.where(cond).count(:group => :tracker)
@open_issues_by_tracker = Issue.visible.open.where(cond).group(:tracker).count
@total_issues_by_tracker = Issue.visible.where(cond).group(:tracker).count
if User.current.allowed_to?(:view_time_entries, @project)
@total_hours = TimeEntry.visible.where(cond).sum(:hours).to_f

View File

@ -31,11 +31,13 @@ class QueriesController < ApplicationController
else
@limit = per_page_option
end
@query_count = IssueQuery.visible.count
@query_pages = Paginator.new @query_count, @limit, params['page']
@queries = IssueQuery.visible.all(:limit => @limit, :offset => @offset, :order => "#{Query.table_name}.name")
@queries = IssueQuery.visible.
order("#{Query.table_name}.name").
limit(@limit).
offset(@offset).
all
respond_to do |format|
format.api
end

View File

@ -94,7 +94,7 @@ class RepositoriesController < ApplicationController
@committers = @repository.committers
@users = @project.users
additional_user_ids = @committers.collect(&:last).collect(&:to_i) - @users.collect(&:id)
@users += User.find_all_by_id(additional_user_ids) unless additional_user_ids.empty?
@users += User.where(:id => additional_user_ids).all unless additional_user_ids.empty?
@users.compact!
@users.sort!
if request.post? && params[:committers].is_a?(Hash)
@ -411,7 +411,7 @@ class RepositoriesController < ApplicationController
commits_data = commits_data + [0]*(10 - commits_data.length) if commits_data.length<10
changes_data = changes_data + [0]*(10 - changes_data.length) if changes_data.length<10
# Remove email adress in usernames
# Remove email address in usernames
fields = fields.collect {|c| c.gsub(%r{<.+@.+>}, '') }
graph = SVG::Graph::BarHorizontal.new(

View File

@ -232,7 +232,7 @@ private
end
def find_time_entries
@time_entries = TimeEntry.find_all_by_id(params[:id] || params[:ids])
@time_entries = TimeEntry.where(:id => params[:id] || params[:ids]).all
raise ActiveRecord::RecordNotFound if @time_entries.empty?
@projects = @time_entries.collect(&:project).compact.uniq
@project = @projects.first if @projects.size == 1

View File

@ -90,11 +90,9 @@ class UsersController < ApplicationController
@user.admin = params[:user][:admin] || false
@user.login = params[:user][:login]
@user.password, @user.password_confirmation = params[:user][:password], params[:user][:password_confirmation] unless @user.auth_source_id
@user.pref.attributes = params[:pref]
if @user.save
@user.pref.attributes = params[:pref]
@user.pref.save
Mailer.account_information(@user, @user.password).deliver if params[:send_information]
respond_to do |format|

View File

@ -30,6 +30,7 @@ class WatchersController < ApplicationController
accept_api_auth :create, :destroy
def new
@users = users_for_new_watcher
end
def create
@ -44,7 +45,7 @@ class WatchersController < ApplicationController
end
respond_to do |format|
format.html { redirect_to_referer_or {render :text => 'Watcher added.', :layout => true}}
format.js
format.js { @users = users_for_new_watcher }
format.api { render_api_ok }
end
end
@ -52,7 +53,10 @@ class WatchersController < ApplicationController
def append
if params[:watcher].is_a?(Hash)
user_ids = params[:watcher][:user_ids] || [params[:watcher][:user_id]]
@users = User.active.find_all_by_id(user_ids)
@users = User.active.where(:id => user_ids).all
end
if @users.blank?
render :nothing => true
end
end
@ -66,10 +70,7 @@ class WatchersController < ApplicationController
end
def autocomplete_for_user
@users = User.active.sorted.like(params[:q]).limit(100).all
if @watched
@users -= @watched.watcher_users
end
@users = users_for_new_watcher
render :layout => false
end
@ -91,8 +92,14 @@ class WatchersController < ApplicationController
def find_watchables
klass = Object.const_get(params[:object_type].camelcase) rescue nil
if klass && klass.respond_to?('watched_by')
@watchables = klass.find_all_by_id(Array.wrap(params[:object_id]))
raise Unauthorized if @watchables.any? {|w| w.respond_to?(:visible?) && !w.visible?}
@watchables = klass.where(:id => Array.wrap(params[:object_id])).all
raise Unauthorized if @watchables.any? {|w|
if w.respond_to?(:visible?)
!w.visible?
elsif w.respond_to?(:project) && w.project
!w.project.visible?
end
}
end
render_404 unless @watchables.present?
end
@ -106,4 +113,17 @@ class WatchersController < ApplicationController
format.js { render :partial => 'set_watcher', :locals => {:user => user, :watched => watchables} }
end
end
def users_for_new_watcher
users = []
if params[:q].blank? && @project.present?
users = @project.users.sorted
else
users = User.active.sorted.like(params[:q]).limit(100)
end
if @watched
users -= @watched.watcher_users
end
users
end
end

View File

@ -277,14 +277,19 @@ class WikiController < ApplicationController
# Export wiki to a single pdf or html file
def export
@pages = @wiki.pages.all(:order => 'title', :include => [:content, {:attachments => :author}])
@pages = @wiki.pages.
order('title').
includes([:content, {:attachments => :author}]).
all
respond_to do |format|
format.html {
export = render_to_string :action => 'export_multiple', :layout => false
send_data(export, :type => 'text/html', :filename => "wiki.html")
}
format.pdf {
send_data(wiki_pages_to_pdf(@pages, @project), :type => 'application/pdf', :filename => "#{@project.identifier}.pdf")
send_data(wiki_pages_to_pdf(@pages, @project),
:type => 'application/pdf',
:filename => "#{@project.identifier}.pdf")
}
end
end
@ -351,6 +356,10 @@ private
end
def load_pages_for_index
@pages = @wiki.pages.with_updated_on.reorder("#{WikiPage.table_name}.title").includes(:wiki => :project).includes(:parent).all
@pages = @wiki.pages.with_updated_on.
reorder("#{WikiPage.table_name}.title").
includes(:wiki => :project).
includes(:parent).
all
end
end

View File

@ -18,39 +18,30 @@
class WorkflowsController < ApplicationController
layout 'admin'
before_filter :require_admin, :find_roles, :find_trackers
before_filter :require_admin
def index
@workflow_counts = WorkflowTransition.count_by_tracker_and_role
end
def edit
@role = Role.find_by_id(params[:role_id]) if params[:role_id]
@tracker = Tracker.find_by_id(params[:tracker_id]) if params[:tracker_id]
find_trackers_roles_and_statuses_for_edit
if request.post?
WorkflowTransition.destroy_all( ["role_id=? and tracker_id=?", @role.id, @tracker.id])
(params[:issue_status] || []).each { |status_id, transitions|
transitions.each { |new_status_id, options|
author = options.is_a?(Array) && options.include?('author') && !options.include?('always')
assignee = options.is_a?(Array) && options.include?('assignee') && !options.include?('always')
WorkflowTransition.create(:role_id => @role.id, :tracker_id => @tracker.id, :old_status_id => status_id, :new_status_id => new_status_id, :author => author, :assignee => assignee)
}
}
if @role.save
redirect_to workflows_edit_path(:role_id => @role, :tracker_id => @tracker, :used_statuses_only => params[:used_statuses_only])
return
if request.post? && @roles && @trackers && params[:transitions]
transitions = params[:transitions].deep_dup
transitions.each do |old_status_id, transitions_by_new_status|
transitions_by_new_status.each do |new_status_id, transition_by_rule|
transition_by_rule.reject! {|rule, transition| transition == 'no_change'}
end
end
WorkflowTransition.replace_transitions(@trackers, @roles, transitions)
flash[:notice] = l(:notice_successful_update)
redirect_to_referer_or workflows_edit_path
return
end
@used_statuses_only = (params[:used_statuses_only] == '0' ? false : true)
if @tracker && @used_statuses_only && @tracker.issue_statuses.any?
@statuses = @tracker.issue_statuses
end
@statuses ||= IssueStatus.sorted.all
if @tracker && @role && @statuses.any?
workflows = WorkflowTransition.where(:role_id => @role.id, :tracker_id => @tracker.id).all
if @trackers && @roles && @statuses.any?
workflows = WorkflowTransition.where(:role_id => @roles.map(&:id), :tracker_id => @trackers.map(&:id))
@workflows = {}
@workflows['always'] = workflows.select {|w| !w.author && !w.assignee}
@workflows['author'] = workflows.select {|w| w.author}
@ -59,35 +50,30 @@ class WorkflowsController < ApplicationController
end
def permissions
@role = Role.find_by_id(params[:role_id]) if params[:role_id]
@tracker = Tracker.find_by_id(params[:tracker_id]) if params[:tracker_id]
find_trackers_roles_and_statuses_for_edit
if request.post? && @role && @tracker
WorkflowPermission.replace_permissions(@tracker, @role, params[:permissions] || {})
redirect_to workflows_permissions_path(:role_id => @role, :tracker_id => @tracker, :used_statuses_only => params[:used_statuses_only])
if request.post? && @roles && @trackers && params[:permissions]
permissions = params[:permissions].deep_dup
permissions.each { |field, rule_by_status_id|
rule_by_status_id.reject! {|status_id, rule| rule == 'no_change'}
}
WorkflowPermission.replace_permissions(@trackers, @roles, permissions)
flash[:notice] = l(:notice_successful_update)
redirect_to_referer_or workflows_permissions_path
return
end
@used_statuses_only = (params[:used_statuses_only] == '0' ? false : true)
if @tracker && @used_statuses_only && @tracker.issue_statuses.any?
@statuses = @tracker.issue_statuses
end
@statuses ||= IssueStatus.sorted.all
if @role && @tracker
@fields = (Tracker::CORE_FIELDS_ALL - @tracker.disabled_core_fields).map {|field| [field, l("field_"+field.sub(/_id$/, ''))]}
@custom_fields = @tracker.custom_fields
@permissions = WorkflowPermission.where(:tracker_id => @tracker.id, :role_id => @role.id).all.inject({}) do |h, w|
h[w.old_status_id] ||= {}
h[w.old_status_id][w.field_name] = w.rule
h
end
if @roles && @trackers
@fields = (Tracker::CORE_FIELDS_ALL - @trackers.map(&:disabled_core_fields).reduce(:&)).map {|field| [field, l("field_"+field.sub(/_id$/, ''))]}
@custom_fields = @trackers.map(&:custom_fields).flatten.uniq.sort
@permissions = WorkflowPermission.rules_by_status_id(@trackers, @roles)
@statuses.each {|status| @permissions[status.id] ||= {}}
end
end
def copy
@roles = Role.sorted
@trackers = Tracker.sorted
if params[:source_tracker_id].blank? || params[:source_tracker_id] == 'any'
@source_tracker = nil
@ -99,10 +85,10 @@ class WorkflowsController < ApplicationController
else
@source_role = Role.find_by_id(params[:source_role_id].to_i)
end
@target_trackers = params[:target_tracker_ids].blank? ? nil : Tracker.find_all_by_id(params[:target_tracker_ids])
@target_roles = params[:target_role_ids].blank? ? nil : Role.find_all_by_id(params[:target_role_ids])
@target_trackers = params[:target_tracker_ids].blank? ?
nil : Tracker.where(:id => params[:target_tracker_ids]).all
@target_roles = params[:target_role_ids].blank? ?
nil : Role.where(:id => params[:target_role_ids]).all
if request.post?
if params[:source_tracker_id].blank? || params[:source_role_id].blank? || (@source_tracker.nil? && @source_role.nil?)
flash.now[:error] = l(:error_workflow_copy_source)
@ -118,11 +104,37 @@ class WorkflowsController < ApplicationController
private
def find_trackers_roles_and_statuses_for_edit
find_roles
find_trackers
find_statuses
end
def find_roles
@roles = Role.sorted.all
ids = Array.wrap(params[:role_id])
if ids == ['all']
@roles = Role.sorted.all
elsif ids.present?
@roles = Role.where(:id => ids).all
end
@roles = nil if @roles.blank?
end
def find_trackers
@trackers = Tracker.sorted.all
ids = Array.wrap(params[:tracker_id])
if ids == ['all']
@trackers = Tracker.sorted.all
elsif ids.present?
@trackers = Tracker.where(:id => ids).all
end
@trackers = nil if @trackers.blank?
end
def find_statuses
@used_statuses_only = (params[:used_statuses_only] == '0' ? false : true)
if @trackers && @used_statuses_only
@statuses = @trackers.map(&:issue_statuses).flatten.uniq.sort.presence
end
@statuses ||= IssueStatus.sorted.all
end
end

View File

@ -24,4 +24,12 @@ module AdminHelper
[l(:project_status_closed), '5'],
[l(:project_status_archived), '9']], selected.to_s)
end
def plugin_data_for_updates(plugins)
data = {"v" => Redmine::VERSION.to_s, "p" => {}}
plugins.each do |plugin|
data["p"].merge! plugin.id => {"v" => plugin.version, "n" => plugin.name, "a" => plugin.author}
end
data
end
end

View File

@ -72,15 +72,16 @@ module ApplicationHelper
subject = nil
text = options[:tracker] == false ? "##{issue.id}" : "#{issue.tracker} ##{issue.id}"
if options[:subject] == false
title = truncate(issue.subject, :length => 60)
title = issue.subject.truncate(60)
else
subject = issue.subject
if options[:truncate]
subject = truncate(subject, :length => options[:truncate])
if truncate_length = options[:truncate]
subject = subject.truncate(truncate_length)
end
end
only_path = options[:only_path].nil? ? true : options[:only_path]
s = link_to text, issue_path(issue, :only_path => only_path), :class => issue.css_classes, :title => title
s = link_to(text, issue_path(issue, :only_path => only_path),
:class => issue.css_classes, :title => title)
s << h(": #{subject}") if subject
s = h("#{issue.project} - ") + s if options[:project]
s
@ -117,7 +118,7 @@ module ApplicationHelper
# Generates a link to a message
def link_to_message(message, options={}, html_options = nil)
link_to(
truncate(message.subject, :length => 60),
message.subject.truncate(60),
board_message_path(message.board_id, message.parent_id || message.id, {
:r => (message.parent_id && message.id),
:anchor => (message.parent_id ? "message-#{message.id}" : nil)
@ -156,6 +157,50 @@ module ApplicationHelper
end
end
# Helper that formats object for html or text rendering
def format_object(object, html=true, &block)
if block_given?
object = yield object
end
case object.class.name
when 'Array'
object.map {|o| format_object(o, html)}.join(', ').html_safe
when 'Time'
format_time(object)
when 'Date'
format_date(object)
when 'Fixnum'
object.to_s
when 'Float'
sprintf "%.2f", object
when 'User'
html ? link_to_user(object) : object.to_s
when 'Project'
html ? link_to_project(object) : object.to_s
when 'Version'
html ? link_to(object.name, version_path(object)) : object.to_s
when 'TrueClass'
l(:general_text_Yes)
when 'FalseClass'
l(:general_text_No)
when 'Issue'
object.visible? && html ? link_to_issue(object) : "##{object.id}"
when 'CustomValue', 'CustomFieldValue'
if object.custom_field
f = object.custom_field.format.formatted_custom_value(self, object, html)
if f.nil? || f.is_a?(String)
f
else
format_object(f, html, &block)
end
else
object.value.to_s
end
else
html ? h(object) : object.to_s
end
end
def wiki_page_path(page, options={})
url_for({:controller => 'wiki', :action => 'show', :project_id => page.project, :id => page.title}.merge(options))
end
@ -182,7 +227,7 @@ module ApplicationHelper
end
def format_activity_title(text)
h(truncate_single_line(text, :length => 100))
h(truncate_single_line_raw(text, 100))
end
def format_activity_day(date)
@ -190,7 +235,7 @@ module ApplicationHelper
end
def format_activity_description(text)
h(truncate(text.to_s, :length => 120).gsub(%r{[\r\n]*<(pre|code)>.*$}m, '...')
h(text.to_s.truncate(120).gsub(%r{[\r\n]*<(pre|code)>.*$}m, '...')
).gsub(/[\r\n]+/, "<br />").html_safe
end
@ -267,9 +312,13 @@ module ApplicationHelper
end
# Renders tabs and their content
def render_tabs(tabs)
def render_tabs(tabs, selected=params[:tab])
if tabs.any?
render :partial => 'common/tabs', :locals => {:tabs => tabs}
unless tabs.detect {|tab| tab[:name] == selected}
selected = nil
end
selected ||= tabs.first[:name]
render :partial => 'common/tabs', :locals => {:tabs => tabs, :selected_tab => selected}
else
content_tag 'p', l(:label_no_data), :class => "nodata"
end
@ -355,9 +404,17 @@ module ApplicationHelper
# Truncates and returns the string as a single line
def truncate_single_line(string, *args)
ActiveSupport::Deprecation.warn(
"ApplicationHelper#truncate_single_line is deprecated and will be removed in Rails 4 poring")
# Rails 4 ActionView::Helpers::TextHelper#truncate escapes.
# So, result is broken.
truncate(string.to_s, *args).gsub(%r{[\r\n]+}m, ' ')
end
def truncate_single_line_raw(string, length)
string.truncate(length).gsub(%r{[\r\n]+}m, ' ')
end
# Truncates at line break after 250 characters or options[:length]
def truncate_lines(string, options={})
length = options[:length] || 250
@ -708,21 +765,30 @@ module ApplicationHelper
repository = project.repository
end
# project.changesets.visible raises an SQL error because of a double join on repositories
if repository && (changeset = Changeset.visible.find_by_repository_id_and_revision(repository.id, identifier))
link = link_to(h("#{project_prefix}#{repo_prefix}r#{identifier}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :repository_id => repository.identifier_param, :rev => changeset.revision},
:class => 'changeset',
:title => truncate_single_line(changeset.comments, :length => 100))
if repository &&
(changeset = Changeset.visible.
find_by_repository_id_and_revision(repository.id, identifier))
link = link_to(h("#{project_prefix}#{repo_prefix}r#{identifier}"),
{:only_path => only_path, :controller => 'repositories',
:action => 'revision', :id => project,
:repository_id => repository.identifier_param,
:rev => changeset.revision},
:class => 'changeset',
:title => truncate_single_line_raw(changeset.comments, 100))
end
end
elsif sep == '#'
oid = identifier.to_i
case prefix
when nil
if oid.to_s == identifier && issue = Issue.visible.find_by_id(oid, :include => :status)
if oid.to_s == identifier &&
issue = Issue.visible.includes(:status).find_by_id(oid)
anchor = comment_id ? "note-#{comment_id}" : nil
link = link_to(h("##{oid}#{comment_suffix}"), {:only_path => only_path, :controller => 'issues', :action => 'show', :id => oid, :anchor => anchor},
:class => issue.css_classes,
:title => "#{truncate(issue.subject, :length => 100)} (#{issue.status.name})")
link = link_to(h("##{oid}#{comment_suffix}"),
{:only_path => only_path, :controller => 'issues',
:action => 'show', :id => oid, :anchor => anchor},
:class => issue.css_classes,
:title => "#{issue.subject.truncate(100)} (#{issue.status.name})")
end
when 'document'
if document = Document.visible.find_by_id(oid)
@ -735,7 +801,7 @@ module ApplicationHelper
:class => 'version'
end
when 'message'
if message = Message.visible.find_by_id(oid, :include => :parent)
if message = Message.visible.includes(:parent).find_by_id(oid)
link = link_to_message(message, {:only_path => only_path}, :class => 'message')
end
when 'forum'
@ -756,6 +822,7 @@ module ApplicationHelper
elsif sep == ':'
# removes the double quotes if any
name = identifier.gsub(%r{^"(.*)"$}, "\\1")
name = CGI.unescapeHTML(name)
case prefix
when 'document'
if project && document = project.documents.visible.find_by_title(name)
@ -790,7 +857,7 @@ module ApplicationHelper
if repository && (changeset = Changeset.visible.where("repository_id = ? AND scmid LIKE ?", repository.id, "#{name}%").first)
link = link_to h("#{project_prefix}#{repo_prefix}#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'revision', :id => project, :repository_id => repository.identifier_param, :rev => changeset.identifier},
:class => 'changeset',
:title => truncate_single_line(changeset.comments, :length => 100)
:title => truncate_single_line_raw(changeset.comments, 100)
end
else
if repository && User.current.allowed_to?(:browse_repository, project)
@ -806,7 +873,8 @@ module ApplicationHelper
repo_prefix = nil
end
when 'attachment'
attachments = options[:attachments] || (obj && obj.respond_to?(:attachments) ? obj.attachments : nil)
attachments = options[:attachments] || []
attachments += obj.attachments if obj.respond_to?(:attachments)
if attachments && attachment = Attachment.latest_attach(attachments, name)
link = link_to_attachment(attachment, :only_path => only_path, :download => true, :class => 'attachment')
end
@ -914,19 +982,20 @@ module ApplicationHelper
end
end
TOC_RE = /<p>\{\{([<>]?)toc\}\}<\/p>/i unless const_defined?(:TOC_RE)
TOC_RE = /<p>\{\{((<|&lt;)|(>|&gt;))?toc\}\}<\/p>/i unless const_defined?(:TOC_RE)
# Renders the TOC with given headings
def replace_toc(text, headings)
text.gsub!(TOC_RE) do
left_align, right_align = $2, $3
# Keep only the 4 first levels
headings = headings.select{|level, anchor, item| level <= 4}
if headings.empty?
''
else
div_class = 'toc'
div_class << ' right' if $1 == '>'
div_class << ' left' if $1 == '<'
div_class << ' right' if right_align
div_class << ' left' if left_align
out = "<ul class=\"#{div_class}\"><li>"
root = headings.map(&:first).min
current = root
@ -1227,7 +1296,21 @@ module ApplicationHelper
end
def favicon
"<link rel='shortcut icon' href='#{image_path('/favicon.ico')}' />".html_safe
"<link rel='shortcut icon' href='#{favicon_path}' />".html_safe
end
# Returns the path to the favicon
def favicon_path
icon = (current_theme && current_theme.favicon?) ? current_theme.favicon_path : '/favicon.ico'
image_path(icon)
end
# Returns the full URL to the favicon
def favicon_url
# TODO: use #image_url introduced in Rails4
path = favicon_path
base = url_for(:controller => 'welcome', :action => 'index', :only_path => false)
base.sub(%r{/+$},'') + '/' + path.sub(%r{^/+},'')
end
def robot_exclusion_tag
@ -1249,7 +1332,7 @@ module ApplicationHelper
def api_meta(options)
if params[:nometa].present? || request.headers['X-Redmine-Nometa']
# compatibility mode for activeresource clients that raise
# an error when unserializing an array with attributes
# an error when deserializing an array with attributes
nil
else
options

View File

@ -40,55 +40,48 @@ module CustomFieldsHelper
:label => DocumentCategory::OptionName}
]
def custom_fields_tabs
CUSTOM_FIELDS_TABS
def render_custom_fields_tabs(types)
tabs = CUSTOM_FIELDS_TABS.select {|h| types.include?(h[:name]) }
render_tabs tabs
end
def custom_field_type_options
CUSTOM_FIELDS_TABS.map {|h| [l(h[:label]), h[:name]]}
end
def render_custom_field_format_partial(form, custom_field)
partial = custom_field.format.form_partial
if partial
render :partial => custom_field.format.form_partial, :locals => {:f => form, :custom_field => custom_field}
end
end
def custom_field_tag_name(prefix, custom_field)
name = "#{prefix}[custom_field_values][#{custom_field.id}]"
name << "[]" if custom_field.multiple?
name
end
def custom_field_tag_id(prefix, custom_field)
"#{prefix}_custom_field_values_#{custom_field.id}"
end
# Return custom field html tag corresponding to its format
def custom_field_tag(name, custom_value)
custom_field = custom_value.custom_field
field_name = "#{name}[custom_field_values][#{custom_field.id}]"
field_name << "[]" if custom_field.multiple?
field_id = "#{name}_custom_field_values_#{custom_field.id}"
tag_options = {:id => field_id, :class => "#{custom_field.field_format}_cf"}
field_format = Redmine::CustomFieldFormat.find_by_name(custom_field.field_format)
case field_format.try(:edit_as)
when "date"
text_field_tag(field_name, custom_value.value, tag_options.merge(:size => 10)) +
calendar_for(field_id)
when "text"
text_area_tag(field_name, custom_value.value, tag_options.merge(:rows => 3))
when "bool"
hidden_field_tag(field_name, '0') + check_box_tag(field_name, '1', custom_value.true?, tag_options)
when "list"
blank_option = ''.html_safe
unless custom_field.multiple?
if custom_field.is_required?
unless custom_field.default_value.present?
blank_option = content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---", :value => '')
end
else
blank_option = content_tag('option')
end
end
s = select_tag(field_name, blank_option + options_for_select(custom_field.possible_values_options(custom_value.customized), custom_value.value),
tag_options.merge(:multiple => custom_field.multiple?))
if custom_field.multiple?
s << hidden_field_tag(field_name, '')
end
s
else
text_field_tag(field_name, custom_value.value, tag_options)
end
def custom_field_tag(prefix, custom_value)
custom_value.custom_field.format.edit_tag self,
custom_field_tag_id(prefix, custom_value.custom_field),
custom_field_tag_name(prefix, custom_value.custom_field),
custom_value,
:class => "#{custom_value.custom_field.field_format}_cf"
end
# Return custom field label tag
def custom_field_label_tag(name, custom_value, options={})
required = options[:required] || custom_value.custom_field.is_required?
title = custom_value.custom_field.description.presence
content = content_tag 'span', custom_value.custom_field.name, :title => title
content_tag "label", h(custom_value.custom_field.name) +
content_tag "label", content +
(required ? " <span class=\"required\">*</span>".html_safe : ""),
:for => "#{name}_custom_field_values_#{custom_value.custom_field.id}"
end
@ -98,65 +91,30 @@ module CustomFieldsHelper
custom_field_label_tag(name, custom_value, options) + custom_field_tag(name, custom_value)
end
def custom_field_tag_for_bulk_edit(name, custom_field, projects=nil, value='')
field_name = "#{name}[custom_field_values][#{custom_field.id}]"
field_name << "[]" if custom_field.multiple?
field_id = "#{name}_custom_field_values_#{custom_field.id}"
tag_options = {:id => field_id, :class => "#{custom_field.field_format}_cf"}
unset_tag = ''
unless custom_field.is_required?
unset_tag = content_tag('label',
check_box_tag(field_name, '__none__', (value == '__none__'), :id => nil, :data => {:disables => "##{field_id}"}) + l(:button_clear),
:class => 'inline'
)
end
field_format = Redmine::CustomFieldFormat.find_by_name(custom_field.field_format)
case field_format.try(:edit_as)
when "date"
text_field_tag(field_name, value, tag_options.merge(:size => 10)) +
calendar_for(field_id) +
unset_tag
when "text"
text_area_tag(field_name, value, tag_options.merge(:rows => 3)) +
'<br />'.html_safe +
unset_tag
when "bool"
select_tag(field_name, options_for_select([[l(:label_no_change_option), ''],
[l(:general_text_yes), '1'],
[l(:general_text_no), '0']], value), tag_options)
when "list"
options = []
options << [l(:label_no_change_option), ''] unless custom_field.multiple?
options << [l(:label_none), '__none__'] unless custom_field.is_required?
options += custom_field.possible_values_options(projects)
select_tag(field_name, options_for_select(options, value), tag_options.merge(:multiple => custom_field.multiple?))
else
text_field_tag(field_name, value, tag_options) +
unset_tag
end
# Returns the custom field tag for when bulk editing objects
def custom_field_tag_for_bulk_edit(prefix, custom_field, objects=nil, value='')
custom_field.format.bulk_edit_tag self,
custom_field_tag_id(prefix, custom_field),
custom_field_tag_name(prefix, custom_field),
custom_field,
objects,
value,
:class => "#{custom_field.field_format}_cf"
end
# Return a string used to display a custom value
def show_value(custom_value)
return "" unless custom_value
format_value(custom_value.value, custom_value.custom_field.field_format)
def show_value(custom_value, html=true)
format_object(custom_value, html)
end
# Return a string used to display a custom value
def format_value(value, field_format)
if value.is_a?(Array)
value.collect {|v| format_value(v, field_format)}.compact.sort.join(', ')
else
Redmine::CustomFieldFormat.format_value(value, field_format)
end
def format_value(value, custom_field)
format_object(custom_field.format.formatted_value(self, custom_field, value, false), false)
end
# Return an array of custom field formats which can be used in select_tag
def custom_field_formats_for_select(custom_field)
Redmine::CustomFieldFormat.as_select(custom_field.class.customized_class.name)
Redmine::FieldFormat.as_select(custom_field.class.customized_class.name)
end
# Renders the custom_values in api views
@ -179,4 +137,8 @@ module CustomFieldsHelper
end
end unless custom_values.empty?
end
def edit_tag_style_tag(form)
form.select :edit_tag_style, [[l(:label_drop_down_list), ''], [l(:label_checkboxes), 'check_box']], :label => :label_display
end
end

View File

@ -171,8 +171,9 @@ module IssuesHelper
s = "<tr>\n"
n = 0
ordered_values.compact.each do |value|
css = "cf_#{value.custom_field.id}"
s << "</tr>\n<tr>\n" if n > 0 && (n % 2) == 0
s << "\t<th>#{ h(value.custom_field.name) }:</th><td>#{ simple_format_without_paragraph(h(show_value(value))) }</td>\n"
s << "\t<th class=\"#{css}\">#{ h(value.custom_field.name) }:</th><td class=\"#{css}\">#{ h(show_value(value)) }</td>\n"
n += 1
end
s << "</tr>\n"
@ -239,7 +240,7 @@ module IssuesHelper
end
end
issue.visible_custom_field_values(user).each do |value|
items << "#{value.custom_field.name}: #{show_value(value)}"
items << "#{value.custom_field.name}: #{show_value(value, false)}"
end
items
end
@ -324,8 +325,8 @@ module IssuesHelper
if custom_field
multiple = custom_field.multiple?
label = custom_field.name
value = format_value(detail.value, custom_field.field_format) if detail.value
old_value = format_value(detail.old_value, custom_field.field_format) if detail.old_value
value = format_value(detail.value, custom_field) if detail.value
old_value = format_value(detail.old_value, custom_field) if detail.old_value
end
when 'attachment'
label = l(:label_attachment)
@ -339,7 +340,8 @@ module IssuesHelper
old_value = rel_issue.nil? ? "#{l(:label_issue)} ##{detail.old_value}" :
(no_html ? rel_issue : link_to_issue(rel_issue, :only_path => options[:only_path]))
end
label = l(detail.prop_key.to_sym)
relation_type = IssueRelation::TYPES[detail.prop_key]
label = l(relation_type[:name]) if relation_type
end
call_hook(:helper_issues_show_detail_after_setting,
{:detail => detail, :label => label, :value => value, :old_value => old_value })

View File

@ -20,7 +20,7 @@
module ProjectsHelper
def link_to_version(version, options = {})
return '' unless version && version.is_a?(Version)
link_to_if version.visible?, format_version_name(version), { :controller => 'versions', :action => 'show', :id => version }, options
link_to_if version.visible?, format_version_name(version), version_path(version), options
end
def project_settings_tabs
@ -51,6 +51,21 @@ module ProjectsHelper
content_tag('select', options.html_safe, :name => 'project[parent_id]', :id => 'project_parent_id')
end
def render_project_action_links
links = []
if User.current.allowed_to?(:add_project, nil, :global => true)
links << link_to(l(:label_project_new), new_project_path, :class => 'icon icon-add')
end
if User.current.allowed_to?(:view_issues, nil, :global => true)
links << link_to(l(:label_issue_view_all), issues_path)
end
if User.current.allowed_to?(:view_time_entries, nil, :global => true)
links << link_to(l(:label_overall_spent_time), time_entries_path)
end
links << link_to(l(:label_overall_activity), activity_path)
links.join(" | ").html_safe
end
# Renders the projects index
def render_project_hierarchy(projects)
render_project_nested_lists(projects) do |project|

View File

@ -18,6 +18,8 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
module QueriesHelper
include ApplicationHelper
def filters_options_for_select(query)
options_for_select(filters_options(query))
end
@ -56,7 +58,7 @@ module QueriesHelper
def available_block_columns_tags(query)
tags = ''.html_safe
query.available_block_columns.each do |column|
tags << content_tag('label', check_box_tag('c[]', column.name.to_s, query.has_column?(column)) + " #{column.caption}", :class => 'inline')
tags << content_tag('label', check_box_tag('c[]', column.name.to_s, query.has_column?(column), :id => nil) + " #{column.caption}", :class => 'inline')
end
tags
end
@ -81,7 +83,7 @@ module QueriesHelper
end
def column_content(column, issue)
value = column.value(issue)
value = column.value_object(issue)
if value.is_a?(Array)
value.collect {|v| column_value(column, issue, v)}.compact.join(', ').html_safe
else
@ -90,53 +92,27 @@ module QueriesHelper
end
def column_value(column, issue, value)
case value.class.name
when 'String'
if column.name == :subject
link_to(h(value), :controller => 'issues', :action => 'show', :id => issue)
elsif column.name == :description
issue.description? ? content_tag('div', textilizable(issue, :description), :class => "wiki") : ''
else
h(value)
end
when 'Time'
format_time(value)
when 'Date'
format_date(value)
when 'Fixnum'
if column.name == :id
link_to value, issue_path(issue)
elsif column.name == :done_ratio
progress_bar(value, :width => '80px')
else
value.to_s
end
when 'Float'
sprintf "%.2f", value
when 'User'
link_to_user value
when 'Project'
link_to_project value
when 'Version'
link_to(h(value), :controller => 'versions', :action => 'show', :id => value)
when 'TrueClass'
l(:general_text_Yes)
when 'FalseClass'
l(:general_text_No)
when 'Issue'
value.visible? ? link_to_issue(value) : "##{value.id}"
when 'IssueRelation'
case column.name
when :id
link_to value, issue_path(issue)
when :subject
link_to value, issue_path(issue)
when :description
issue.description? ? content_tag('div', textilizable(issue, :description), :class => "wiki") : ''
when :done_ratio
progress_bar(value, :width => '80px')
when :relations
other = value.other_issue(issue)
content_tag('span',
(l(value.label_for(issue)) + " " + link_to_issue(other, :subject => false, :tracker => false)).html_safe,
:class => value.css_classes_for(issue))
else
h(value)
format_object(value)
end
end
def csv_content(column, issue)
value = column.value(issue)
value = column.value_object(issue)
if value.is_a?(Array)
value.collect {|v| csv_value(column, issue, v)}.compact.join(', ')
else
@ -145,22 +121,16 @@ module QueriesHelper
end
def csv_value(column, issue, value)
case value.class.name
when 'Time'
format_time(value)
when 'Date'
format_date(value)
when 'Float'
sprintf("%.2f", value).gsub('.', l(:general_csv_decimal_separator))
when 'IssueRelation'
other = value.other_issue(issue)
l(value.label_for(issue)) + " ##{other.id}"
when 'TrueClass'
l(:general_text_Yes)
when 'FalseClass'
l(:general_text_No)
else
value.to_s
format_object(value, false) do |value|
case value.class.name
when 'Float'
sprintf("%.2f", value).gsub('.', l(:general_csv_decimal_separator))
when 'IssueRelation'
other = value.other_issue(issue)
l(value.label_for(issue)) + " ##{other.id}"
else
value
end
end
end

View File

@ -43,7 +43,7 @@ module RepositoriesHelper
end
def render_changeset_changes
changes = @changeset.filechanges.limit(1000).reorder('path').all.collect do |change|
changes = @changeset.filechanges.limit(1000).reorder('path').collect do |change|
case change.action
when 'A'
# Detects moved/copied files

View File

@ -79,17 +79,29 @@ module SettingsHelper
def setting_label(setting, options={})
label = options.delete(:label)
label != false ? label_tag("settings_#{setting}", l(label || "setting_#{setting}")).html_safe : ''
label != false ? label_tag("settings_#{setting}", l(label || "setting_#{setting}"), options[:label_options]).html_safe : ''
end
# Renders a notification field for a Redmine::Notifiable option
def notification_field(notifiable)
return content_tag(:label,
check_box_tag('settings[notified_events][]',
notifiable.name,
Setting.notified_events.include?(notifiable.name), :id => nil).html_safe +
l_or_humanize(notifiable.name, :prefix => 'label_').html_safe,
:class => notifiable.parent.present? ? "parent" : '').html_safe
tag_data = notifiable.parent.present? ?
{:parent_notifiable => notifiable.parent} :
{:disables => "input[data-parent-notifiable=#{notifiable.name}]"}
tag = check_box_tag('settings[notified_events][]',
notifiable.name,
Setting.notified_events.include?(notifiable.name),
:id => nil,
:data => tag_data)
text = l_or_humanize(notifiable.name, :prefix => 'label_')
options = {}
if notifiable.parent.present?
options[:class] = "parent"
end
content_tag(:label, tag + text, options)
end
def cross_project_subtasks_options

View File

@ -96,8 +96,10 @@ module TimelogHelper
else
obj
end
elsif cf = criteria_options[:custom_field]
format_value(value, cf)
else
format_value(value, criteria_options[:format])
value.to_s
end
end

View File

@ -19,7 +19,7 @@
module UsersHelper
def users_status_options_for_select(selected)
user_count_by_status = User.count(:group => 'status').to_hash
user_count_by_status = User.group('status').count.to_hash
options_for_select([[l(:label_all), ''],
["#{l(:status_active)} (#{user_count_by_status[1].to_i})", '1'],
["#{l(:status_registered)} (#{user_count_by_status[2].to_i})", '2'],

View File

@ -27,6 +27,7 @@ module WatchersHelper
def watcher_link(objects, user)
return '' unless user && user.logged?
objects = Array.wrap(objects)
return '' unless objects.any?
watched = Watcher.any_watched?(objects, user)
css = [watcher_css(objects), watched ? 'icon icon-fav' : 'icon icon-fav-off'].join(' ')

View File

@ -18,24 +18,78 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
module WorkflowsHelper
def options_for_workflow_select(name, objects, selected, options={})
option_tags = ''.html_safe
multiple = false
if selected
if selected.size == objects.size
selected = 'all'
else
selected = selected.map(&:id)
if selected.size > 1
multiple = true
end
end
else
selected = objects.first.try(:id)
end
all_tag_options = {:value => 'all', :selected => (selected == 'all')}
if multiple
all_tag_options.merge!(:style => "display:none;")
end
option_tags << content_tag('option', l(:label_all), all_tag_options)
option_tags << options_from_collection_for_select(objects, "id", "name", selected)
select_tag name, option_tags, {:multiple => multiple}.merge(options)
end
def field_required?(field)
field.is_a?(CustomField) ? field.is_required? : %w(project_id tracker_id subject priority_id is_private).include?(field)
end
def field_permission_tag(permissions, status, field, role)
def field_permission_tag(permissions, status, field, roles)
name = field.is_a?(CustomField) ? field.id.to_s : field
options = [["", ""], [l(:label_readonly), "readonly"]]
options << [l(:label_required), "required"] unless field_required?(field)
html_options = {}
selected = permissions[status.id][name]
if perm = permissions[status.id][name]
if perm.uniq.size > 1 || perm.size < @roles.size * @trackers.size
options << [l(:label_no_change_option), "no_change"]
selected = 'no_change'
else
selected = perm.first
end
end
hidden = field.is_a?(CustomField) &&
!field.visible? &&
!roles.detect {|role| role.custom_fields.to_a.include?(field)}
hidden = field.is_a?(CustomField) && !field.visible? && !role.custom_fields.to_a.include?(field)
if hidden
options[0][0] = l(:label_hidden)
selected = ''
html_options[:disabled] = true
end
select_tag("permissions[#{name}][#{status.id}]", options_for_select(options, selected), html_options)
select_tag("permissions[#{status.id}][#{name}]", options_for_select(options, selected), html_options)
end
def transition_tag(workflows, old_status, new_status, name)
w = workflows.select {|w| w.old_status_id == old_status.id && w.new_status_id == new_status.id}.size
tag_name = "transitions[#{ old_status.id }][#{new_status.id}][#{name}]"
if w == 0 || w == @roles.size * @trackers.size
hidden_field_tag(tag_name, "0") +
check_box_tag(tag_name, "1", w != 0,
:class => "old-status-#{old_status.id} new-status-#{new_status.id}")
else
select_tag tag_name,
options_for_select([
[l(:general_text_Yes), "1"],
[l(:general_text_No), "0"],
[l(:label_no_change_option), "no_change"]
], "no_change")
end
end
end

View File

@ -77,7 +77,7 @@ class AuthSource < ActiveRecord::Base
# Try to authenticate a user not yet registered against available sources
def self.authenticate(login, password)
AuthSource.where(:onthefly_register => true).all.each do |source|
AuthSource.where(:onthefly_register => true).each do |source|
begin
logger.debug "Authenticating '#{login}' against '#{source.name}'" if logger && logger.debug?
attrs = source.authenticate(login, password)

View File

@ -60,10 +60,10 @@ class Board < ActiveRecord::Base
# Updates topics_count, messages_count and last_message_id attributes for +board_id+
def self.reset_counters!(board_id)
board_id = board_id.to_i
update_all("topics_count = (SELECT COUNT(*) FROM #{Message.table_name} WHERE board_id=#{board_id} AND parent_id IS NULL)," +
where(["id = ?", board_id]).
update_all("topics_count = (SELECT COUNT(*) FROM #{Message.table_name} WHERE board_id=#{board_id} AND parent_id IS NULL)," +
" messages_count = (SELECT COUNT(*) FROM #{Message.table_name} WHERE board_id=#{board_id})," +
" last_message_id = (SELECT MAX(id) FROM #{Message.table_name} WHERE board_id=#{board_id})",
["id = ?", board_id])
" last_message_id = (SELECT MAX(id) FROM #{Message.table_name} WHERE board_id=#{board_id})")
end
def self.board_tree(boards, parent_id=nil, level=0)

View File

@ -198,7 +198,7 @@ class Changeset < ActiveRecord::Base
# Finds an issue that can be referenced by the commit message
def find_referenced_issue_by_id(id)
return nil if id.blank?
issue = Issue.find_by_id(id.to_i, :include => :project)
issue = Issue.includes(:project).where(:id => id.to_i).first
if Setting.commit_cross_project_ref?
# all issues can be referenced/fixed
elsif issue

View File

@ -22,14 +22,18 @@ class CustomField < ActiveRecord::Base
has_and_belongs_to_many :roles, :join_table => "#{table_name_prefix}custom_fields_roles#{table_name_suffix}", :foreign_key => "custom_field_id"
acts_as_list :scope => 'type = \'#{self.class}\''
serialize :possible_values
store :format_store
validates_presence_of :name, :field_format
validates_uniqueness_of :name, :scope => :type
validates_length_of :name, :maximum => 30
validates_inclusion_of :field_format, :in => Proc.new { Redmine::CustomFieldFormat.available_formats }
validates_inclusion_of :field_format, :in => Proc.new { Redmine::FieldFormat.available_formats }
validate :validate_custom_field
before_validation :set_searchable
before_save do |field|
field.format.before_custom_field_save(field)
end
after_save :handle_multiplicity_change
after_save do |field|
if field.visible_changed? && field.visible
@ -57,23 +61,29 @@ class CustomField < ActiveRecord::Base
visible? || user.admin?
end
def format
@format ||= Redmine::FieldFormat.find(field_format)
end
def field_format=(arg)
# cannot change format of a saved custom field
super if new_record?
if new_record?
@format = nil
super
end
end
def set_searchable
# make sure these fields are not searchable
self.searchable = false if %w(int float date bool).include?(field_format)
self.searchable = false unless format.class.searchable_supported
# make sure only these fields can have multiple values
self.multiple = false unless %w(list user version).include?(field_format)
self.multiple = false unless format.class.multiple_supported
true
end
def validate_custom_field
if self.field_format == "list"
errors.add(:possible_values, :blank) if self.possible_values.nil? || self.possible_values.empty?
errors.add(:possible_values, :invalid) unless self.possible_values.is_a? Array
format.validate_custom_field(self).each do |attribute, message|
errors.add attribute, message
end
if regexp.present?
@ -84,80 +94,49 @@ class CustomField < ActiveRecord::Base
end
end
if default_value.present? && !valid_field_value?(default_value)
errors.add(:default_value, :invalid)
if default_value.present?
validate_field_value(default_value).each do |message|
errors.add :default_value, message
end
end
end
def possible_values_options(obj=nil)
case field_format
when 'user', 'version'
if obj.respond_to?(:project) && obj.project
case field_format
when 'user'
obj.project.users.sort.collect {|u| [u.to_s, u.id.to_s]}
when 'version'
obj.project.shared_versions.sort.collect {|u| [u.to_s, u.id.to_s]}
end
elsif obj.is_a?(Array)
obj.collect {|o| possible_values_options(o)}.reduce(:&)
else
[]
end
when 'bool'
[[l(:general_text_Yes), '1'], [l(:general_text_No), '0']]
def possible_custom_value_options(custom_value)
format.possible_custom_value_options(custom_value)
end
def possible_values_options(object=nil)
if object.is_a?(Array)
object.map {|o| format.possible_values_options(self, o)}.reduce(:&) || []
else
possible_values || []
format.possible_values_options(self, object) || []
end
end
def possible_values(obj=nil)
case field_format
when 'user', 'version'
possible_values_options(obj).collect(&:last)
when 'bool'
['1', '0']
else
values = super()
if values.is_a?(Array)
values.each do |value|
value.force_encoding('UTF-8') if value.respond_to?(:force_encoding)
end
values
else
[]
def possible_values
values = read_attribute(:possible_values)
if values.is_a?(Array)
values.each do |value|
value.force_encoding('UTF-8') if value.respond_to?(:force_encoding)
end
values
else
[]
end
end
# Makes possible_values accept a multiline string
def possible_values=(arg)
if arg.is_a?(Array)
super(arg.compact.collect(&:strip).select {|v| !v.blank?})
values = arg.compact.collect(&:strip).select {|v| !v.blank?}
write_attribute(:possible_values, values)
else
self.possible_values = arg.to_s.split(/[\n\r]+/)
end
end
def cast_value(value)
casted = nil
unless value.blank?
case field_format
when 'string', 'text', 'list'
casted = value
when 'date'
casted = begin; value.to_date; rescue; nil end
when 'bool'
casted = (value == '1' ? true : false)
when 'int'
casted = value.to_i
when 'float'
casted = value.to_f
when 'user', 'version'
casted = (value.blank? ? nil : field_format.classify.constantize.find_by_id(value.to_i))
end
end
casted
format.cast_value(self, value)
end
def value_from_keyword(keyword, customized)
@ -181,96 +160,32 @@ class CustomField < ActiveRecord::Base
# Returns nil if the custom field can not be used for sorting.
def order_statement
return nil if multiple?
case field_format
when 'string', 'text', 'list', 'date', 'bool'
# COALESCE is here to make sure that blank and NULL values are sorted equally
"COALESCE(#{join_alias}.value, '')"
when 'int', 'float'
# Make the database cast values into numeric
# Postgresql will raise an error if a value can not be casted!
# CustomValue validations should ensure that it doesn't occur
"CAST(CASE #{join_alias}.value WHEN '' THEN '0' ELSE #{join_alias}.value END AS decimal(30,3))"
when 'user', 'version'
value_class.fields_for_order_statement(value_join_alias)
else
nil
end
format.order_statement(self)
end
# Returns a GROUP BY clause that can used to group by custom value
# Returns nil if the custom field can not be used for grouping.
def group_statement
return nil if multiple?
case field_format
when 'list', 'date', 'bool', 'int'
order_statement
when 'user', 'version'
"COALESCE(#{join_alias}.value, '')"
else
nil
end
format.group_statement(self)
end
def join_for_order_statement
case field_format
when 'user', 'version'
"LEFT OUTER JOIN #{CustomValue.table_name} #{join_alias}" +
" ON #{join_alias}.customized_type = '#{self.class.customized_class.base_class.name}'" +
" AND #{join_alias}.customized_id = #{self.class.customized_class.table_name}.id" +
" AND #{join_alias}.custom_field_id = #{id}" +
" AND (#{visibility_by_project_condition})" +
" AND #{join_alias}.value <> ''" +
" AND #{join_alias}.id = (SELECT max(#{join_alias}_2.id) FROM #{CustomValue.table_name} #{join_alias}_2" +
" WHERE #{join_alias}_2.customized_type = #{join_alias}.customized_type" +
" AND #{join_alias}_2.customized_id = #{join_alias}.customized_id" +
" AND #{join_alias}_2.custom_field_id = #{join_alias}.custom_field_id)" +
" LEFT OUTER JOIN #{value_class.table_name} #{value_join_alias}" +
" ON CAST(CASE #{join_alias}.value WHEN '' THEN '0' ELSE #{join_alias}.value END AS decimal(30,0)) = #{value_join_alias}.id"
when 'int', 'float'
"LEFT OUTER JOIN #{CustomValue.table_name} #{join_alias}" +
" ON #{join_alias}.customized_type = '#{self.class.customized_class.base_class.name}'" +
" AND #{join_alias}.customized_id = #{self.class.customized_class.table_name}.id" +
" AND #{join_alias}.custom_field_id = #{id}" +
" AND (#{visibility_by_project_condition})" +
" AND #{join_alias}.value <> ''" +
" AND #{join_alias}.id = (SELECT max(#{join_alias}_2.id) FROM #{CustomValue.table_name} #{join_alias}_2" +
" WHERE #{join_alias}_2.customized_type = #{join_alias}.customized_type" +
" AND #{join_alias}_2.customized_id = #{join_alias}.customized_id" +
" AND #{join_alias}_2.custom_field_id = #{join_alias}.custom_field_id)"
when 'string', 'text', 'list', 'date', 'bool'
"LEFT OUTER JOIN #{CustomValue.table_name} #{join_alias}" +
" ON #{join_alias}.customized_type = '#{self.class.customized_class.base_class.name}'" +
" AND #{join_alias}.customized_id = #{self.class.customized_class.table_name}.id" +
" AND #{join_alias}.custom_field_id = #{id}" +
" AND (#{visibility_by_project_condition})" +
" AND #{join_alias}.id = (SELECT max(#{join_alias}_2.id) FROM #{CustomValue.table_name} #{join_alias}_2" +
" WHERE #{join_alias}_2.customized_type = #{join_alias}.customized_type" +
" AND #{join_alias}_2.customized_id = #{join_alias}.customized_id" +
" AND #{join_alias}_2.custom_field_id = #{join_alias}.custom_field_id)"
else
nil
end
format.join_for_order_statement(self)
end
def join_alias
"cf_#{id}"
end
def value_join_alias
join_alias + "_" + field_format
end
def visibility_by_project_condition(project_key=nil, user=User.current)
def visibility_by_project_condition(project_key=nil, user=User.current, id_column=nil)
if visible? || user.admin?
"1=1"
elsif user.anonymous?
"1=0"
else
project_key ||= "#{self.class.customized_class.table_name}.project_id"
id_column ||= id
"#{project_key} IN (SELECT DISTINCT m.project_id FROM #{Member.table_name} m" +
" INNER JOIN #{MemberRole.table_name} mr ON mr.member_id = m.id" +
" INNER JOIN #{table_name_prefix}custom_fields_roles#{table_name_suffix} cfr ON cfr.role_id = mr.role_id" +
" WHERE m.user_id = #{user.id} AND cfr.custom_field_id = #{id})"
" WHERE m.user_id = #{user.id} AND cfr.custom_field_id = #{id_column})"
end
end
@ -293,12 +208,7 @@ class CustomField < ActiveRecord::Base
# Returns the class that values represent
def value_class
case field_format
when 'user', 'version'
field_format.classify.constantize
else
nil
end
format.target_class if format.respond_to?(:target_class)
end
def self.customized_class
@ -317,7 +227,8 @@ class CustomField < ActiveRecord::Base
# Returns the error messages for the given value
# or an empty array if value is a valid value for the custom field
def validate_field_value(value)
def validate_custom_value(custom_value)
value = custom_value.value
errs = []
if value.is_a?(Array)
if !multiple?
@ -326,16 +237,20 @@ class CustomField < ActiveRecord::Base
if is_required? && value.detect(&:present?).nil?
errs << ::I18n.t('activerecord.errors.messages.blank')
end
value.each {|v| errs += validate_field_value_format(v)}
else
if is_required? && value.blank?
errs << ::I18n.t('activerecord.errors.messages.blank')
end
errs += validate_field_value_format(value)
end
errs += format.validate_custom_value(custom_value)
errs
end
# Returns the error messages for the default custom field value
def validate_field_value(value)
validate_custom_value(CustomValue.new(:custom_field => self, :value => value))
end
# Returns true if value is a valid value for the custom field
def valid_field_value?(value)
validate_field_value(value).empty?
@ -347,29 +262,6 @@ class CustomField < ActiveRecord::Base
protected
# Returns the error message for the given value regarding its format
def validate_field_value_format(value)
errs = []
unless value.to_s == ''
errs << ::I18n.t('activerecord.errors.messages.invalid') unless regexp.blank? or value =~ Regexp.new(regexp)
errs << ::I18n.t('activerecord.errors.messages.too_short', :count => min_length) if min_length > 0 and value.length < min_length
errs << ::I18n.t('activerecord.errors.messages.too_long', :count => max_length) if max_length > 0 and value.length > max_length
# Format specific validations
case field_format
when 'int'
errs << ::I18n.t('activerecord.errors.messages.not_a_number') unless value =~ /^[+-]?\d+$/
when 'float'
begin; Kernel.Float(value); rescue; errs << ::I18n.t('activerecord.errors.messages.invalid') end
when 'date'
errs << ::I18n.t('activerecord.errors.messages.not_a_date') unless value =~ /^\d{4}-\d{2}-\d{2}$/ && begin; value.to_date; rescue; false end
when 'list'
errs << ::I18n.t('activerecord.errors.messages.inclusion') unless possible_values.include?(value)
end
end
errs
end
# Removes multiple values for the custom field after setting the multiple attribute to false
# We kepp the value with the highest id for each customized object
def handle_multiplicity_change
@ -386,3 +278,5 @@ class CustomField < ActiveRecord::Base
end
end
end
require_dependency 'redmine/field_format'

View File

@ -16,7 +16,13 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class CustomFieldValue
attr_accessor :custom_field, :customized, :value
attr_accessor :custom_field, :customized, :value, :value_was
def initialize(attributes={})
attributes.each do |name, v|
send "#{name}=", v
end
end
def custom_field_id
custom_field.id
@ -43,7 +49,7 @@ class CustomFieldValue
end
def validate_value
custom_field.validate_field_value(value).each do |message|
custom_field.validate_custom_value(self).each do |message|
customized.errors.add(:base, custom_field.name + ' ' + message)
end
end

View File

@ -17,6 +17,7 @@
class EnabledModule < ActiveRecord::Base
belongs_to :project
acts_as_watchable
validates_presence_of :name
validates_uniqueness_of :name, :scope => :project_id

View File

@ -60,7 +60,7 @@ class Enumeration < ActiveRecord::Base
def check_default
if is_default? && is_default_changed?
Enumeration.update_all({:is_default => false}, {:type => type})
Enumeration.where({:type => type}).update_all({:is_default => false})
end
end
@ -73,7 +73,7 @@ class Enumeration < ActiveRecord::Base
self.objects_count != 0
end
# Is this enumeration overiding a system level enumeration?
# Is this enumeration overriding a system level enumeration?
def is_override?
!self.parent.nil?
end
@ -103,8 +103,14 @@ class Enumeration < ActiveRecord::Base
subclasses
end
# Does the +new+ Hash override the previous Enumeration?
# TODO: remove in Redmine 3.0
def self.overridding_change?(new, previous)
ActiveSupport::Deprecation.warn "Enumeration#overridding_change? is deprecated and will be removed in Redmine 3.0. Please use #overriding_change?."
overriding_change?(new, previous)
end
# Does the +new+ Hash override the previous Enumeration?
def self.overriding_change?(new, previous)
if (same_active_state?(new['active'], previous.active)) && same_custom_values?(new,previous)
return false
else

View File

@ -18,8 +18,10 @@
class Group < Principal
include Redmine::SafeAttributes
has_and_belongs_to_many :users, :after_add => :user_added,
:after_remove => :user_removed
has_and_belongs_to_many :users,
:join_table => "#{table_name_prefix}groups_users#{table_name_suffix}",
:after_add => :user_added,
:after_remove => :user_removed
acts_as_customizable
@ -66,7 +68,6 @@ class Group < Principal
MemberRole.
includes(:member).
where("#{Member.table_name}.user_id = ? AND #{MemberRole.table_name}.inherited_from IN (?)", user.id, member.member_role_ids).
all.
each(&:destroy)
end
end
@ -85,6 +86,6 @@ class Group < Principal
def remove_references_before_destroy
return if self.id.nil?
Issue.update_all 'assigned_to_id = NULL', ['assigned_to_id = ?', id]
Issue.where(['assigned_to_id = ?', id]).update_all('assigned_to_id = NULL')
end
end

View File

@ -33,12 +33,12 @@ class Issue < ActiveRecord::Base
has_many :visible_journals,
:class_name => 'Journal',
:as => :journalized,
:conditions => Proc.new {
:conditions => Proc.new {
["(#{Journal.table_name}.private_notes = ? OR (#{Project.allowed_to_condition(User.current, :view_private_notes)}))", false]
},
:readonly => true
has_many :time_entries, :dependent => :delete_all
has_many :time_entries, :dependent => :destroy
has_and_belongs_to_many :changesets, :order => "#{Changeset.table_name}.committed_on ASC, #{Changeset.table_name}.id ASC"
has_many :relations_from, :class_name => 'IssueRelation', :foreign_key => 'issue_from_id', :dependent => :delete_all
@ -94,7 +94,7 @@ class Issue < ActiveRecord::Base
before_create :default_assign
before_save :close_duplicates, :update_done_ratio_from_issue_status,
:force_updated_on_change, :update_closed_on, :set_assigned_to_was
after_save {|issue| issue.send :after_project_change if !issue.id_changed? && issue.project_id_changed?}
after_save {|issue| issue.send :after_project_change if !issue.id_changed? && issue.project_id_changed?}
after_save :reschedule_following_issues, :update_nested_set_attributes,
:update_parent_attributes, :create_journal
# Should be after_create but would be called before previous after_save callbacks
@ -200,7 +200,7 @@ class Issue < ActiveRecord::Base
# Overrides Redmine::Acts::Customizable::InstanceMethods#available_custom_fields
def available_custom_fields
(project && tracker) ? (project.all_issue_custom_fields & tracker.custom_fields.all) : []
(project && tracker) ? (project.all_issue_custom_fields & tracker.custom_fields) : []
end
def visible_custom_field_values(user=nil)
@ -218,7 +218,7 @@ class Issue < ActiveRecord::Base
self.status = issue.status
self.author = User.current
unless options[:attachments] == false
self.attachments = issue.attachments.map do |attachement|
self.attachments = issue.attachments.map do |attachement|
attachement.copy(:container => self)
end
end
@ -394,10 +394,10 @@ class Issue < ActiveRecord::Base
:if => lambda {|issue, user| user.allowed_to?(:add_issue_notes, issue.project)}
safe_attributes 'private_notes',
:if => lambda {|issue, user| !issue.new_record? && user.allowed_to?(:set_notes_private, issue.project)}
:if => lambda {|issue, user| !issue.new_record? && user.allowed_to?(:set_notes_private, issue.project)}
safe_attributes 'watcher_user_ids',
:if => lambda {|issue, user| issue.new_record? && user.allowed_to?(:add_issue_watchers, issue.project)}
:if => lambda {|issue, user| issue.new_record? && user.allowed_to?(:add_issue_watchers, issue.project)}
safe_attributes 'is_private',
:if => lambda {|issue, user|
@ -483,6 +483,11 @@ class Issue < ActiveRecord::Base
end
end
# Returns the custom fields that can be edited by the given user
def editable_custom_fields(user=nil)
editable_custom_field_values(user).map(&:custom_field).uniq
end
# Returns the names of attributes that are read-only for user or the current user
# For users with multiple roles, the read-only fields are the intersection of
# read-only fields of each role
@ -524,7 +529,7 @@ class Issue < ActiveRecord::Base
return {} if roles.empty?
result = {}
workflow_permissions = WorkflowPermission.where(:tracker_id => tracker_id, :old_status_id => status_id, :role_id => roles.map(&:id)).all
workflow_permissions = WorkflowPermission.where(:tracker_id => tracker_id, :old_status_id => status_id, :role_id => roles.map(&:id))
if workflow_permissions.any?
workflow_rules = workflow_permissions.inject({}) do |h, wp|
h[wp.field_name] ||= []
@ -762,7 +767,7 @@ class Issue < ActiveRecord::Base
initial_status ||= status
initial_assigned_to_id = assigned_to_id_changed? ? assigned_to_id_was : assigned_to_id
assignee_transitions_allowed = initial_assigned_to_id.present? &&
assignee_transitions_allowed = initial_assigned_to_id.present? &&
(user.id == initial_assigned_to_id || user.group_ids.include?(initial_assigned_to_id))
statuses = initial_status.find_new_statuses_allowed_to(
@ -839,8 +844,10 @@ class Issue < ActiveRecord::Base
# spent_hours => 0.0
# spent_hours => 50.2
def total_spent_hours
@total_spent_hours ||= self_and_descendants.sum("#{TimeEntry.table_name}.hours",
:joins => "LEFT JOIN #{TimeEntry.table_name} ON #{TimeEntry.table_name}.issue_id = #{Issue.table_name}.id").to_f || 0.0
@total_spent_hours ||=
self_and_descendants.
joins("LEFT JOIN #{TimeEntry.table_name} ON #{TimeEntry.table_name}.issue_id = #{Issue.table_name}.id").
sum("#{TimeEntry.table_name}.hours").to_f || 0.0
end
def relations
@ -1054,7 +1061,7 @@ class Issue < ActiveRecord::Base
if leaf.start_date
# Only move subtask if it starts at the same date as the parent
# or if it starts before the given date
if start_date == leaf.start_date || date > leaf.start_date
if start_date == leaf.start_date || date > leaf.start_date
leaf.reschedule_on!(date)
end
else
@ -1105,7 +1112,10 @@ class Issue < ActiveRecord::Base
def self.update_versions_from_hierarchy_change(project)
moved_project_ids = project.self_and_descendants.reload.collect(&:id)
# Update issues of the moved projects and issues assigned to a version of a moved project
Issue.update_versions(["#{Version.table_name}.project_id IN (?) OR #{Issue.table_name}.project_id IN (?)", moved_project_ids, moved_project_ids])
Issue.update_versions(
["#{Version.table_name}.project_id IN (?) OR #{Issue.table_name}.project_id IN (?)",
moved_project_ids, moved_project_ids]
)
end
def parent_issue_id=(arg)
@ -1189,13 +1199,13 @@ class Issue < ActiveRecord::Base
end
def self.by_subproject(project)
ActiveRecord::Base.connection.select_all("select s.id as status_id,
s.is_closed as closed,
ActiveRecord::Base.connection.select_all("select s.id as status_id,
s.is_closed as closed,
#{Issue.table_name}.project_id as project_id,
count(#{Issue.table_name}.id) as total
from
count(#{Issue.table_name}.id) as total
from
#{Issue.table_name}, #{Project.table_name}, #{IssueStatus.table_name} s
where
where
#{Issue.table_name}.status_id=s.id
and #{Issue.table_name}.project_id = #{Project.table_name}.id
and #{visible_condition(User.current, :project => project, :with_subprojects => true)}
@ -1222,7 +1232,7 @@ class Issue < ActiveRecord::Base
def after_project_change
# Update project_id on related time entries
TimeEntry.update_all(["project_id = ?", project_id], {:issue_id => id})
TimeEntry.where({:issue_id => id}).update_all(["project_id = ?", project_id])
# Delete issue relations
unless Setting.cross_project_issue_relations?
@ -1285,8 +1295,7 @@ class Issue < ActiveRecord::Base
if root_id.nil?
# issue was just created
self.root_id = (@parent_issue.nil? ? id : @parent_issue.root_id)
set_default_left_and_right
Issue.update_all(["root_id = ?, lft = ?, rgt = ?", root_id, lft, rgt], ["id = ?", id])
Issue.where(["id = ?", id]).update_all(["root_id = ?", root_id])
if @parent_issue
move_to_child_of(@parent_issue)
end
@ -1309,13 +1318,18 @@ class Issue < ActiveRecord::Base
move_to_right_of(root)
end
old_root_id = root_id
self.root_id = (@parent_issue.nil? ? id : @parent_issue.root_id )
target_maxright = nested_set_scope.maximum(right_column_name) || 0
offset = target_maxright + 1 - lft
Issue.update_all(["root_id = ?, lft = lft + ?, rgt = rgt + ?", root_id, offset, offset],
["root_id = ? AND lft >= ? AND rgt <= ? ", old_root_id, lft, rgt])
self[left_column_name] = lft + offset
self[right_column_name] = rgt + offset
in_tenacious_transaction do
@parent_issue.reload_nested_set if @parent_issue
self.reload_nested_set
self.root_id = (@parent_issue.nil? ? id : @parent_issue.root_id)
cond = ["root_id = ? AND lft >= ? AND rgt <= ? ", old_root_id, lft, rgt]
self.class.base_class.select('id').lock(true).where(cond)
offset = right_most_bound + 1 - lft
Issue.where(cond).
update_all(["root_id = ?, lft = lft + ?, rgt = rgt + ?", root_id, offset, offset])
self[left_column_name] = lft + offset
self[right_column_name] = rgt + offset
end
if @parent_issue
move_to_child_of(@parent_issue)
end
@ -1337,7 +1351,7 @@ class Issue < ActiveRecord::Base
def recalculate_attributes_for(issue_id)
if issue_id && p = Issue.find_by_id(issue_id)
# priority = highest priority of children
if priority_position = p.children.maximum("#{IssuePriority.table_name}.position", :joins => :priority)
if priority_position = p.children.joins(:priority).maximum("#{IssuePriority.table_name}.position")
p.priority = IssuePriority.find_by_position(priority_position)
end
@ -1356,8 +1370,9 @@ class Issue < ActiveRecord::Base
if average == 0
average = 1
end
done = p.leaves.sum("COALESCE(CASE WHEN estimated_hours > 0 THEN estimated_hours ELSE NULL END, #{average}) " +
"* (CASE WHEN is_closed = #{connection.quoted_true} THEN 100 ELSE COALESCE(done_ratio, 0) END)", :joins => :status).to_f
done = p.leaves.joins(:status).
sum("COALESCE(CASE WHEN estimated_hours > 0 THEN estimated_hours ELSE NULL END, #{average}) " +
"* (CASE WHEN is_closed = #{connection.quoted_true} THEN 100 ELSE COALESCE(done_ratio, 0) END)").to_f
progress = done / (average * leaves_count)
p.done_ratio = progress.round
end
@ -1426,7 +1441,7 @@ class Issue < ActiveRecord::Base
def close_duplicates
if closing?
duplicates.each do |duplicate|
# Reload is need in case the duplicate was updated by a previous duplicate
# Reload is needed in case the duplicate was updated by a previous duplicate
duplicate.reload
# Don't re-close it if it's already closed
next if duplicate.closed?
@ -1481,11 +1496,11 @@ class Issue < ActiveRecord::Base
before = @custom_values_before_change[c.custom_field_id]
after = c.value
next if before == after || (before.blank? && after.blank?)
if before.is_a?(Array) || after.is_a?(Array)
before = [before] unless before.is_a?(Array)
after = [after] unless after.is_a?(Array)
# values removed
(before - after).reject(&:blank?).each do |value|
@current_journal.details << JournalDetail.new(:property => 'cf',
@ -1546,14 +1561,14 @@ class Issue < ActiveRecord::Base
where = "#{Issue.table_name}.#{select_field}=j.id"
ActiveRecord::Base.connection.select_all("select s.id as status_id,
s.is_closed as closed,
ActiveRecord::Base.connection.select_all("select s.id as status_id,
s.is_closed as closed,
j.id as #{select_field},
count(#{Issue.table_name}.id) as total
from
count(#{Issue.table_name}.id) as total
from
#{Issue.table_name}, #{Project.table_name}, #{IssueStatus.table_name} s, #{joins} j
where
#{Issue.table_name}.status_id=s.id
where
#{Issue.table_name}.status_id=s.id
and #{where}
and #{Issue.table_name}.project_id=#{Project.table_name}.id
and #{visible_condition(User.current, :project => project)}

View File

@ -35,7 +35,7 @@ class IssueCategory < ActiveRecord::Base
# If a category is specified, issues are reassigned to this category
def destroy(reassign_to = nil)
if reassign_to && reassign_to.is_a?(IssueCategory) && reassign_to.project == self.project
Issue.update_all({:category_id => reassign_to.id}, {:category_id => id})
Issue.where({:category_id => id}).update_all({:category_id => reassign_to.id})
end
destroy_without_reassign
end

View File

@ -28,13 +28,14 @@ class IssueCustomField < CustomField
super || (roles & user.roles_for_project(project)).present?
end
def visibility_by_project_condition(*args)
def visibility_by_project_condition(project_key=nil, user=User.current, id_column=nil)
sql = super
additional_sql = "#{Issue.table_name}.tracker_id IN (SELECT tracker_id FROM #{table_name_prefix}custom_fields_trackers#{table_name_suffix} WHERE custom_field_id = #{id})"
unless is_for_all?
additional_sql << " AND #{Issue.table_name}.project_id IN (SELECT project_id FROM #{table_name_prefix}custom_fields_projects#{table_name_suffix} WHERE custom_field_id = #{id})"
end
"((#{sql}) AND (#{additional_sql}))"
id_column ||= id
tracker_condition = "#{Issue.table_name}.tracker_id IN (SELECT tracker_id FROM #{table_name_prefix}custom_fields_trackers#{table_name_suffix} WHERE custom_field_id = #{id_column})"
project_condition = "EXISTS (SELECT 1 FROM #{CustomField.table_name} ifa WHERE ifa.is_for_all = #{connection.quoted_true} AND ifa.id = #{id_column})" +
" OR #{Issue.table_name}.project_id IN (SELECT project_id FROM #{table_name_prefix}custom_fields_projects#{table_name_suffix} WHERE custom_field_id = #{id_column})"
"((#{sql}) AND (#{tracker_condition}) AND (#{project_condition}))"
end
def validate_custom_field

View File

@ -48,7 +48,7 @@ class IssuePriority < Enumeration
# Updates position_name for active priorities
# Called from migration 20121026003537_populate_enumerations_position_name
def self.compute_position_names
priorities = where(:active => true).all.sort_by(&:position)
priorities = where(:active => true).sort_by(&:position)
if priorities.any?
default = priorities.detect(&:is_default?) || priorities[(priorities.size - 1) / 2]
priorities.each_with_index do |priority, index|
@ -61,7 +61,7 @@ class IssuePriority < Enumeration
index == (priorities.size - 1) ? "highest" : "high#{priorities.size - index}"
end
update_all({:position_name => name}, :id => priority.id)
where(:id => priority.id).update_all({:position_name => name})
end
end
end

View File

@ -142,7 +142,7 @@ class IssueQuery < Query
if all_projects.any?
principals += Principal.member_of(all_projects)
end
versions = Version.visible.find_all_by_sharing('system')
versions = Version.visible.where(:sharing => 'system').all
issue_custom_fields = IssueCustomField.where(:is_for_all => true)
end
principals.uniq!
@ -150,7 +150,7 @@ class IssueQuery < Query
users = principals.select {|p| p.is_a?(User)}
add_available_filter "status_id",
:type => :list_status, :values => IssueStatus.sorted.all.collect{|s| [s.name, s.id.to_s] }
:type => :list_status, :values => IssueStatus.sorted.collect{|s| [s.name, s.id.to_s] }
if project.nil?
project_values = []
@ -333,8 +333,9 @@ class IssueQuery < Query
limit(options[:limit]).
offset(options[:offset])
if has_custom_field_column?
scope = scope.preload(:custom_values)
scope = scope.preload(:custom_values)
if has_column?(:author)
scope = scope.preload(:author)
end
issues = scope.all
@ -409,7 +410,7 @@ class IssueQuery < Query
groups = Group.all
operator = '!' # Override the operator since we want to find by assigned_to
else
groups = Group.find_all_by_id(value)
groups = Group.where(:id => value).all
end
groups ||= []

View File

@ -185,12 +185,12 @@ class IssueRelation < ActiveRecord::Base
def create_journal_after_create
journal = issue_from.init_journal(User.current)
journal.details << JournalDetail.new(:property => 'relation',
:prop_key => label_for(issue_from).to_s,
:prop_key => relation_type_for(issue_from),
:value => issue_to.id)
journal.save
journal = issue_to.init_journal(User.current)
journal.details << JournalDetail.new(:property => 'relation',
:prop_key => label_for(issue_to).to_s,
:prop_key => relation_type_for(issue_to),
:value => issue_from.id)
journal.save
end
@ -198,12 +198,12 @@ class IssueRelation < ActiveRecord::Base
def create_journal_after_delete
journal = issue_from.init_journal(User.current)
journal.details << JournalDetail.new(:property => 'relation',
:prop_key => label_for(issue_from).to_s,
:prop_key => relation_type_for(issue_from),
:old_value => issue_to.id)
journal.save
journal = issue_to.init_journal(User.current)
journal.details << JournalDetail.new(:property => 'relation',
:prop_key => label_for(issue_to).to_s,
:prop_key => relation_type_for(issue_to),
:old_value => issue_from.id)
journal.save
end

View File

@ -32,7 +32,7 @@ class IssueStatus < ActiveRecord::Base
scope :named, lambda {|arg| where("LOWER(#{table_name}.name) = LOWER(?)", arg.to_s.strip)}
def update_default
IssueStatus.update_all({:is_default => false}, ['id <> ?', id]) if self.is_default?
IssueStatus.where(['id <> ?', id]).update_all({:is_default => false}) if self.is_default?
end
# Returns the default status for new issues
@ -43,8 +43,8 @@ class IssueStatus < ActiveRecord::Base
# Update all the +Issues+ setting their done_ratio to the value of their +IssueStatus+
def self.update_issue_done_ratios
if Issue.use_status_for_done_ratio?
IssueStatus.where("default_done_ratio >= 0").all.each do |status|
Issue.update_all({:done_ratio => status.default_done_ratio}, {:status_id => status.id})
IssueStatus.where("default_done_ratio >= 0").each do |status|
Issue.where({:status_id => status.id}).update_all({:done_ratio => status.default_done_ratio})
end
end

View File

@ -80,15 +80,20 @@ class Journal < ActiveRecord::Base
end
end
# Returns the JournalDetail for the given attribute, or nil if the attribute
# was not updated
def detail_for_attribute(attribute)
details.detect {|detail| detail.prop_key == attribute}
end
# Returns the new status if the journal contains a status change, otherwise nil
def new_status
c = details.detect {|detail| detail.prop_key == 'status_id'}
(c && c.value) ? IssueStatus.find_by_id(c.value.to_i) : nil
s = new_value_for('status_id')
s ? IssueStatus.find_by_id(s.to_i) : nil
end
def new_value_for(prop)
c = details.detect {|detail| detail.prop_key == prop}
c ? c.value : nil
detail_for_attribute(prop).try(:value)
end
def editable_by?(usr)
@ -148,7 +153,7 @@ class Journal < ActiveRecord::Base
def self.preload_journals_details_custom_fields(journals)
field_ids = journals.map(&:details).flatten.select {|d| d.property == 'cf'}.map(&:prop_key).uniq
if field_ids.any?
fields_by_id = CustomField.find_all_by_id(field_ids).inject({}) {|h, f| h[f.id] = f; h}
fields_by_id = CustomField.where(:id => field_ids).inject({}) {|h, f| h[f.id] = f; h}
journals.each do |journal|
journal.details.each do |detail|
if detail.property == 'cf'
@ -185,6 +190,7 @@ class Journal < ActiveRecord::Base
if notify? && (Setting.notified_events.include?('issue_updated') ||
(Setting.notified_events.include?('issue_note_added') && notes.present?) ||
(Setting.notified_events.include?('issue_status_updated') && new_status.present?) ||
(Setting.notified_events.include?('issue_assigned_to_updated') && detail_for_attribute('assigned_to_id').present?) ||
(Setting.notified_events.include?('issue_priority_updated') && new_value_for('priority_id').present?)
)
Mailer.deliver_issue_edit(self)

View File

@ -46,6 +46,14 @@ class MailHandler < ActionMailer::Base
super(email)
end
# Receives an email and rescues any exception
def self.safe_receive(*args)
receive(*args)
rescue => e
logger.error "An unexpected error occurred when receiving email: #{e.message}" if logger
return false
end
# Extracts MailHandler options from environment variables
# Use when receiving emails with rake tasks
def self.extract_options_from_env(env)
@ -190,6 +198,7 @@ class MailHandler < ActionMailer::Base
issue.subject = '(no subject)'
end
issue.description = cleaned_up_text_body
issue.start_date ||= Date.today if Setting.default_issue_start_date_to_creation_date?
# add To and Cc as watchers before saving so the watchers can reply to Redmine
add_watchers(issue)
@ -296,8 +305,9 @@ class MailHandler < ActionMailer::Base
if user.allowed_to?("add_#{obj.class.name.underscore}_watchers".to_sym, obj.project)
addresses = [email.to, email.cc].flatten.compact.uniq.collect {|a| a.strip.downcase}
unless addresses.empty?
watchers = User.active.where('LOWER(mail) IN (?)', addresses).all
watchers.each {|w| obj.add_watcher(w)}
User.active.where('LOWER(mail) IN (?)', addresses).each do |w|
obj.add_watcher(w)
end
end
end
end
@ -410,7 +420,11 @@ class MailHandler < ActionMailer::Base
part.header[:content_disposition].try(:disposition_type) == 'attachment'
end
@plain_text_body = parts.map {|p| Redmine::CodesetUtil.to_utf8(p.body.decoded, p.charset)}.join("\r\n")
@plain_text_body = parts.map do |p|
body_charset = p.charset.respond_to?(:force_encoding) ?
Mail::RubyVer.pick_encoding(p.charset).to_s : p.charset
Redmine::CodesetUtil.to_utf8(p.body.decoded, body_charset)
end.join("\r\n")
# strip html tags and remove doctype directive
if parts.any? {|p| p.mime_type == 'text/html'}

View File

@ -80,7 +80,7 @@ class Mailer < ActionMailer::Base
def self.deliver_issue_edit(journal)
issue = journal.journalized.reload
to = journal.notified_users
cc = journal.notified_watchers
cc = journal.notified_watchers - to
journal.each_notification(to + cc) do |users|
issue.each_notification(users) do |users2|
Mailer.issue_edit(journal, to & users2, cc & users2).deliver
@ -158,6 +158,7 @@ class Mailer < ActionMailer::Base
@news = news
@news_url = url_for(:controller => 'news', :action => 'show', :id => news)
mail :to => news.recipients,
:cc => news.cc_for_added_news,
:subject => "[#{news.project.name}] #{l(:label_news)}: #{news.title}"
end
@ -266,7 +267,7 @@ class Mailer < ActionMailer::Base
# Mailer.account_activation_request(user).deliver => sends an email to all active administrators
def account_activation_request(user)
# Send the email to all active administrators
recipients = User.active.where(:admin => true).all.collect { |u| u.mail }.compact
recipients = User.active.where(:admin => true).collect { |u| u.mail }.compact
@user = user
@url = url_for(:controller => 'users', :action => 'index',
:status => User::STATUS_REGISTERED,
@ -330,8 +331,8 @@ class Mailer < ActionMailer::Base
scope = scope.where(:assigned_to_id => user_ids) if user_ids.present?
scope = scope.where(:project_id => project.id) if project
scope = scope.where(:tracker_id => tracker.id) if tracker
issues_by_assignee = scope.includes(:status, :assigned_to, :project, :tracker).all.group_by(&:assigned_to)
issues_by_assignee = scope.includes(:status, :assigned_to, :project, :tracker).
group_by(&:assigned_to)
issues_by_assignee.keys.each do |assignee|
if assignee.is_a?(Group)
assignee.users.each do |user|
@ -463,7 +464,7 @@ class Mailer < ActionMailer::Base
if rand
hash << Redmine::Utils.random_hex(8)
end
host = Setting.mail_from.to_s.gsub(%r{^.*@}, '')
host = Setting.mail_from.to_s.strip.gsub(%r{^.*@|>}, '')
host = "#{::Socket.gethostname}.redmine" if host.empty?
"#{hash.join('.')}@#{host}"
end

View File

@ -84,11 +84,12 @@ class Member < ActiveRecord::Base
def set_issue_category_nil
if user
# remove category based auto assignments for this member
IssueCategory.update_all "assigned_to_id = NULL", ["project_id = ? AND assigned_to_id = ?", project.id, user.id]
IssueCategory.where(["project_id = ? AND assigned_to_id = ?", project.id, user.id]).
update_all("assigned_to_id = NULL")
end
end
# Find or initilize a Member with an id, attributes, and for a Principal
# Find or initialize a Member with an id, attributes, and for a Principal
def self.edit_membership(id, new_attributes, principal=nil)
@membership = id.present? ? Member.find(id) : Member.new(:principal => principal)
@membership.attributes = new_attributes

View File

@ -64,7 +64,8 @@ class MemberRole < ActiveRecord::Base
end
def remove_inherited_roles
MemberRole.where(:inherited_from => id).all.group_by(&:member).each do |member, member_roles|
MemberRole.where(:inherited_from => id).group_by(&:member).
each do |member, member_roles|
member_roles.each(&:destroy)
end
end

View File

@ -68,7 +68,7 @@ class Message < ActiveRecord::Base
def update_messages_board
if board_id_changed?
Message.update_all({:board_id => board_id}, ["id = ? OR parent_id = ?", root.id, root.id])
Message.where(["id = ? OR parent_id = ?", root.id, root.id]).update_all({:board_id => board_id})
Board.reset_counters!(board_id_was)
Board.reset_counters!(board_id)
end
@ -76,7 +76,7 @@ class Message < ActiveRecord::Base
def reset_counters!
if parent && parent.id
Message.update_all({:last_reply_id => parent.children.maximum(:id)}, {:id => parent.id})
Message.where({:id => parent.id}).update_all({:last_reply_id => parent.children.maximum(:id)})
end
board.reset_counters!
end

View File

@ -51,7 +51,19 @@ class News < ActiveRecord::Base
end
def recipients
project.users.select {|user| user.notify_about?(self)}.map(&:mail)
project.users.select {|user| user.notify_about?(self) && user.allowed_to?(:view_news, project)}.map(&:mail)
end
# Returns the email addresses that should be cc'd when a new news is added
def cc_for_added_news
cc = []
if m = project.enabled_module('news')
cc = m.notified_watchers
unless project.is_public?
cc = cc.select {|user| project.users.include?(user)}
end
end
cc.map(&:mail)
end
# returns latest news for projects visible by user

View File

@ -25,7 +25,11 @@ class Principal < ActiveRecord::Base
STATUS_LOCKED = 3
has_many :members, :foreign_key => 'user_id', :dependent => :destroy
has_many :memberships, :class_name => 'Member', :foreign_key => 'user_id', :include => [ :project, :roles ], :conditions => "#{Project.table_name}.status<>#{Project::STATUS_ARCHIVED}", :order => "#{Project.table_name}.name"
has_many :memberships, :class_name => 'Member',
:foreign_key => 'user_id',
:include => [:project, :roles],
:conditions => "#{Project.table_name}.status<>#{Project::STATUS_ARCHIVED}",
:order => "#{Project.table_name}.name"
has_many :projects, :through => :memberships
has_many :issue_categories, :foreign_key => 'assigned_to_id', :dependent => :nullify

View File

@ -26,7 +26,7 @@ class Project < ActiveRecord::Base
# Maximum length for project identifiers
IDENTIFIER_MAX_LENGTH = 100
# Specific overidden Activities
# Specific overridden Activities
has_many :time_entry_activities
has_many :members, :include => [:principal, :roles], :conditions => "#{Principal.table_name}.type='User' AND #{Principal.table_name}.status=#{Principal::STATUS_ACTIVE}"
has_many :memberships, :class_name => 'Member'
@ -39,7 +39,7 @@ class Project < ActiveRecord::Base
has_many :issues, :dependent => :destroy, :include => [:status, :tracker]
has_many :issue_changes, :through => :issues, :source => :journals
has_many :versions, :dependent => :destroy, :order => "#{Version.table_name}.effective_date DESC, #{Version.table_name}.name DESC"
has_many :time_entries, :dependent => :delete_all
has_many :time_entries, :dependent => :destroy
has_many :queries, :class_name => 'IssueQuery', :dependent => :delete_all
has_many :documents, :dependent => :destroy
has_many :news, :dependent => :destroy, :include => :author
@ -56,7 +56,7 @@ class Project < ActiveRecord::Base
:join_table => "#{table_name_prefix}custom_fields_projects#{table_name_suffix}",
:association_foreign_key => 'custom_field_id'
acts_as_nested_set :order => 'name', :dependent => :destroy
acts_as_nested_set :dependent => :destroy
acts_as_attachable :view_permission => :view_files,
:delete_permission => :manage_files
@ -74,7 +74,7 @@ class Project < ActiveRecord::Base
validates_length_of :name, :maximum => 255
validates_length_of :homepage, :maximum => 255
validates_length_of :identifier, :in => 1..IDENTIFIER_MAX_LENGTH
# donwcase letters, digits, dashes but not digits only
# downcase letters, digits, dashes but not digits only
validates_format_of :identifier, :with => /\A(?!\d+$)[a-z0-9\-_]*\z/, :if => Proc.new { |p| p.identifier_changed? }
# reserved words
validates_exclusion_of :identifier, :in => %w( new )
@ -249,18 +249,17 @@ class Project < ActiveRecord::Base
# does not successfully save.
def create_time_entry_activity_if_needed(activity)
if activity['parent_id']
parent_activity = TimeEntryActivity.find(activity['parent_id'])
activity['name'] = parent_activity.name
activity['position'] = parent_activity.position
if Enumeration.overridding_change?(activity, parent_activity)
if Enumeration.overriding_change?(activity, parent_activity)
project_activity = self.time_entry_activities.create(activity)
if project_activity.new_record?
raise ActiveRecord::Rollback, "Overridding TimeEntryActivity was not successfully saved"
raise ActiveRecord::Rollback, "Overriding TimeEntryActivity was not successfully saved"
else
self.time_entries.update_all("activity_id = #{project_activity.id}", ["activity_id = ?", parent_activity.id])
self.time_entries.
where(["activity_id = ?", parent_activity.id]).
update_all("activity_id = #{project_activity.id}")
end
end
end
@ -422,6 +421,7 @@ class Project < ActiveRecord::Base
transaction do
update_all "lft = NULL, rgt = NULL"
rebuild!(false)
all.each { |p| p.set_or_update_position_under(p.parent) }
end
end
@ -440,7 +440,7 @@ class Project < ActiveRecord::Base
# Closes open and locked project versions that are completed
def close_completed_versions
Version.transaction do
versions.where(:status => %w(open locked)).all.each do |version|
versions.where(:status => %w(open locked)).each do |version|
if version.completed?
version.update_attribute(:status, 'closed')
end
@ -480,7 +480,7 @@ class Project < ActiveRecord::Base
# Returns a hash of project users grouped by role
def users_by_role
members.includes(:user, :roles).all.inject({}) do |h, m|
members.includes(:user, :roles).inject({}) do |h, m|
m.roles.each do |r|
h[r] ||= []
h[r] << m.user
@ -502,7 +502,7 @@ class Project < ActiveRecord::Base
assignable.select {|m| m.roles.detect {|role| role.assignable?}}.collect {|m| m.principal}.sort
end
# Returns the mail adresses of users that should be always notified on project events
# Returns the mail addresses of users that should be always notified on project events
def recipients
notified_users.collect {|user| user.mail}
end
@ -514,7 +514,7 @@ class Project < ActiveRecord::Base
end
# Returns a scope of all custom fields enabled for project issues
# (explictly associated custom fields and custom fields enabled for all projects)
# (explicitly associated custom fields and custom fields enabled for all projects)
def all_issue_custom_fields
@all_issue_custom_fields ||= IssueCustomField.
sorted.
@ -622,9 +622,16 @@ class Project < ActiveRecord::Base
end
end
def module_enabled?(module_name)
module_name = module_name.to_s
enabled_modules.detect {|m| m.name == module_name}
# Return the enabled module with the given name
# or nil if the module is not enabled for the project
def enabled_module(name)
name = name.to_s
enabled_modules.detect {|m| m.name == name}
end
# Return true if the module with the given name is enabled
def module_enabled?(name)
enabled_module(name).present?
end
def enabled_module_names=(module_names)
@ -840,7 +847,7 @@ class Project < ActiveRecord::Base
# Copies issues from +project+
def copy_issues(project)
# Stores the source issue id as a key and the copied issues as the
# value. Used to map the two togeather for issue relations.
# value. Used to map the two together for issue relations.
issues_map = {}
# Store status and reopen locked/closed versions
@ -851,7 +858,7 @@ class Project < ActiveRecord::Base
# Get issues sorted by root_id, lft so that parent issues
# get copied before their children
project.issues.reorder('root_id, lft').all.each do |issue|
project.issues.reorder('root_id, lft').each do |issue|
new_issue = Issue.new
new_issue.copy_from(issue, :subtasks => false, :link => false)
new_issue.project = self
@ -995,15 +1002,15 @@ class Project < ActiveRecord::Base
# Returns the systemwide active activities merged with the project specific overrides
def system_activities_and_project_overrides(include_inactive=false)
if include_inactive
return TimeEntryActivity.shared.
where("id NOT IN (?)", self.time_entry_activities.collect(&:parent_id)).all +
self.time_entry_activities
else
return TimeEntryActivity.shared.active.
where("id NOT IN (?)", self.time_entry_activities.collect(&:parent_id)).all +
self.time_entry_activities.active
t = TimeEntryActivity.table_name
scope = TimeEntryActivity.where(
"(#{t}.project_id IS NULL AND #{t}.id NOT IN (?)) OR (#{t}.project_id = ?)",
time_entry_activities.map(&:parent_id), id
)
unless include_inactive
scope = scope.active
end
scope
end
# Archives subprojects recursively
@ -1018,6 +1025,8 @@ class Project < ActiveRecord::Base
set_or_update_position_under(parent)
end
public
# Inserts/moves the project so that target's children or root projects stay alphabetically sorted
def set_or_update_position_under(target_parent)
parent_was = parent

View File

@ -57,6 +57,10 @@ class QueryColumn
object.send name
end
def value_object(object)
object.send name
end
def css_classes
name
end
@ -80,10 +84,21 @@ class QueryCustomFieldColumn < QueryColumn
@cf
end
def value(object)
def value_object(object)
if custom_field.visible_by?(object.project, User.current)
cv = object.custom_values.select {|v| v.custom_field_id == @cf.id}.collect {|v| @cf.cast_value(v.value)}
cv.size > 1 ? cv.sort {|a,b| a.to_s <=> b.to_s} : cv.first
cv = object.custom_values.select {|v| v.custom_field_id == @cf.id}
cv.size > 1 ? cv.sort {|a,b| a.value.to_s <=> b.value.to_s} : cv.first
else
nil
end
end
def value(object)
raw = value_object(object)
if raw.is_a?(Array)
raw.map {|r| @cf.cast_value(r.value)}
elsif raw
@cf.cast_value(raw.value)
else
nil
end
@ -105,7 +120,7 @@ class QueryAssociationCustomFieldColumn < QueryCustomFieldColumn
@association = association
end
def value(object)
def value_object(object)
if assoc = object.send(@association)
super(assoc)
end
@ -144,8 +159,8 @@ class Query < ActiveRecord::Base
after_save do |query|
if query.visibility_changed? && query.visibility != VISIBILITY_ROLES
query.roles.clear
end
query.roles.clear
end
end
class_attribute :operators
@ -242,7 +257,9 @@ class Query < ActiveRecord::Base
when :date, :date_past
case operator_for(field)
when "=", ">=", "<=", "><"
add_filter_error(field, :invalid) if values_for(field).detect {|v| v.present? && (!v.match(/^\d{4}-\d{2}-\d{2}$/) || (Date.parse(v) rescue nil).nil?) }
add_filter_error(field, :invalid) if values_for(field).detect {|v|
v.present? && (!v.match(/\A\d{4}-\d{2}-\d{2}(T\d{2}((:)?\d{2}){0,2}(Z|\d{2}:?\d{2})?)?\z/) || parse_date(v).nil?)
}
when ">t-", "<t-", "t-", ">t+", "<t+", "t+", "><t+", "><t-"
add_filter_error(field, :invalid) if values_for(field).detect {|v| v.present? && !v.match(/^\d+$/) }
end
@ -539,7 +556,7 @@ class Query < ActiveRecord::Base
next unless v and !v.empty?
operator = operator_for(field)
# "me" value subsitution
# "me" value substitution
if %w(assigned_to_id author_id user_id watcher_id).include?(field)
if v.delete("me")
if User.current.logged?
@ -587,7 +604,7 @@ class Query < ActiveRecord::Base
db_field = 'value'
filter = @available_filters[field]
return nil unless filter
if filter[:format] == 'user'
if filter[:field].format.target_class && filter[:field].format.target_class <= User
if value.delete('me')
value.push User.current.id.to_s
end
@ -624,7 +641,7 @@ class Query < ActiveRecord::Base
if value.any?
case type_for(field)
when :date, :date_past
sql = date_clause(db_table, db_field, (Date.parse(value.first) rescue nil), (Date.parse(value.first) rescue nil))
sql = date_clause(db_table, db_field, parse_date(value.first), parse_date(value.first))
when :integer
if is_custom_filter
sql = "(#{db_table}.#{db_field} <> '' AND CAST(CASE #{db_table}.#{db_field} WHEN '' THEN '0' ELSE #{db_table}.#{db_field} END AS decimal(30,3)) = #{value.first.to_i})"
@ -659,7 +676,7 @@ class Query < ActiveRecord::Base
sql << " AND #{db_table}.#{db_field} <> ''" if is_custom_filter
when ">="
if [:date, :date_past].include?(type_for(field))
sql = date_clause(db_table, db_field, (Date.parse(value.first) rescue nil), nil)
sql = date_clause(db_table, db_field, parse_date(value.first), nil)
else
if is_custom_filter
sql = "(#{db_table}.#{db_field} <> '' AND CAST(CASE #{db_table}.#{db_field} WHEN '' THEN '0' ELSE #{db_table}.#{db_field} END AS decimal(30,3)) >= #{value.first.to_f})"
@ -669,7 +686,7 @@ class Query < ActiveRecord::Base
end
when "<="
if [:date, :date_past].include?(type_for(field))
sql = date_clause(db_table, db_field, nil, (Date.parse(value.first) rescue nil))
sql = date_clause(db_table, db_field, nil, parse_date(value.first))
else
if is_custom_filter
sql = "(#{db_table}.#{db_field} <> '' AND CAST(CASE #{db_table}.#{db_field} WHEN '' THEN '0' ELSE #{db_table}.#{db_field} END AS decimal(30,3)) <= #{value.first.to_f})"
@ -679,7 +696,7 @@ class Query < ActiveRecord::Base
end
when "><"
if [:date, :date_past].include?(type_for(field))
sql = date_clause(db_table, db_field, (Date.parse(value[0]) rescue nil), (Date.parse(value[1]) rescue nil))
sql = date_clause(db_table, db_field, parse_date(value[0]), parse_date(value[1]))
else
if is_custom_filter
sql = "(#{db_table}.#{db_field} <> '' AND CAST(CASE #{db_table}.#{db_field} WHEN '' THEN '0' ELSE #{db_table}.#{db_field} END AS decimal(30,3)) BETWEEN #{value[0].to_f} AND #{value[1].to_f})"
@ -764,29 +781,13 @@ class Query < ActiveRecord::Base
# Adds a filter for the given custom field
def add_custom_field_filter(field, assoc=nil)
case field.field_format
when "text"
options = { :type => :text }
when "list"
options = { :type => :list_optional, :values => field.possible_values }
when "date"
options = { :type => :date }
when "bool"
options = { :type => :list, :values => [[l(:general_text_yes), "1"], [l(:general_text_no), "0"]] }
when "int"
options = { :type => :integer }
when "float"
options = { :type => :float }
when "user", "version"
return unless project
values = field.possible_values_options(project)
if User.current.logged? && field.field_format == 'user'
values.unshift ["<< #{l(:label_me)} >>", "me"]
options = field.format.query_filter_options(field, self)
if field.format.target_class && field.format.target_class <= User
if options[:values].is_a?(Array) && User.current.logged?
options[:values].unshift ["<< #{l(:label_me)} >>", "me"]
end
options = { :type => :list_optional, :values => values }
else
options = { :type => :string }
end
filter_id = "cf_#{field.id}"
filter_name = field.name
if assoc.present?
@ -795,7 +796,6 @@ class Query < ActiveRecord::Base
end
add_available_filter filter_id, options.merge({
:name => filter_name,
:format => field.field_format,
:field => field
})
end
@ -826,19 +826,24 @@ class Query < ActiveRecord::Base
def date_clause(table, field, from, to)
s = []
if from
from_yesterday = from - 1
from_yesterday_time = Time.local(from_yesterday.year, from_yesterday.month, from_yesterday.day)
if self.class.default_timezone == :utc
from_yesterday_time = from_yesterday_time.utc
if from.is_a?(Date)
from = Time.local(from.year, from.month, from.day).yesterday.end_of_day
else
from = from - 1 # second
end
s << ("#{table}.#{field} > '%s'" % [connection.quoted_date(from_yesterday_time.end_of_day)])
if self.class.default_timezone == :utc
from = from.utc
end
s << ("#{table}.#{field} > '%s'" % [connection.quoted_date(from)])
end
if to
to_time = Time.local(to.year, to.month, to.day)
if self.class.default_timezone == :utc
to_time = to_time.utc
if to.is_a?(Date)
to = Time.local(to.year, to.month, to.day).end_of_day
end
s << ("#{table}.#{field} <= '%s'" % [connection.quoted_date(to_time.end_of_day)])
if self.class.default_timezone == :utc
to = to.utc
end
s << ("#{table}.#{field} <= '%s'" % [connection.quoted_date(to)])
end
s.join(' AND ')
end
@ -848,6 +853,15 @@ class Query < ActiveRecord::Base
date_clause(table, field, (days_from ? Date.today + days_from : nil), (days_to ? Date.today + days_to : nil))
end
# Returns a Date or Time from the given filter value
def parse_date(arg)
if arg.to_s =~ /\A\d{4}-\d{2}-\d{2}T/
Time.parse(arg) rescue nil
else
Date.parse(arg) rescue nil
end
end
# Additional joins required for the given sort options
def joins_for_order_statement(order_options)
joins = []

View File

@ -40,7 +40,7 @@ class Repository < ActiveRecord::Base
validates_length_of :identifier, :maximum => IDENTIFIER_MAX_LENGTH, :allow_blank => true
validates_presence_of :identifier, :unless => Proc.new { |r| r.is_default? || r.set_as_default? }
validates_uniqueness_of :identifier, :scope => :project_id, :allow_blank => true
validates_exclusion_of :identifier, :in => %w(show entry raw changes annotate diff show stats graph)
validates_exclusion_of :identifier, :in => %w(browse show entry raw changes annotate diff statistics graph revisions revision)
# donwcase letters, digits, dashes, underscores but not digits only
validates_format_of :identifier, :with => /\A(?!\d+$)[a-z0-9\-_]*\z/, :allow_blank => true
# Checks if the SCM is enabled when creating a repository
@ -194,8 +194,13 @@ class Repository < ActiveRecord::Base
scm.entry(path, identifier)
end
def scm_entries(path=nil, identifier=nil)
scm.entries(path, identifier)
end
protected :scm_entries
def entries(path=nil, identifier=nil)
entries = scm.entries(path, identifier)
entries = scm_entries(path, identifier)
load_entries_changesets(entries)
entries
end
@ -287,9 +292,8 @@ class Repository < ActiveRecord::Base
new_user_id = h[committer]
if new_user_id && (new_user_id.to_i != user_id.to_i)
new_user_id = (new_user_id.to_i > 0 ? new_user_id.to_i : nil)
Changeset.update_all(
"user_id = #{ new_user_id.nil? ? 'NULL' : new_user_id }",
["repository_id = ? AND committer = ?", id, committer])
Changeset.where(["repository_id = ? AND committer = ?", id, committer]).
update_all("user_id = #{new_user_id.nil? ? 'NULL' : new_user_id}")
end
end
@committers = nil
@ -408,7 +412,7 @@ class Repository < ActiveRecord::Base
self.is_default = true
end
if is_default? && is_default_changed?
Repository.update_all(["is_default = ?", false], ["project_id = ?", project_id])
Repository.where(["project_id = ?", project_id]).update_all(["is_default = ?", false])
end
end

View File

@ -57,7 +57,7 @@ class Repository::Bazaar < Repository
scm.diff(path, rev, rev_to)
end
def entries(path=nil, identifier=nil)
def scm_entries(path=nil, identifier=nil)
scm.bzr_path_encodig = log_encoding
entries = scm.entries(path, identifier)
if entries
@ -80,9 +80,9 @@ class Repository::Bazaar < Repository
end
end
end
load_entries_changesets(entries)
entries
end
protected :scm_entries
def fetch_changesets
scm.bzr_path_encodig = log_encoding

View File

@ -47,7 +47,7 @@ class Repository::Cvs < Repository
scm.entry(path, rev.nil? ? nil : rev.committed_on)
end
def entries(path=nil, identifier=nil)
def scm_entries(path=nil, identifier=nil)
rev = nil
if ! identifier.nil?
rev = changesets.find_by_revision(identifier)
@ -69,9 +69,9 @@ class Repository::Cvs < Repository
end
end
end
load_entries_changesets(entries)
entries
end
protected :scm_entries
def cat(path, identifier=nil)
rev = nil
@ -138,9 +138,9 @@ class Repository::Cvs < Repository
# is not exclusive at all.
tmp_time = revision.time.clone
unless filechanges.find_by_path_and_revision(
scm.with_leading_slash(revision.paths[0][:path]),
revision.paths[0][:revision]
)
scm.with_leading_slash(revision.paths[0][:path]),
revision.paths[0][:revision]
)
cmt = Changeset.normalize_comments(revision.message, repo_log_encoding)
author_utf8 = Changeset.to_utf8(revision.author, repo_log_encoding)
cs = changesets.where(
@ -150,7 +150,7 @@ class Repository::Cvs < Repository
).first
# create a new changeset....
unless cs
# we use a temporaray revision number here (just for inserting)
# we use a temporary revision number here (just for inserting)
# later on, we calculate a continous positive number
tmp_time2 = tmp_time.clone.gmtime
branch = revision.paths[0][:branch]
@ -186,7 +186,7 @@ class Repository::Cvs < Repository
order('committed_on ASC, id ASC').
where("repository_id = ? AND revision LIKE 'tmp%'", id).
each do |changeset|
changeset.update_attribute :revision, next_revision_number
changeset.update_attribute :revision, next_revision_number
end
end # transaction
@current_revision_number = nil

View File

@ -45,7 +45,7 @@ class Repository::Darcs < Repository
scm.entry(path, patch.nil? ? nil : patch.scmid)
end
def entries(path=nil, identifier=nil)
def scm_entries(path=nil, identifier=nil)
patch = nil
if ! identifier.nil?
patch = changesets.find_by_revision(identifier)
@ -66,9 +66,9 @@ class Repository::Darcs < Repository
end
end
end
load_entries_changesets(entries)
entries
end
protected :scm_entries
def cat(path, identifier=nil)
patch = identifier.nil? ? nil : changesets.find_by_revision(identifier.to_s)

View File

@ -93,11 +93,10 @@ class Repository::Git < Repository
end
end
def entries(path=nil, identifier=nil)
entries = scm.entries(path, identifier, :report_last_commit => extra_report_last_commit)
load_entries_changesets(entries)
entries
def scm_entries(path=nil, identifier=nil)
scm.entries(path, identifier, :report_last_commit => extra_report_last_commit)
end
protected :scm_entries
# With SCMs that have a sequential commit numbering,
# such as Subversion and Mercurial,
@ -180,10 +179,13 @@ class Repository::Git < Repository
# So, Redmine needs to scan revisions and database every time.
#
# This is replacing the one-after-one queries.
# Find all revisions, that are in the database, and then remove them from the revision array.
# Find all revisions, that are in the database, and then remove them
# from the revision array.
# Then later we won't need any conditions for db existence.
# Query for several revisions at once, and remove them from the revisions array, if they are there.
# Do this in chunks, to avoid eventual memory problems (in case of tens of thousands of commits).
# Query for several revisions at once, and remove them
# from the revisions array, if they are there.
# Do this in chunks, to avoid eventual memory problems
# (in case of tens of thousands of commits).
# If there are no revisions (because the original code's algorithm filtered them),
# then this part will be stepped over.
# We make queries, just if there is any revision.
@ -192,13 +194,12 @@ class Repository::Git < Repository
revisions_copy = revisions.clone # revisions will change
while offset < revisions_copy.size
scmids = revisions_copy.slice(offset, limit).map{|x| x.scmid}
recent_changesets_slice = changesets.where(:scmid => scmids).all
recent_changesets_slice = changesets.where(:scmid => scmids)
# Subtract revisions that redmine already knows about
recent_revisions = recent_changesets_slice.map{|c| c.scmid}
revisions.reject!{|r| recent_revisions.include?(r.scmid)}
offset += limit
end
revisions.each do |rev|
transaction do
# There is no search in the db for this revision, because above we ensured,
@ -240,7 +241,6 @@ class Repository::Git < Repository
def latest_changesets(path,rev,limit=10)
revisions = scm.revisions(path, nil, rev, :limit => limit, :all => false)
return [] if revisions.nil? || revisions.empty?
changesets.where(:scmid => revisions.map {|c| c.scmid}).all
end

View File

@ -59,7 +59,7 @@ class Repository::Mercurial < Repository
# Returns the readable identifier for the given mercurial changeset
def self.format_changeset_identifier(changeset)
"#{changeset.revision}:#{changeset.scmid}"
"#{changeset.revision}:#{changeset.scmid[0, 12]}"
end
# Returns the identifier for the given Mercurial changeset
@ -71,6 +71,28 @@ class Repository::Mercurial < Repository
super(cs, cs_to, ' ')
end
def modify_entry_lastrev_identifier(entry)
if entry.lastrev && entry.lastrev.identifier
entry.lastrev.identifier = scmid_for_inserting_db(entry.lastrev.identifier)
end
end
private :modify_entry_lastrev_identifier
def entry(path=nil, identifier=nil)
entry = scm.entry(path, identifier)
return nil if entry.nil?
modify_entry_lastrev_identifier(entry)
entry
end
def scm_entries(path=nil, identifier=nil)
entries = scm.entries(path, identifier)
return nil if entries.nil?
entries.each {|entry| modify_entry_lastrev_identifier(entry)}
entries
end
protected :scm_entries
# Finds and returns a revision with a number or the beginning of a hash
def find_changeset_by_name(name)
return nil if name.blank?
@ -100,6 +122,28 @@ class Repository::Mercurial < Repository
all
end
def is_short_id_in_db?
return @is_short_id_in_db unless @is_short_id_in_db.nil?
cs = changesets.first
@is_short_id_in_db = (!cs.nil? && cs.scmid.length != 40)
end
private :is_short_id_in_db?
def scmid_for_inserting_db(scmid)
is_short_id_in_db? ? scmid[0, 12] : scmid
end
def nodes_in_branch(rev, branch_limit)
scm.nodes_in_branch(rev, :limit => branch_limit).collect do |b|
scmid_for_inserting_db(b)
end
end
def tag_scmid(rev)
scmid = scm.tagmap[rev]
scmid.nil? ? nil : scmid_for_inserting_db(scmid)
end
def latest_changesets_cond(path, rev, limit)
cond, args = [], []
if scm.branchmap.member? rev
@ -111,11 +155,11 @@ class Repository::Mercurial < Repository
# Revisions in root directory and sub directory are not equal.
# So, in order to get correct limit, we need to get all revisions.
# But, it is very heavy.
# Mercurial does not treat direcotry.
# Mercurial does not treat directory.
# So, "hg log DIR" is very heavy.
branch_limit = path.blank? ? limit : ( limit * 5 )
args << scm.nodes_in_branch(rev, :limit => branch_limit)
elsif last = rev ? find_changeset_by_name(scm.tagmap[rev] || rev) : nil
args << nodes_in_branch(rev, branch_limit)
elsif last = rev ? find_changeset_by_name(tag_scmid(rev) || rev) : nil
cond << "#{Changeset.table_name}.id <= ?"
args << last.id
end
@ -141,16 +185,23 @@ class Repository::Mercurial < Repository
(db_rev + 1).step(scm_rev, FETCH_AT_ONCE) do |i|
scm.each_revision('', i, [i + FETCH_AT_ONCE - 1, scm_rev].min) do |re|
transaction do
parents = (re.parents || []).collect{|rp| find_changeset_by_name(rp)}.compact
parents = (re.parents || []).collect do |rp|
find_changeset_by_name(scmid_for_inserting_db(rp))
end.compact
cs = Changeset.create(:repository => self,
:revision => re.revision,
:scmid => re.scmid,
:scmid => scmid_for_inserting_db(re.scmid),
:committer => re.author,
:committed_on => re.time,
:comments => re.message,
:parents => parents)
unless cs.new_record?
re.paths.each { |e| cs.create_change(e) }
re.paths.each do |e|
if from_revision = e[:from_revision]
e[:from_revision] = scmid_for_inserting_db(from_revision)
end
cs.create_change(e)
end
end
end
end

View File

@ -90,12 +90,13 @@ class Repository::Subversion < Repository
def load_entries_changesets(entries)
return unless entries
entries_with_identifier = entries.select {|entry| entry.lastrev && entry.lastrev.identifier.present?}
entries_with_identifier =
entries.select {|entry| entry.lastrev && entry.lastrev.identifier.present?}
identifiers = entries_with_identifier.map {|entry| entry.lastrev.identifier}.compact.uniq
if identifiers.any?
changesets_by_identifier = changesets.where(:revision => identifiers).includes(:user, :repository).all.group_by(&:revision)
changesets_by_identifier =
changesets.where(:revision => identifiers).
includes(:user, :repository).group_by(&:revision)
entries_with_identifier.each do |entry|
if m = changesets_by_identifier[entry.lastrev.identifier]
entry.changeset = m.first

View File

@ -83,7 +83,9 @@ class Setting < ActiveRecord::Base
validates_uniqueness_of :name
validates_inclusion_of :name, :in => @@available_settings.keys
validates_numericality_of :value, :only_integer => true, :if => Proc.new { |setting| @@available_settings[setting.name]['format'] == 'int' }
validates_numericality_of :value, :only_integer => true, :if => Proc.new { |setting|
(s = @@available_settings[setting.name]) && s['format'] == 'int'
}
# Hash used to cache setting values
@cached_settings = {}
@ -240,9 +242,10 @@ private
def self.find_or_default(name)
name = name.to_s
raise "There's no setting named #{name}" unless @@available_settings.has_key?(name)
setting = find_by_name(name)
setting = where(:name => name).first
unless setting
setting = new(:name => name)
setting = new
setting.name = name
setting.value = @@available_settings[name]['default']
end
setting

View File

@ -77,6 +77,16 @@ class TimeEntry < ActiveRecord::Base
end
end
def safe_attributes=(attrs, user=User.current)
attrs = super
if !new_record? && issue && issue.project_id != project_id
if user.allowed_to?(:log_time, issue.project)
self.project_id = issue.project_id
end
end
attrs
end
def set_project_if_nil
self.project = issue.project if issue && project.nil?
end

View File

@ -91,8 +91,10 @@ class TimeEntryQuery < Query
def available_columns
return @available_columns if @available_columns
@available_columns = self.class.available_columns.dup
@available_columns += TimeEntryCustomField.visible.all.map {|cf| QueryCustomFieldColumn.new(cf) }
@available_columns += IssueCustomField.visible.all.map {|cf| QueryAssociationCustomFieldColumn.new(:issue, cf) }
@available_columns += TimeEntryCustomField.visible.
map {|cf| QueryCustomFieldColumn.new(cf) }
@available_columns += IssueCustomField.visible.
map {|cf| QueryAssociationCustomFieldColumn.new(:issue, cf) }
@available_columns
end

View File

@ -63,8 +63,7 @@ class Tracker < ActiveRecord::Base
connection.select_rows("SELECT DISTINCT old_status_id, new_status_id FROM #{WorkflowTransition.table_name} WHERE tracker_id = #{id} AND type = 'WorkflowTransition'").
flatten.
uniq
@issue_statuses = IssueStatus.find_all_by_id(ids).sort
@issue_statuses = IssueStatus.where(:id => ids).all.sort
end
def disabled_core_fields

View File

@ -32,6 +32,11 @@ class User < Principal
:order => %w(firstname lastname id),
:setting_order => 2
},
:firstinitial_lastname => {
:string => '#{firstname.to_s.gsub(/(([[:alpha:]])[[:alpha:]]*\.?)/, \'\2.\')} #{lastname}',
:order => %w(firstname lastname id),
:setting_order => 2
},
:firstname => {
:string => '#{firstname}',
:order => %w(firstname id),
@ -68,8 +73,10 @@ class User < Principal
['none', :label_user_mail_option_none]
]
has_and_belongs_to_many :groups, :after_add => Proc.new {|user, group| group.user_added(user)},
:after_remove => Proc.new {|user, group| group.user_removed(user)}
has_and_belongs_to_many :groups,
:join_table => "#{table_name_prefix}groups_users#{table_name_suffix}",
:after_add => Proc.new {|user, group| group.user_added(user)},
:after_remove => Proc.new {|user, group| group.user_removed(user)}
has_many :changesets, :dependent => :nullify
has_one :preference, :dependent => :destroy, :class_name => 'UserPreference'
has_one :rss_token, :class_name => 'Token', :conditions => "action='feeds'"
@ -307,6 +314,18 @@ class User < Principal
@time_zone ||= (self.pref.time_zone.blank? ? nil : ActiveSupport::TimeZone[self.pref.time_zone])
end
def force_default_language?
Setting.force_default_language_for_loggedin?
end
def language
if force_default_language?
Setting.default_language
else
super
end
end
def wants_comments_in_reverse_order?
self.pref[:comments_sorting] == 'desc'
end
@ -365,10 +384,10 @@ class User < Principal
# Find a user account by matching the exact login and then a case-insensitive
# version. Exact matches will be given priority.
def self.find_by_login(login)
login = Redmine::CodesetUtil.replace_invalid_utf8(login.to_s)
if login.present?
login = login.to_s
# First look for an exact match
user = where(:login => login).all.detect {|u| u.login == login}
user = where(:login => login).detect {|u| u.login == login}
unless user
# Fail over to case-insensitive if none was found
user = where("LOWER(login) = ?", login.downcase).first
@ -607,11 +626,11 @@ class User < Principal
end
def self.current=(user)
Thread.current[:current_user] = user
RequestStore.store[:current_user] = user
end
def self.current
Thread.current[:current_user] ||= User.anonymous
RequestStore.store[:current_user] ||= User.anonymous
end
# Returns the anonymous user. If the anonymous user does not exist, it is created. There can be only
@ -664,23 +683,27 @@ class User < Principal
return if self.id.nil?
substitute = User.anonymous
Attachment.update_all ['author_id = ?', substitute.id], ['author_id = ?', id]
Comment.update_all ['author_id = ?', substitute.id], ['author_id = ?', id]
Issue.update_all ['author_id = ?', substitute.id], ['author_id = ?', id]
Issue.update_all 'assigned_to_id = NULL', ['assigned_to_id = ?', id]
Journal.update_all ['user_id = ?', substitute.id], ['user_id = ?', id]
JournalDetail.update_all ['old_value = ?', substitute.id.to_s], ["property = 'attr' AND prop_key = 'assigned_to_id' AND old_value = ?", id.to_s]
JournalDetail.update_all ['value = ?', substitute.id.to_s], ["property = 'attr' AND prop_key = 'assigned_to_id' AND value = ?", id.to_s]
Message.update_all ['author_id = ?', substitute.id], ['author_id = ?', id]
News.update_all ['author_id = ?', substitute.id], ['author_id = ?', id]
Attachment.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id])
Comment.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id])
Issue.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id])
Issue.where(['assigned_to_id = ?', id]).update_all('assigned_to_id = NULL')
Journal.where(['user_id = ?', id]).update_all(['user_id = ?', substitute.id])
JournalDetail.
where(["property = 'attr' AND prop_key = 'assigned_to_id' AND old_value = ?", id.to_s]).
update_all(['old_value = ?', substitute.id.to_s])
JournalDetail.
where(["property = 'attr' AND prop_key = 'assigned_to_id' AND value = ?", id.to_s]).
update_all(['value = ?', substitute.id.to_s])
Message.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id])
News.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id])
# Remove private queries and keep public ones
::Query.delete_all ['user_id = ? AND visibility = ?', id, ::Query::VISIBILITY_PRIVATE]
::Query.update_all ['user_id = ?', substitute.id], ['user_id = ?', id]
TimeEntry.update_all ['user_id = ?', substitute.id], ['user_id = ?', id]
::Query.where(['user_id = ?', id]).update_all(['user_id = ?', substitute.id])
TimeEntry.where(['user_id = ?', id]).update_all(['user_id = ?', substitute.id])
Token.delete_all ['user_id = ?', id]
Watcher.delete_all ['user_id = ?', id]
WikiContent.update_all ['author_id = ?', substitute.id], ['author_id = ?', id]
WikiContent::Version.update_all ['author_id = ?', substitute.id], ['author_id = ?', id]
WikiContent.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id])
WikiContent::Version.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id])
end
# Return password digest

View File

@ -203,7 +203,7 @@ class Version < ActiveRecord::Base
["(CASE WHEN #{table}.effective_date IS NULL THEN 1 ELSE 0 END)", "#{table}.effective_date", "#{table}.name", "#{table}.id"]
end
scope :sorted, order(fields_for_order_statement)
scope :sorted, lambda { order(fields_for_order_statement) }
# Returns the sharings that +user+ can set the version to
def allowed_sharings(user = User.current)
@ -232,7 +232,7 @@ class Version < ActiveRecord::Base
unless @issue_count
@open_issues_count = 0
@closed_issues_count = 0
fixed_issues.count(:all, :group => :status).each do |status, count|
fixed_issues.group(:status).count.each do |status, count|
if status.is_closed?
@closed_issues_count += count
else
@ -256,7 +256,7 @@ class Version < ActiveRecord::Base
# Returns the average estimated time of assigned issues
# or 1 if no issue has an estimated time
# Used to weigth unestimated issues in progress calculation
# Used to weight unestimated issues in progress calculation
def estimated_average
if @estimated_average.nil?
average = fixed_issues.average(:estimated_hours).to_f

View File

@ -42,7 +42,7 @@ class Watcher < ActiveRecord::Base
prune_single_user(options[:user], options)
else
pruned = 0
User.where("id IN (SELECT DISTINCT user_id FROM #{table_name})").all.each do |user|
User.where("id IN (SELECT DISTINCT user_id FROM #{table_name})").each do |user|
pruned += prune_single_user(user, options)
end
pruned
@ -60,13 +60,14 @@ class Watcher < ActiveRecord::Base
def self.prune_single_user(user, options={})
return unless user.is_a?(User)
pruned = 0
where(:user_id => user.id).all.each do |watcher|
where(:user_id => user.id).each do |watcher|
next if watcher.watchable.nil?
if options.has_key?(:project)
next unless watcher.watchable.respond_to?(:project) && watcher.watchable.project == options[:project]
unless watcher.watchable.respond_to?(:project) &&
watcher.watchable.project == options[:project]
next
end
end
if watcher.watchable.respond_to?(:visible?)
unless watcher.watchable.visible?(user)
watcher.destroy

View File

@ -40,7 +40,7 @@ class WikiContent < ActiveRecord::Base
page.nil? ? [] : page.attachments
end
# Returns the mail adresses of users that should be notified
# Returns the mail addresses of users that should be notified
def recipients
notified = project.notified_users
notified.reject! {|user| !visible?(user)}

View File

@ -82,12 +82,12 @@ class WikiPage < ActiveRecord::Base
# Manage redirects if the title has changed
if !@previous_title.blank? && (@previous_title != title) && !new_record?
# Update redirects that point to the old title
wiki.redirects.find_all_by_redirects_to(@previous_title).each do |r|
wiki.redirects.where(:redirects_to => @previous_title).each do |r|
r.redirects_to = title
r.title == r.redirects_to ? r.destroy : r.save
end
# Remove redirects for the new title
wiki.redirects.find_all_by_title(title).each(&:destroy)
wiki.redirects.where(:title => title).each(&:destroy)
# Create a redirect to the new title
wiki.redirects << WikiRedirect.new(:title => @previous_title, :redirects_to => title) unless redirect_existing_links == "0"
@previous_title = nil
@ -96,7 +96,7 @@ class WikiPage < ActiveRecord::Base
def remove_redirects
# Remove redirects to this page
wiki.redirects.find_all_by_redirects_to(title).each(&:destroy)
wiki.redirects.where(:redirects_to => title).each(&:destroy)
end
def pretty_title
@ -104,9 +104,11 @@ class WikiPage < ActiveRecord::Base
end
def content_for_version(version=nil)
result = content.versions.find_by_version(version.to_i) if version
result ||= content
result
if content
result = content.versions.find_by_version(version.to_i) if version
result ||= content
result
end
end
def diff(version_to=nil, version_from=nil)

View File

@ -19,20 +19,43 @@ class WorkflowPermission < WorkflowRule
validates_inclusion_of :rule, :in => %w(readonly required)
validate :validate_field_name
# Replaces the workflow permissions for the given tracker and role
# Returns the workflow permissions for the given trackers and roles
# grouped by status_id
#
# Example:
# WorkflowPermission.replace_permissions role, tracker, {'due_date' => {'1' => 'readonly', '2' => 'required'}}
def self.replace_permissions(tracker, role, permissions)
destroy_all(:tracker_id => tracker.id, :role_id => role.id)
# WorkflowPermission.rules_by_status_id trackers, roles
# # => {1 => {'start_date' => 'required', 'due_date' => 'readonly'}}
def self.rules_by_status_id(trackers, roles)
WorkflowPermission.where(:tracker_id => trackers.map(&:id), :role_id => roles.map(&:id)).inject({}) do |h, w|
h[w.old_status_id] ||= {}
h[w.old_status_id][w.field_name] ||= []
h[w.old_status_id][w.field_name] << w.rule
h
end
end
permissions.each { |field, rule_by_status_id|
rule_by_status_id.each { |status_id, rule|
if rule.present?
WorkflowPermission.create(:role_id => role.id, :tracker_id => tracker.id, :old_status_id => status_id, :field_name => field, :rule => rule)
end
# Replaces the workflow permissions for the given trackers and roles
#
# Example:
# WorkflowPermission.replace_permissions trackers, roles, {'1' => {'start_date' => 'required', 'due_date' => 'readonly'}}
def self.replace_permissions(trackers, roles, permissions)
trackers = Array.wrap trackers
roles = Array.wrap roles
transaction do
permissions.each { |status_id, rule_by_field|
rule_by_field.each { |field, rule|
destroy_all(:tracker_id => trackers.map(&:id), :role_id => roles.map(&:id), :old_status_id => status_id, :field_name => field)
if rule.present?
trackers.each do |tracker|
roles.each do |role|
WorkflowPermission.create(:role_id => role.id, :tracker_id => tracker.id, :old_status_id => status_id, :field_name => field, :rule => rule)
end
end
end
}
}
}
end
end
protected

View File

@ -21,9 +21,8 @@ class WorkflowTransition < WorkflowRule
# Returns workflow transitions count by tracker and role
def self.count_by_tracker_and_role
counts = connection.select_all("SELECT role_id, tracker_id, count(id) AS c FROM #{table_name} WHERE type = 'WorkflowTransition' GROUP BY role_id, tracker_id")
roles = Role.sorted.all
trackers = Tracker.sorted.all
roles = Role.sorted
trackers = Tracker.sorted
result = []
trackers.each do |tracker|
t = []
@ -33,7 +32,71 @@ class WorkflowTransition < WorkflowRule
end
result << [tracker, t]
end
result
end
def self.replace_transitions(trackers, roles, transitions)
trackers = Array.wrap trackers
roles = Array.wrap roles
transaction do
records = WorkflowTransition.where(:tracker_id => trackers.map(&:id), :role_id => roles.map(&:id)).all
transitions.each do |old_status_id, transitions_by_new_status|
transitions_by_new_status.each do |new_status_id, transition_by_rule|
transition_by_rule.each do |rule, transition|
trackers.each do |tracker|
roles.each do |role|
w = records.select {|r|
r.old_status_id == old_status_id.to_i &&
r.new_status_id == new_status_id.to_i &&
r.tracker_id == tracker.id &&
r.role_id == role.id &&
!r.destroyed?
}
if rule == 'always'
w = w.select {|r| !r.author && !r.assignee}
else
w = w.select {|r| r.author || r.assignee}
end
if w.size > 1
w[1..-1].each(&:destroy)
end
w = w.first
if transition == "1" || transition == true
unless w
w = WorkflowTransition.new(:old_status_id => old_status_id, :new_status_id => new_status_id, :tracker_id => tracker.id, :role_id => role.id)
records << w
end
w.author = true if rule == "author"
w.assignee = true if rule == "assignee"
w.save if w.changed?
elsif w
if rule == 'always'
w.destroy
elsif rule == 'author'
if w.assignee
w.author = false
w.save if w.changed?
else
w.destroy
end
elsif rule == 'assignee'
if w.author
w.assignee = false
w.save if w.changed?
else
w.destroy
end
end
end
end
end
end
end
end
end
end
end

View File

@ -16,7 +16,10 @@
<p><%= f.text_field :firstname, :required => true %></p>
<p><%= f.text_field :lastname, :required => true %></p>
<p><%= f.text_field :mail, :required => true %></p>
<% unless @user.force_default_language? %>
<p><%= f.select :language, lang_options_for_select %></p>
<% end %>
<% if Setting.openid? %>
<p><%= f.text_field :identity_url %></p>

View File

@ -9,11 +9,55 @@
<%= content_tag('span', link_to(h(plugin.url), plugin.url), :class => 'url') unless plugin.url.blank? %>
</td>
<td class="author"><%= plugin.author_url.blank? ? h(plugin.author) : link_to(h(plugin.author), plugin.author_url) %></td>
<td class="version"><%=h plugin.version %></td>
<td class="version"><span class="icon"><%= plugin.version %></span></td>
<td class="configure"><%= link_to(l(:button_configure), plugin_settings_path(plugin)) if plugin.configurable? %></td>
</tr>
<% end %>
</table>
<p><a href="#" id="check-for-updates"><%= l(:label_check_for_updates) %></a></p>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>
<%= javascript_tag do %>
$(document).ready(function(){
$("#check-for-updates").click(function(e){
e.preventDefault();
$.ajax({
dataType: "jsonp",
url: "http://www.redmine.org/plugins/check_updates",
data: <%= raw_json plugin_data_for_updates(@plugins) %>,
timeout: 3000,
beforeSend: function(){
$('#ajax-indicator').show();
},
success: function(data){
$('#ajax-indicator').hide();
$("table.plugins td.version span").addClass("unknown");
$.each(data, function(plugin_id, plugin_data){
var s = $("tr#plugin-"+plugin_id+" td.version span");
s.removeClass("icon-checked icon-warning unknown");
if (plugin_data.url) {
if (s.parent("a").length>0) {
s.unwrap();
}
s.addClass("found");
s.wrap($("<a></a>").attr("href", plugin_data.url).attr("target", "_blank"));
}
if (plugin_data.c == s.text()) {
s.addClass("icon-checked");
} else if (plugin_data.c) {
s.addClass("icon-warning");
s.attr("title", "<%= escape_javascript l(:label_latest_compatible_version) %>: "+plugin_data.c);
}
});
$("table.plugins td.version span.unknown").addClass("icon-help").attr("title", "<%= escape_javascript l(:label_unknown_plugin) %>");
},
error: function(){
$('#ajax-indicator').hide();
alert("Unable to retrieve plugin informations from www.redmine.org");
}
});
});
});
<% end if @plugins.any? %>

View File

@ -1,6 +1,6 @@
<%= raw @issues.map {|issue| {
'id' => issue.id,
'label' => "#{issue.tracker} ##{issue.id}: #{truncate issue.subject.to_s, :length => 60}",
'label' => "#{issue.tracker} ##{issue.id}: #{issue.subject.to_s.truncate(60)}",
'value' => issue.id
}
}.to_json

View File

@ -1,5 +1,3 @@
<% selected_tab = params[:tab] ? params[:tab].to_s : tabs.first[:name] %>
<div class="tabs">
<ul>
<% tabs.each do |tab| -%>
@ -10,8 +8,8 @@
<% end -%>
</ul>
<div class="tabs-buttons" style="display:none;">
<button class="tab-left" onclick="moveTabLeft(this);"></button>
<button class="tab-right" onclick="moveTabRight(this);"></button>
<button class="tab-left" onclick="moveTabLeft(this); return false;"></button>
<button class="tab-right" onclick="moveTabRight(this); return false;"></button>
</div>
</div>

View File

@ -1,9 +1,10 @@
xml.instruct!
xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
xml.title truncate_single_line(@title, :length => 100)
xml.title truncate_single_line_raw(@title, 100)
xml.link "rel" => "self", "href" => url_for(params.merge(:only_path => false))
xml.link "rel" => "alternate", "href" => url_for(params.merge(:only_path => false, :format => nil, :key => nil))
xml.id url_for(:controller => 'welcome', :only_path => false)
xml.icon favicon_url
xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema)
xml.author { xml.name "#{Setting.app_title}" }
xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_name; }
@ -11,9 +12,9 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom" do
xml.entry do
url = url_for(item.event_url(:only_path => false))
if @project
xml.title truncate_single_line(item.event_title, :length => 100)
xml.title truncate_single_line_raw(item.event_title, 100)
else
xml.title truncate_single_line("#{item.project} - #{item.event_title}", :length => 100)
xml.title truncate_single_line_raw("#{item.project} - #{item.event_title}", 100)
end
xml.link "rel" => "alternate", "href" => url
xml.id url

View File

@ -1,14 +1,12 @@
<%= error_messages_for 'custom_field' %>
<% if @custom_field.is_a?(IssueCustomField) %>
<div class="splitcontentleft">
<% end %>
<div class="box tabular">
<p><%= f.text_field :name, :required => true %></p>
<p><%= f.select :field_format, custom_field_formats_for_select(@custom_field), {}, :disabled => !@custom_field.new_record? %></p>
<p><%= f.text_field :name, :required => true %></p>
<p><%= f.text_area :description, :rows => 7 %></p>
<% if @custom_field.format_in? 'list', 'user', 'version' %>
<% if @custom_field.format.multiple_supported %>
<p>
<%= f.check_box :multiple %>
<% if !@custom_field.new_record? && @custom_field.multiple %>
@ -17,56 +15,38 @@
</p>
<% end %>
<% unless @custom_field.format_in? 'list', 'bool', 'date', 'user', 'version' %>
<p><label for="custom_field_min_length"><%=l(:label_min_max_length)%></label>
<%= f.text_field :min_length, :size => 5, :no_label => true %> -
<%= f.text_field :max_length, :size => 5, :no_label => true %><br />(<%=l(:text_min_max_length_info)%>)</p>
<p><%= f.text_field :regexp, :size => 50 %><br />(<%=l(:text_regexp_info)%>)</p>
<% end %>
<% if @custom_field.format_in? 'list' %>
<p>
<%= f.text_area :possible_values, :value => @custom_field.possible_values.to_a.join("\n"), :rows => 15 %>
<em class="info"><%= l(:text_custom_field_possible_values_info) %></em>
</p>
<% end %>
<% case @custom_field.field_format %>
<% when 'bool' %>
<p><%= f.check_box(:default_value) %></p>
<% when 'text' %>
<p><%= f.text_area(:default_value, :rows => 8) %></p>
<% when 'date' %>
<p><%= f.text_field(:default_value, :size => 10) %></p>
<%= calendar_for('custom_field_default_value') %>
<% when 'user', 'version' %>
<% else %>
<p><%= f.text_field(:default_value) %></p>
<% end %>
<%= render_custom_field_format_partial f, @custom_field %>
<%= call_hook(:view_custom_fields_form_upper_box, :custom_field => @custom_field, :form => f) %>
</div>
<p><%= submit_tag l(:button_save) %></p>
</div>
<div class="splitcontentright">
<div class="box tabular">
<% case @custom_field.class.name
when "IssueCustomField" %>
<p><%= f.check_box :is_required %></p>
<p><%= f.check_box :is_for_all %></p>
<p><%= f.check_box :is_for_all, :data => {:disables => '#custom_field_project_ids input'} %></p>
<p><%= f.check_box :is_filter %></p>
<% if @custom_field.format.searchable_supported %>
<p><%= f.check_box :searchable %></p>
<% end %>
<p>
<label><%= l(:field_visible) %></label>
<label class="block">
<%= radio_button_tag 'custom_field[visible]', 1, @custom_field.visible?, :id => 'custom_field_visible_on' %>
<%= radio_button_tag 'custom_field[visible]', 1, @custom_field.visible?, :id => 'custom_field_visible_on',
:data => {:disables => '.custom_field_role input'} %>
<%= l(:label_visibility_public) %>
</label>
<label class="block">
<%= radio_button_tag 'custom_field[visible]', 0, !@custom_field.visible?, :id => 'custom_field_visible_off' %>
<%= radio_button_tag 'custom_field[visible]', 0, !@custom_field.visible?, :id => 'custom_field_visible_off',
:data => {:enables => '.custom_field_role input'} %>
<%= l(:label_visibility_roles) %>:
</label>
<% Role.givable.sorted.each do |role| %>
<label class="block custom_field_role" style="padding-left:2em;">
<%= check_box_tag 'custom_field[role_ids][]', role.id, @custom_field.roles.include?(role) %>
<%= check_box_tag 'custom_field[role_ids][]', role.id, @custom_field.roles.include?(role), :id => nil %>
<%= role.name %>
</label>
<% end %>
@ -82,7 +62,9 @@ when "IssueCustomField" %>
<% when "ProjectCustomField" %>
<p><%= f.check_box :is_required %></p>
<p><%= f.check_box :visible %></p>
<% if @custom_field.format.searchable_supported %>
<p><%= f.check_box :searchable %></p>
<% end %>
<p><%= f.check_box :is_filter %></p>
<% when "VersionCustomField" %>
@ -103,13 +85,10 @@ when "IssueCustomField" %>
<% end %>
<%= call_hook(:"view_custom_fields_form_#{@custom_field.type.to_s.underscore}", :custom_field => @custom_field, :form => f) %>
</div>
<%= submit_tag l(:button_save) %>
<% if @custom_field.is_a?(IssueCustomField) %>
</div>
<div class="splitcontentright">
<fieldset class="box"><legend><%=l(:label_tracker_plural)%></legend>
<% Tracker.sorted.all.each do |tracker| %>
<fieldset class="box" id="custom_field_tracker_ids"><legend><%=l(:label_tracker_plural)%></legend>
<% Tracker.sorted.each do |tracker| %>
<%= check_box_tag "custom_field[tracker_ids][]",
tracker.id,
(@custom_field.trackers.include? tracker),
@ -119,6 +98,7 @@ when "IssueCustomField" %>
</label>
<% end %>
<%= hidden_field_tag "custom_field[tracker_ids][]", '' %>
<p><%= check_all_links 'custom_field_tracker_ids' %></p>
</fieldset>
<fieldset class="box" id="custom_field_project_ids"><legend><%= l(:label_project_plural) %></legend>
@ -128,20 +108,7 @@ when "IssueCustomField" %>
<%= hidden_field_tag('custom_field[project_ids][]', '', :id => nil) %>
<p><%= check_all_links 'custom_field_project_ids' %></p>
</fieldset>
</div>
<% end %>
</div>
<% include_calendar_headers_tags %>
<%= javascript_tag do %>
function toggleCustomFieldRoles(){
var checked = $("#custom_field_visible_on").is(':checked');
$('.custom_field_role input').attr('disabled', checked);
}
$("#custom_field_visible_on, #custom_field_visible_off").change(toggleCustomFieldRoles);
$(document).ready(toggleCustomFieldRoles);
$("#custom_field_is_for_all").change(function(){
$("#custom_field_project_ids input").attr("disabled", $(this).is(":checked"));
}).trigger('change');
<% end %>

View File

@ -14,7 +14,7 @@
<% (@custom_fields_by_type[tab[:name]] || []).sort.each do |custom_field| -%>
<tr class="<%= cycle("odd", "even") %>">
<td class="name"><%= link_to h(custom_field.name), edit_custom_field_path(custom_field) %></td>
<td><%= l(Redmine::CustomFieldFormat.label_for(custom_field.field_format)) %></td>
<td><%= l(custom_field.format.label) %></td>
<td><%= checked_image custom_field.is_required? %></td>
<% if tab[:name] == 'IssueCustomField' %>
<td><%= checked_image custom_field.is_for_all? %></td>
@ -28,5 +28,3 @@
<% end; reset_cycle %>
</tbody>
</table>
<p><%= link_to l(:label_custom_field_new), new_custom_field_path(:type => tab[:name]), :class => 'icon icon-add' %></p>

View File

@ -0,0 +1,3 @@
<p><%= f.select :default_value, [[]]+@custom_field.possible_values_options %></p>
<p><%= f.text_field :url_pattern, :size => 50, :label => :label_link_values_to %></p>
<p><%= edit_tag_style_tag f %></p>

View File

@ -0,0 +1,3 @@
<p><%= f.text_field(:default_value, :size => 10) %></p>
<%= calendar_for('custom_field_default_value') %>
<p><%= f.text_field :url_pattern, :size => 50, :label => :label_link_values_to %></p>

View File

@ -0,0 +1,3 @@
<%= render :partial => 'custom_fields/formats/regexp', :locals => {:f => f, :custom_field => custom_field} %>
<p><%= f.text_field :url_pattern, :size => 50, :label => :field_url %></p>
<p><%= f.text_field(:default_value) %></p>

View File

@ -0,0 +1,7 @@
<p>
<%= f.text_area :possible_values, :value => @custom_field.possible_values.to_a.join("\n"), :rows => 15 %>
<em class="info"><%= l(:text_custom_field_possible_values_info) %></em>
</p>
<p><%= f.text_field(:default_value) %></p>
<p><%= f.text_field :url_pattern, :size => 50, :label => :label_link_values_to %></p>
<p><%= edit_tag_style_tag f %></p>

View File

@ -0,0 +1,3 @@
<%= render :partial => 'custom_fields/formats/regexp', :locals => {:f => f, :custom_field => custom_field} %>
<p><%= f.text_field(:default_value) %></p>
<p><%= f.text_field :url_pattern, :size => 50, :label => :label_link_values_to %></p>

View File

@ -0,0 +1,9 @@
<p>
<label for="custom_field_min_length"><%=l(:label_min_max_length)%></label>
<%= f.text_field :min_length, :size => 5, :no_label => true %> -
<%= f.text_field :max_length, :size => 5, :no_label => true %>
</p>
<p>
<%= f.text_field :regexp, :size => 50 %>
<em class="info"><%= l(:text_regexp_info) %></em>
</p>

View File

@ -0,0 +1,4 @@
<%= render :partial => 'custom_fields/formats/regexp', :locals => {:f => f, :custom_field => custom_field} %>
<p><%= f.check_box :text_formatting, {:label => :setting_text_formatting, :data => {:disables => '#custom_field_url_pattern'}}, 'full', '' %></p>
<p><%= f.text_field(:default_value) %></p>
<p><%= f.text_field :url_pattern, :size => 50, :label => :label_link_values_to %></p>

View File

@ -0,0 +1,3 @@
<%= render :partial => 'custom_fields/formats/regexp', :locals => {:f => f, :custom_field => custom_field} %>
<p><%= f.check_box :text_formatting, {:label => :setting_text_formatting}, 'full', '' %></p>
<p><%= f.text_area(:default_value, :rows => 5) %></p>

View File

@ -0,0 +1,24 @@
<p>
<label><%= l(:label_role) %></label>
<label class="block">
<%= radio_button_tag 'status', 1, custom_field.user_role.blank?, :id => 'custom_field_user_role_all',
:data => {:disables => '.custom_field_user_role input'} %>
<%= l(:label_all) %>
</label>
<label class="block">
<%= radio_button_tag 'status', 0, custom_field.user_role.present?, :id => 'custom_field_user_role_only',
:data => {:enables => '.custom_field_user_role input'} %>
<%= l(:label_only) %>:
</label>
<% Role.givable.sorted.each do |role| %>
<label class="block custom_field_user_role" style="padding-left:2em;">
<%= check_box_tag 'custom_field[user_role][]',
role.id,
custom_field.user_role.is_a?(Array) && custom_field.user_role.include?(role.id.to_s),
:id => nil %>
<%= role.name %>
</label>
<% end %>
<%= hidden_field_tag 'custom_field[user_role][]', '' %>
</p>
<p><%= edit_tag_style_tag f %></p>

View File

@ -0,0 +1,24 @@
<p>
<label><%= l(:field_status) %></label>
<label class="block">
<%= radio_button_tag 'status', 1, custom_field.version_status.blank?, :id => 'custom_field_version_status_all',
:data => {:disables => '.custom_field_version_status input'} %>
<%= l(:label_all) %>
</label>
<label class="block">
<%= radio_button_tag 'status', 0, custom_field.version_status.present?, :id => 'custom_field_version_status_only',
:data => {:enables => '.custom_field_version_status input'} %>
<%= l(:label_only) %>:
</label>
<% Version::VERSION_STATUSES.each do |status| %>
<label class="block custom_field_version_status" style="padding-left:2em;">
<%= check_box_tag 'custom_field[version_status][]',
status,
custom_field.version_status.is_a?(Array) && custom_field.version_status.include?(status),
:id => nil %>
<%= l("version_status_#{status}") %>
</label>
<% end %>
<%= hidden_field_tag 'custom_field[version_status][]', '' %>
</p>
<p><%= edit_tag_style_tag f %></p>

View File

@ -6,8 +6,8 @@ api.array :custom_fields do
api.customized_type field.class.customized_class.name.underscore if field.class.customized_class
api.field_format field.field_format
api.regexp field.regexp
api.min_length (field.min_length == 0 ? nil : field.min_length)
api.max_length (field.max_length == 0 ? nil : field.max_length)
api.min_length field.min_length
api.max_length field.max_length
api.is_required field.is_required?
api.is_filter field.is_filter?
api.searchable field.searchable
@ -15,23 +15,24 @@ api.array :custom_fields do
api.default_value field.default_value
api.visible field.visible?
if field.field_format == 'list'
values = field.possible_values_options
if values.present?
api.array :possible_values do
field.possible_values.each do |v|
values.each do |label, value|
api.possible_value do
api.value v
api.value value || label
end
end
end
end
if field.is_a?(IssueCustomField)
api.trackers do
api.array :trackers do
field.trackers.each do |tracker|
api.tracker :id => tracker.id, :name => tracker.name
end
end
api.roles do
api.array :roles do
field.roles.each do |role|
api.role :id => role.id, :name => role.name
end

View File

@ -1,3 +1,11 @@
<div class="contextual">
<%= link_to l(:label_custom_field_new), new_custom_field_path, :class => 'icon icon-add' %>
</div>
<%= title l(:label_custom_field_plural) %>
<%= render_tabs custom_fields_tabs %>
<% if @custom_fields_by_type.present? %>
<%= render_custom_fields_tabs(@custom_fields_by_type.keys) %>
<% else %>
<p class="nodata"><%= l(:label_no_data) %></p>
<% end %>

View File

@ -12,7 +12,8 @@ $('#custom_field_field_format').change(function(){
$.ajax({
url: '<%= new_custom_field_path(:format => 'js') %>',
type: 'get',
data: $('#custom_field_form').serialize()
data: $('#custom_field_form').serialize(),
complete: toggleDisabledInit
});
});
<% end %>

View File

@ -0,0 +1,15 @@
<%= title [l(:label_custom_field_plural), custom_fields_path],
l(:label_custom_field_new) %>
<% selected = 0 %>
<%= form_tag new_custom_field_path, :method => 'get' do %>
<div class="box">
<p><%= l(:label_custom_field_select_type) %>:</p>
<p>
<% custom_field_type_options.each do |name, type| %>
<label style="display:block;"><%= radio_button_tag 'type', type, 1==selected+=1 %> <%= name %></label>
<% end %>
</p>
</div>
<p><%= submit_tag l(:label_next).html_safe + " &#187;".html_safe, :name => nil %></p>
<% end %>

View File

@ -20,7 +20,7 @@
:url => { :action => 'edit_membership', :id => @group, :membership_id => membership },
:html => { :id => "member-#{membership.id}-roles-form", :style => 'display:none;'}) do %>
<p><% roles.each do |role| %>
<label><%= check_box_tag 'membership[role_ids][]', role.id, membership.roles.include?(role) %> <%=h role %></label><br />
<label><%= check_box_tag 'membership[role_ids][]', role.id, membership.roles.include?(role), :id => nil %> <%=h role %></label><br />
<% end %></p>
<p><%= submit_tag l(:button_change) %>
<%= link_to_function(
@ -56,7 +56,7 @@
<%= select_tag 'membership[project_id]', options_for_membership_project_select(@group, projects) %>
<p><%= l(:label_role_plural) %>:
<% roles.each do |role| %>
<label><%= check_box_tag 'membership[role_ids][]', role.id %> <%=h role %></label>
<label><%= check_box_tag 'membership[role_ids][]', role.id, false, :id => nil %> <%=h role %></label>
<% end %></p>
<p><%= submit_tag l(:button_add) %></p>
<% end %>

View File

@ -8,7 +8,7 @@
<tbody>
<% @group.users.sort.each do |user| %>
<tr id="user-<%= user.id %>" class="<%= cycle 'odd', 'even' %>">
<td class="user"><%= link_to_user user %></td>
<td class="name"><%= link_to_user user %></td>
<td class="buttons">
<%= delete_link group_user_path(@group, :user_id => user), :remote => true %>
</td>

Some files were not shown because too many files have changed in this diff Show More