Commit Graph

374 Commits

Author SHA1 Message Date
Marius Balteanu
f4e5e36dec Update tests assertions after r23581 (#42394).
git-svn-id: https://svn.redmine.org/redmine/trunk@23582 e93f8b46-1217-0410-a6f0-8f06a7374b81
2025-03-29 13:05:08 +00:00
Go MAEDA
4fb1e4bea0 Use fixtures :all to ensure consistent test data and improve test reliability (#41961).
Patch by Katsuya HIDAKA (user:hidakatsuya).


git-svn-id: https://svn.redmine.org/redmine/trunk@23391 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-12-11 10:17:57 +00:00
Go MAEDA
d8cb8b20f4 Fix: Time entry API returning hours as Rational instead of Float (#41819).
Patch by Go MAEDA (user:maeda).


git-svn-id: https://svn.redmine.org/redmine/trunk@23304 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-11-24 07:04:17 +00:00
Go MAEDA
0abf7105da Fix random test failures due to missing fixtures (#41623).
Patch by Katsuya HIDAKA (user:hidakatsuya).


git-svn-id: https://svn.redmine.org/redmine/trunk@23246 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-11-11 01:46:04 +00:00
Marius Balteanu
218218b783 Fix flacky test after Rails 7 update which fails occasionally because database records are not ordered, so it is necessary to specify the sort order when testing (#36320).
Patch by Takashi Kato (user:tohosaku).



git-svn-id: https://svn.redmine.org/redmine/trunk@22964 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-08-20 06:06:27 +00:00
Marius Balteanu
bfcddc2692 Ensures desired test adapter is used in Active Job tests (#36320).
Patch by Takashi Kato (user:tohosaku).


git-svn-id: https://svn.redmine.org/redmine/trunk@22963 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-08-20 06:04:41 +00:00
Go MAEDA
de76bb3a4a Fix RuboCop offense Layout/EmptyLinesAroundClassBody, one of the offenses enabled in rubocop-rails-omakase (#39887).
git-svn-id: https://svn.redmine.org/redmine/trunk@22949 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-08-12 07:42:12 +00:00
Go MAEDA
b803bddb1f Fix "ArgumentError: Invalid response name: unprocessable_entity" with Rack 3.1.0+ in assert_response (#39889).
Rack 3.1.0 changed the symbol for HTTP status code 422 from `:unprocessable_entity` to `:unprocessable_content`.
Due to the change, `assert_response(:unprocessable_entity, ...)` raises ArgumentError with Rack 3.1.0+.

This fix is a follow-up to r22837.


git-svn-id: https://svn.redmine.org/redmine/trunk@22876 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-06-12 16:09:37 +00:00
Go MAEDA
a4e7d34cb7 Add updated_on and updated_by fields to Issues API journal response (#40449).
Contributed by Thomas Hoffmann (@ThomasHo).


git-svn-id: https://svn.redmine.org/redmine/trunk@22846 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-05-27 07:41:57 +00:00
Go MAEDA
a9518e28b8 Fix RuboCop offense Rails/HttpStatus (#39889).
git-svn-id: https://svn.redmine.org/redmine/trunk@22837 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-05-18 05:56:55 +00:00
Marius Balteanu
473db7e83b Fixes failing tests caused by r22802 (#40652).
git-svn-id: https://svn.redmine.org/redmine/trunk@22807 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-05-03 07:31:17 +00:00
Marius Balteanu
466a8aa78e Fixes missing fixture: add :groups_users fixture to @Redmine::ApiTest::UsersTest@
git-svn-id: https://svn.redmine.org/redmine/trunk@22774 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-03-21 21:12:26 +00:00
Marius Balteanu
38d950df55 Remove current year from source file copyright headers and update year in footer to 2024 (#40043).
git-svn-id: https://svn.redmine.org/redmine/trunk@22746 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-02-26 22:55:54 +00:00
Marius Balteanu
89e1d165a9 Adds @:user_preference@ fixture to @Redmine::ApiTest::IssuesTest@ (#40239).
Patch by Vincent Robert (@Nanego).

git-svn-id: https://svn.redmine.org/redmine/trunk@22734 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-02-25 23:22:02 +00:00
Go MAEDA
5c492560b5 Fix RuboCop offense Layout/SpaceAroundBlockParameters (#23307).
git-svn-id: https://svn.redmine.org/redmine/trunk@22668 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-02-01 11:45:48 +00:00
Marius Balteanu
c1fa75386c Include auth_source in /users API response if request includes auth_source (#23307).
git-svn-id: https://svn.redmine.org/redmine/trunk@22666 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-01-31 03:24:44 +00:00
Go MAEDA
4b1b6ce1db Fix RuboCop offense Layout/SpaceAfterComma (#40099).
git-svn-id: https://svn.redmine.org/redmine/trunk@22647 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-01-27 01:47:10 +00:00
Marius Balteanu
1e71db421a Adds user status to users list API (#38948).
git-svn-id: https://svn.redmine.org/redmine/trunk@22637 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-01-25 16:40:13 +00:00
Marius Balteanu
479c54bf1d Include @auth_source@ in /users/:id API response if auth_source is requested (include=auth_source) and request is made by an administrator (#23307).
Patch by Go MAEDA (@maeda) and Marius BĂLTEANU (@marius.balteanu).

git-svn-id: https://svn.redmine.org/redmine/trunk@22636 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-01-25 16:13:08 +00:00
Marius Balteanu
5676499ceb Remove deprecated @status=@ param used to get all users. @status=*@ should be used now. (#40124).
git-svn-id: https://svn.redmine.org/redmine/trunk@22635 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-01-25 15:38:39 +00:00
Marius Balteanu
c196f4e2b9 Add test cases for @status=*@, @status=@ and @status=|1|3@ (#40099).
Patch by Jens Krämer (@jkraemer) and Marius BĂLTEANU (@marius.balteanu).

git-svn-id: https://svn.redmine.org/redmine/trunk@22623 e93f8b46-1217-0410-a6f0-8f06a7374b81
2024-01-25 04:58:00 +00:00
Go MAEDA
03280712d3 Fix RuboCop offenses due to r22343: Style/RedundantRegexpEscape, Layout/EmptyLinesAroundMethodBody, and Style/HashSyntax (#39181).
git-svn-id: https://svn.redmine.org/redmine/trunk@22346 e93f8b46-1217-0410-a6f0-8f06a7374b81
2023-10-16 14:17:35 +00:00
Go MAEDA
28a45b7144 Add missing Homepage attribute in Projects API response (#39113).
Patch by Vincent Robert.


git-svn-id: https://svn.redmine.org/redmine/trunk@22345 e93f8b46-1217-0410-a6f0-8f06a7374b81
2023-10-15 02:18:26 +00:00
Go MAEDA
ff93ee3cfa API compatibility to legacy status and name query params (#39181, #37674)
- adds 'name' filter that mimics the old behavior of matching on email, login, first- or lastname
- maps the 'status' url parameter to the status_id filter, and the 'name' url parameter to the new name filter

Patch by Jens Krämer.


git-svn-id: https://svn.redmine.org/redmine/trunk@22343 e93f8b46-1217-0410-a6f0-8f06a7374b81
2023-10-15 01:42:07 +00:00
Go MAEDA
fe9ef2fc27 Add description for issue statuses and display them in issue new/edit form (#2568).
Patch by Takenori TAKAKI.


git-svn-id: https://svn.redmine.org/redmine/trunk@22288 e93f8b46-1217-0410-a6f0-8f06a7374b81
2023-08-31 13:21:34 +00:00
Go MAEDA
66f16ff348 Unable to retrieve custom fields set as "For all projects" via Projects API (#38668).
Patch by Hirokazu Onozato.


git-svn-id: https://svn.redmine.org/redmine/trunk@22270 e93f8b46-1217-0410-a6f0-8f06a7374b81
2023-06-30 09:20:09 +00:00
Go MAEDA
dbf8c1d921 Fix RuboCop offense Performance/RedundantEqualityComparisonBlock (#38146).
git-svn-id: https://svn.redmine.org/redmine/trunk@22031 e93f8b46-1217-0410-a6f0-8f06a7374b81
2023-01-11 13:30:25 +00:00
Go MAEDA
1d3a76580f Fix RuboCop offense Performance/FixedSize (#38146).
git-svn-id: https://svn.redmine.org/redmine/trunk@22030 e93f8b46-1217-0410-a6f0-8f06a7374b81
2023-01-11 13:29:11 +00:00
Go MAEDA
1481c721a2 Use require_relative instead of require File.expand_path(..., __FILE__) (#38093).
Patch by Go MAEDA.


git-svn-id: https://svn.redmine.org/redmine/trunk@22016 e93f8b46-1217-0410-a6f0-8f06a7374b81
2023-01-01 07:13:39 +00:00
Go MAEDA
92bd67c279 Update copyright year to 2023 (#38141).
git-svn-id: https://svn.redmine.org/redmine/trunk@22013 e93f8b46-1217-0410-a6f0-8f06a7374b81
2023-01-01 06:19:35 +00:00
Go MAEDA
ee1476f802 Fix RuboCop offense Rails/Pluck (#37248).
git-svn-id: https://svn.redmine.org/redmine/trunk@21928 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-10-28 07:50:11 +00:00
Go MAEDA
099a9adcb3 Add description field to custom fields API (#37617).
Patch by Holger Just and Go MAEDA.


git-svn-id: https://svn.redmine.org/redmine/trunk@21793 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-09-01 05:25:04 +00:00
Marius Balteanu
3ce719b120 Fix internal server error when trying to retrieve AnonymousUser's information via Users API (#37157).
Patch by Yuichi HARADA.


git-svn-id: https://svn.redmine.org/redmine/trunk@21606 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-05-27 22:14:59 +00:00
Go MAEDA
3258ff7244 Fix test failure due to r21601 (#36938).
git-svn-id: https://svn.redmine.org/redmine/trunk@21603 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-05-25 13:52:04 +00:00
Marius Balteanu
883aa3b5cc Background job for project deletion (#36691).
Due to the deletion of dependent objects (issues etc), project deletion may take a long time.

This patch moves the actual project deletion into an ActiveJob job. It also introduces a new project status (SCHEDULED_FOR_DELETION) that is used to effectively hide the project that is about to be deleted (and any potential descendant projects) from the system immediately.

A security notification is sent out to the user that deleted the project, informing about success / failure.

The projects list is extended to be able to filter for the new status, so in case of a failure, the project can still be accessed for examination.

Patch by Jens Krämer.


git-svn-id: https://svn.redmine.org/redmine/trunk@21591 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-05-17 20:45:41 +00:00
Go MAEDA
32abb15847 Add support for PUT API to journals (#10171).
Patch by Mizuki ISHIKAWA .


git-svn-id: https://svn.redmine.org/redmine/trunk@21496 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-03-23 14:26:47 +00:00
Go MAEDA
2d6f552599 Replace Member.find_or_new with ActiveRecord's find_or_initialize_by (#36730).
git-svn-id: http://svn.redmine.org/redmine/trunk@21456 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-03-14 14:25:24 +00:00
Marius Balteanu
1ebb8920d2 Update API test to use token based authentication when twofa is enabled for user (#35001).
git-svn-id: http://svn.redmine.org/redmine/trunk@21441 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-02-25 07:57:37 +00:00
Marius Balteanu
1db2566ff9 Disable API authentication with username and password when two-factor authentication is enabled for the user (#35001).
Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@21436 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-02-24 19:10:35 +00:00
Marius Balteanu
9f82265782 Fix WikiContentVersion API returns 500 if author is nil (#36494).
git-svn-id: http://svn.redmine.org/redmine/trunk@21414 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-02-18 08:08:10 +00:00
Marius Balteanu
5ea0340b8d Add test for #34766.
Patch by Mizuki ISHIKAWA.



git-svn-id: http://svn.redmine.org/redmine/trunk@21393 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-01-30 13:39:55 +00:00
Go MAEDA
5d0798c0d1 Include avatar URL in Users API (#36303).
Contributed by Yuichi HARADA.


git-svn-id: http://svn.redmine.org/redmine/trunk@21375 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-01-21 00:31:11 +00:00
Go MAEDA
3686b77eb6 Update copyright year in source files to 2022 (#36379).
git-svn-id: http://svn.redmine.org/redmine/trunk@21342 e93f8b46-1217-0410-a6f0-8f06a7374b81
2022-01-02 05:29:10 +00:00
Marius Balteanu
70f8ca64dd You can configure default project queries in the following places (#35795):
* App-level: Administration > Projects > Default query (Projects list defaults section)
* User-level: My account > Default project query

git-svn-id: http://svn.redmine.org/redmine/trunk@21281 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-11-15 21:58:39 +00:00
Go MAEDA
975e485afd Add information about whether an issue is open or closed to Issues API response (#15855).
Patch by Takenori TAKAKI.


git-svn-id: http://svn.redmine.org/redmine/trunk@21225 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-10-02 06:16:15 +00:00
Go MAEDA
c46e55e496 File upload fails when run with uWSGI (#35715).
Contributed by Pavel Rosický and Holger Just.


git-svn-id: http://svn.redmine.org/redmine/trunk@21173 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-08-14 01:38:26 +00:00
Go MAEDA
5fa84c0b4e API to close/reopen projects (#35507).
Patch by Yuichi HARADA.


git-svn-id: http://svn.redmine.org/redmine/trunk@21066 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-07-09 02:42:47 +00:00
Go MAEDA
4b661cca29 Add enabled core fields to /trackers API response (#35505).
Patch by Jens Krämer.


git-svn-id: http://svn.redmine.org/redmine/trunk@21064 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-07-06 10:13:01 +00:00
Go MAEDA
e2c08c7b36 Add total estimated hours, spent hours, total spent hours for issues to issue list API (#34857).
Patch by Felix Schäfer and Takenori TAKAKI.


git-svn-id: http://svn.redmine.org/redmine/trunk@21051 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-06-27 07:18:58 +00:00
Go MAEDA
890dc20ad7 API to archive/unarchive projects (#35420).
Patch by Felix Schäfer.


git-svn-id: http://svn.redmine.org/redmine/trunk@21044 e93f8b46-1217-0410-a6f0-8f06a7374b81
2021-06-24 13:55:06 +00:00