92 Commits

Author SHA1 Message Date
Jan Sandbrink 7ff33210f6 Upgrade mcp gem to 0.7.1
This fixed a few regressions around error handling, but some
errors are still handled differently than before...
2026-02-23 15:40:42 +01:00
Jan Sandbrink a4576cddcb Allow to configure MCP tool responses
This is an effort to give administrators more control
over the volume of data returned. While we don't want to limit
the actually useful part of the data, we suspect that some MCP
clients might pass both the content and the structured content
to the language model. Thus we allow admins to configure which
one will be generated.
2026-02-20 08:04:25 +01:00
Jan Sandbrink ec24cfcba9 Allow to use regular API Keys for MCP requests
Some clients, such as Claude code require dynamic client registration
for their regular workflow. However, they allow to fallback to
static HTTP headers for authentication.

This approach allows to construct the corresponding header for Basic authentication
and add it to Claude.
2026-02-03 10:17:27 +01:00
Jan Sandbrink ac4e9626ee Add MCP resource handling
Allows to list resources and resource templates and reading
their contents.
2026-01-26 13:22:44 +01:00
Jan Sandbrink 78f8607de6 First implementation of MCP API server in OpenProject
So far the MCP server only offers a single tool, but authentication
and integration is already built in a way that's intended to last.

Ideally extensions to this happen by adding additional tools or resources,
but will not require further architectural changes, though realistically we'll
probably identify more potential for reuse, once we added a few more tools.

