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
827 changed files with 11733 additions and 6543 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

16
Gemfile
View File

@ -1,10 +1,13 @@
source 'https://rubygems.org'
gem "rails", "3.2.15"
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
@ -17,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
@ -77,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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -22,11 +22,19 @@ class AccountController < ApplicationController
# prevents login action to be filtered by check_if_login_required application scope filter
skip_before_filter :check_if_login_required, :check_password_change
# Overrides ApplicationController#verify_authenticity_token to disable
# token verification on openid callbacks
def verify_authenticity_token
unless using_open_id?
super
end
end
# Login request and validation
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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -77,7 +77,8 @@ class AdminController < ApplicationController
[:text_default_administrator_account_changed, User.default_admin_account_changed?],
[:text_file_repository_writable, File.writable?(Attachment.storage_path)],
[:text_plugin_assets_writable, File.writable?(Redmine::Plugin.public_directory)],
[:text_rmagick_available, Object.const_defined?(:Magick)]
[:text_rmagick_available, Object.const_defined?(:Magick)],
[:text_convert_available, Redmine::Thumbnail.convert_available?]
]
end
end

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -33,14 +33,24 @@ class ApplicationController < ActionController::Base
layout 'base'
protect_from_forgery
def verify_authenticity_token
unless api_request?
super
end
end
def handle_unverified_request
super
cookies.delete(autologin_cookie_name)
unless api_request?
super
cookies.delete(autologin_cookie_name)
self.logged_user = nil
render_error :status => 422, :message => "Invalid form authenticity token."
end
end
before_filter :session_expiration, :user_setup, :check_if_login_required, :check_password_change, :set_localization
rescue_from ActionController::InvalidAuthenticityToken, :with => :invalid_authenticity_token
rescue_from ::Unauthorized, :with => :deny_access
rescue_from ::ActionView::MissingTemplate, :with => :missing_template
@ -110,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)
@ -192,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
@ -364,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? || (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
@ -378,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
@ -450,13 +463,6 @@ class ApplicationController < ActionController::Base
request.xhr? ? false : 'base'
end
def invalid_authenticity_token
if api_request?
logger.error "Form authenticity token is missing or is invalid. API calls must include a proper Content-type header (text/xml or text/json)."
end
render_error "Invalid form authenticity token."
end
def render_feed(items, options={})
@items = items || []
@items.sort! {|x,y| y.event_datetime <=> x.event_datetime }
@ -552,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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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
@ -426,8 +431,11 @@ class IssuesController < ApplicationController
@issue.safe_attributes = params[:issue]
@priorities = IssuePriority.active
@allowed_statuses = @issue.new_statuses_allowed_to(User.current, true)
@available_watchers = (@issue.project.users.sort + @issue.watcher_users).uniq
@allowed_statuses = @issue.new_statuses_allowed_to(User.current, @issue.new_record?)
@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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -18,7 +18,7 @@
require 'SVG/Graph/Bar'
require 'SVG/Graph/BarHorizontal'
require 'digest/sha1'
require 'redmine/scm/adapters/abstract_adapter'
require 'redmine/scm/adapters'
class ChangesetNotFound < Exception; end
class InvalidRevisionParam < Exception; end
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -47,7 +47,7 @@ class TimelogController < ApplicationController
sort_init(@query.sort_criteria.empty? ? [['spent_on', 'desc']] : @query.sort_criteria)
sort_update(@query.sortable_columns)
scope = time_entry_scope(:order => sort_clause).
includes(:project, :activity, :user, :issue).
includes(:project, :user, :issue).
preload(:issue => [:project, :tracker, :status, :assigned_to, :priority])
respond_to do |format|
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -72,14 +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
s = link_to text, issue_path(issue), :class => issue.css_classes, :title => title
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 << h(": #{subject}") if subject
s = h("#{issue.project} - ") + s if options[:project]
s
@ -116,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)
@ -155,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
@ -181,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)
@ -189,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
@ -266,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
@ -354,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
@ -707,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)
@ -734,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'
@ -755,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)
@ -789,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)
@ -805,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
@ -913,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
@ -1063,7 +1133,7 @@ module ApplicationHelper
(pcts[0] > 0 ? content_tag('td', '', :style => "width: #{pcts[0]}%;", :class => 'closed') : ''.html_safe) +
(pcts[1] > 0 ? content_tag('td', '', :style => "width: #{pcts[1]}%;", :class => 'done') : ''.html_safe) +
(pcts[2] > 0 ? content_tag('td', '', :style => "width: #{pcts[2]}%;", :class => 'todo') : ''.html_safe)
), :class => 'progress progress-#{pcts[0]}', :style => "width: #{width};").html_safe +
), :class => "progress progress-#{pcts[0]}", :style => "width: #{width};").html_safe +
content_tag('p', legend, :class => 'percent').html_safe
end
@ -1173,18 +1243,13 @@ module ApplicationHelper
super sources, options
end
def content_for(name, content = nil, &block)
@has_content ||= {}
@has_content[name] = true
super(name, content, &block)
end
# TODO: remove this in 2.5.0
def has_content?(name)
(@has_content && @has_content[name]) || false
content_for?(name)
end
def sidebar_content?
has_content?(:sidebar) || view_layouts_base_sidebar_hook_response.present?
content_for?(:sidebar) || view_layouts_base_sidebar_hook_response.present?
end
def view_layouts_base_sidebar_hook_response
@ -1231,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
@ -1253,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

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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)
@ -333,13 +334,14 @@ module IssuesHelper
if detail.value && !detail.old_value
rel_issue = Issue.visible.find_by_id(detail.value)
value = rel_issue.nil? ? "#{l(:label_issue)} ##{detail.value}" :
(no_html ? rel_issue : link_to_issue(rel_issue))
(no_html ? rel_issue : link_to_issue(rel_issue, :only_path => options[:only_path]))
elsif detail.old_value && !detail.value
rel_issue = Issue.visible.find_by_id(detail.old_value)
old_value = rel_issue.nil? ? "#{l(:label_issue)} ##{detail.old_value}" :
(no_html ? rel_issue : link_to_issue(rel_issue))
(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

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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,18 +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}"
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

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,7 +1,7 @@
# encoding: utf-8
#
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -154,13 +154,14 @@ class Changeset < ActiveRecord::Base
end
def text_tag(ref_project=nil)
tag = if scmid?
"commit:#{scmid}"
else
"r#{revision}"
end
repo = ""
if repository && repository.identifier.present?
tag = "#{repository.identifier}|#{tag}"
repo = "#{repository.identifier}|"
end
tag = if scmid?
"commit:#{repo}#{scmid}"
else
"#{repo}r#{revision}"
end
if ref_project && project && ref_project != project
tag = "#{project.identifier}:#{tag}"
@ -197,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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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 = []
if value.present?
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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@ -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

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

View File

@ -1,5 +1,5 @@
# Redmine - project management software
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2006-2014 Jean-Philippe Lang
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License

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