The exact representation of results is still slightly to-be-discussed. Right
now we are using vanilla APIv3 representation, which might be enough, but possibly
we want to represent linked resources differently, so that they can be recognized
to be fetchable via MCP resources more easily.
2026-01-05 08:28:45 +01:00
Kabiru Mwenja b52debb70d Style/ItBlockParameter: Use it block parameter.RuboCopStyle/ItBlockParameter (#19318) 2025-06-26 13:36:49 +03:00
Jan Sandbrink 03c8db36bf Merge pull request #18806 from opf/frozen-specs
Freeze string literals in specs
2025-05-07 07:54:10 +02:00
Jan Sandbrink 0b87e7543f Freeze string literals in specs
Rolling out frozen string literals further by freezing all
string literals in core specs.
2025-05-05 09:29:55 +02:00
ulferts b49977bbb7 add a project phase definition show endpoint 2025-04-29 17:11:54 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Christophe Bliard a885fef2bd Conform to RSpecRails/HaveHttpStatus cop
With a hack to get `have_http_status` to work with `Rack::MockResponse`.
2024-06-24 17:50:57 +02:00
ulferts 3b2121f733 Revert "Merge remote-tracking branch 'origin/release/13.4' into dev"
This reverts commit 40b2bbeb09, reversing
changes made to b4c6cb17cc.
2024-03-21 11:31:17 +01:00
Ivan Kuchin 7787e457a3 Revert "Merge branch 'dev' into release/13.4"
This reverts commit a901541269, reversing
changes made to e573ca00b7.
2024-03-20 20:19:08 +01:00
Ivan Kuchin 9e4934cd0a change quotes using rubocop --only Style/StringLiterals,Style/QuotedSymbols -a 2024-03-20 18:05:22 +01:00
Christophe Bliard c795874f7f Update copyright year for 2024
command used: `rg -l 'Copyright \(C\) 2012-202\d the OpenProject' | xargs -n 100 sed -i -r 's/Copyright \(C\) 2012-202. the OpenProject/Copyright (C) 2012-2024 the OpenProject/'`
2024-01-02 16:23:54 +01:00
Oliver Günther d60120f1fb Adapt specs now that login_required defaults to true 2023-11-08 11:30:58 +01:00
Eric Schubert 27fa563f9e [#50543] added request tests 2023-10-18 15:09:37 +02:00
Christophe Bliard 4c2a9d0aa8 Enable RSpec zero monkey patching mode
The plan for RSpec 4.0 is to disable monkey patching.

See https://github.com/rspec/rspec-core/blob/main/features/configuration/zero_monkey_patching_mode.feature for details.
2023-05-31 19:22:29 +02:00
Eric Schubert fb0841dd7d [chore] Fixed response for errors in project storage collection filters
- added request spec for project storages endpoint
- added human name to filters
- added permission check for GET project storage by id
2023-04-21 14:27:31 +02:00
Christophe Bliard aa23106c11 lint: autocorrect RSpec/FactoryBot/ConsistentParenthesesStyle
command is

    rubocop -A --only RSpec/FactoryBot/ConsistentParenthesesStyle modules spec
2023-03-07 15:04:32 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Eric Schubert 2fc97653d4 [#44901] API endpoint for deleting a file storage
- https://community.openproject.org/work_packages/44901
- added storage delete endpoint
- added api specification
- added request specs
2022-11-15 13:44:41 +01:00
luz paz 9e22d420db Fix typos
Found via `codespell -q 3 -S ./config/locales,./modules/xls_export/config/locales,./modules/job_status/config/locales,./modules/two_factor_authentication/config/locales,./modules/backlogs/config/locales/crowdin,./**/config/locales -L ba,nd,parms,pullrequest,pullrequests,sur,varius`
2022-04-15 21:20:17 -04:00
Christophe Bliard f40197dc1a turn Storages::FileLinks::CreateContract into a ModelContract
+ display more information in test if there are contract errors
2022-03-23 09:54:19 +01:00
Christophe Bliard daed5e1bee admins and storage admins can see all storages 2022-03-21 10:55:51 +01:00
Christophe Bliard 8814088c9d add checks on _embedded/elements when creating file links through api 2022-03-18 10:58:24 +01:00
Christophe Bliard b592d7cf0b more descriptive test output 2022-03-16 10:56:26 +01:00
Christophe Bliard d983d7601f Merge branch 'dev' into feature/file-links 2022-03-02 14:03:03 +01:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
Christophe Bliard c46ee9a239 post /work_packages/:id/file_links first implementation
there are no errors handling yet
2022-02-15 16:41:22 +01:00
Oliver Günther f08bea3467 Remove FactoryBot.* prefix where applicable 2022-01-25 08:19:06 +01:00
Oliver Günther 9a3d822b35 [38842] Allow customized not found message
https://community.openproject.org/wp/38842
2021-10-13 08:37:21 +02:00
Oliver Günther ccfa29c728 Move license and copyright docs to root, fix names and references 2021-09-02 21:50:46 +02:00
ulferts 0666c89828 Feature/35708 wp typeahead filter (#9426)
* breakup wp resource specs into separate files

* introduce and employ typeahead filter on work packages

Co-authored-by: Oliver Günther <mail@oliverguenther.de>
2021-07-13 20:14:43 +02:00
ulferts f8b28b300c treat nil value as non false
The default BooleanEquals filter treats null same as false. Because of that, notifications that are not meant for ian were displayed. The BooleanEqualsStrict filter only filters for false as expected so that the notifications are not displayed.
2021-06-28 20:18:57 +02:00
ulferts 1bdd2ab9ae safe automatic fixes by rubocop (#8994) 2021-02-11 16:02:18 +01:00
Oliver Günther cdf3cf4c34 [36136] Rework members page to show name and avatars for principals (#8973)
* Rewrite members page to output name column

* Remove white-space nowrap for long login names in administration

* Extend member specs

* Allow query instance to be used in table cell

* Fix memberships specs with changed columns

* Add order for email

* Review feedback

* Allow x to close add member form

* WIP sort firstname/lastname

* Make status sortable

* Extract order_by_name into the order class

* Re-add but deprecate order_by_name

It's still in use in combination with some special scopes

(custom actions for example) that I don't want to remove right now

* Rewrite order_by_name into scope
2021-02-11 09:33:43 +01:00
Oliver Günther 2cde433326 Remove usages of AnyFixture (#8987)
AnyFixture will create once instance of a factory for reuse in a number of specs.
This will work fine until we require a clean slate for a specific example.

As we have numerous tests that test like the database is empty,
we get a number of disadvantages:

  - After an example with `with_clean_fixture` metadata, the fixture will only be regenerated
    after the next example that uses it. This means the order of execution will change
    the number of objects in the DB.

  - The more `with_clean_fixture` we have, the smaller the performance advantage of AnyFixture will
    result in.

  - You cannot use an AnyFixture in a spec that needs a clean slate. This should be obvious but was overlooked
    by myself.
2021-02-10 08:59:15 +01:00
ulferts 6140f4c7e9 update copyright to 2021 (#8925)
Updates the copyright to 2021 for all files that have a copyright. Files in our source code without the copyright header still do not receive one automatically. Additionally, backlisted files are also excluded.

Previously the copyright of chiliproject which references redmine stated a copyright of redmine up to and including 2017 which is not true for the code we have in here. Because of that I changed that to 2013
2021-01-13 17:47:45 +01:00
Oliver Günther 53f2d694ff Use AnyFixtures to generate fixtures from factories (#7230)
Uses FactoryBot to keep and maintain specific records in a special transaction that does not get removed after each spec.
They automatically are created whenever first hitting them.
This makes an excellent time saver for items that are commonly used, such as an admin user account
2020-04-09 11:54:26 +02:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
ulferts 51e7f1f048 adapt specs to altered non writable message 2019-11-21 13:10:36 +01:00
ulferts e003ad0af7 turn scope and label unwritable 2019-11-21 09:39:22 +01:00
Oliver Günther 1b5fc32366 Avoid before blocks and raw params access for IDs
Grape's validation runs after a `before` block so we should avoid using
raw params there and instead using `declared(params)` which returns only
the validated whitelisted params, much like a permitted params hash.
2019-05-22 09:34:17 +02:00
Oliver Günther 059770f533 FactoryGirl => FactoryBot
Removes the deprecation
2018-05-07 22:38:20 +02:00
Oliver Günther 6ef4211e77 Bump copyright to 2018 (#6171)
[ci skip]
2018-02-12 08:51:12 +01:00
Oliver Günther cbb0d90fde Use Rack::Test in all request specs 2017-09-12 09:17:40 +02:00
Oliver Günther 7cf11bb689 Update copyright notice 2017-01-10 15:11:43 +01:00
Jan Sandbrink 5de0f15898 Correctly link activities
- they might not be embedded
- create an endpoint for activities
- document it properly
- adapt angular client
2015-08-31 18:03:44 +02:00
Alex Coles e4c87bc2b4 Merge branch 'dev' into feature/rails4
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-08-08 19:44:58 +01:00