Commit Graph

372 Commits

Author SHA1 Message Date
Oliver Günther 1857f25b58 Primerize static link helper and use that for external links consistently 2026-02-03 11:41:43 +01:00
Oliver Günther 3426a5e845 add allowExternalLink dataset to skip link capture 2026-02-03 11:11:40 +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
Jan Sandbrink a200c8c8dd Extract trace_exception method from monitoring helpers
The OpenTelemetry and Appsignal helpers were already able to
be hooked into logging, but didn't offer public methods to plainly
trace the occurence of an exception. For both helpers this was possible
to be extracted directly from the existing code.
2026-01-05 08:26:40 +01:00
Jan Sandbrink 649119b83c Include resource_metadata in WWW-Authenticate header
This is giving clients another chance to discover the metadata URL.
2025-12-10 08:47:35 +01:00
OpenProject Actions CI ecf6b3752a Merge branch 'release/17.0' into dev 2025-12-09 03:48:44 +00:00
Oliver Günther 3aa5275567 Merge pull request #21214 from opf/feat/workflow-work-package
Recreate artifact on status change
2025-12-08 14:08:55 +01:00
Jan Sandbrink 167304552f Properly escape values in WWW-Authenticate
We even had a spec testing behaviour of a string that needed
escaping, but due to the fact that we constructed the relatively large
header content in the spec, we never noticed that escaping was indeed
missing in that case.
2025-12-03 15:56:21 +01:00
Jan Sandbrink 5c41f592b2 Add scope-hint to WWW-Authenticate header
This one is defined as optional by RFC 6750, which defines
the usage of bearer tokens. It allows a client to know, which
scopes are required to access a given resource when using Bearer tokens.
2025-12-03 15:56:21 +01:00
Klaus Zanders e5dab38430 Add :validate_except_on, :validate_if, :validate_unless options for acts_as_customizable 2025-11-28 12:25:21 +01:00
Alexander Brandon Coles 7d45642376 [#69095] Primerize Admin > System Settings forms 2025-11-25 19:05:02 -03:00
Dombi Attila 53b0c14191 Skip validating custom fields when creating a project from a template. 2025-11-19 20:14:10 +02:00
Christophe Bliard a6aac70270 Fix detection of worker process type 2025-11-17 16:36:47 +01:00
Klaus Zanders 4ea48b0ee4 Correctly handle invisible changes 2025-11-14 12:19:08 +01:00
Klaus Zanders 6fc4dfb0aa Build correct changeset for multi-value custom fields 2025-11-14 12:14:35 +01:00
Alexander Brandon Coles 57dc5b8966 Merge branch 'dev' into merge-release/16.6-20251113034802 2025-11-13 09:02:51 +00:00
Dombi Attila bc11699ddd Change custom_value_for to return values based on the multi_value? only 2025-11-12 20:25:17 +02:00
Dombi Attila 652551d537 [#68040] Switching a multi select list cf to a single select cf of projects breaks opening the editing modal on the overview page
https://community.openproject.org/work_packages/68040

Change the custom_value_for method signature to always use a custom field.
2025-11-12 20:25:16 +02:00
Alexander Brandon Coles 9ff68b84c6 Fix wording (code): change "expiry" to "expiration" 2025-11-11 20:29:04 +00:00
Dombi Attila 513792ef89 [#67839] "Required for all projects" should not require a value to be set for a Calculated Value
https://community.openproject.org/work_packages/67839
2025-11-03 13:48:00 +02:00
ulferts edf3c709e3 Merge remote-tracking branch 'origin/dev' into feature/63550-allow-editing-of-individual-work-package-project-attributes-even-if-certain-other-attributes-are-invalid-eg-required-field-empty 2025-10-22 18:17:40 +02:00
Alexander Brandon Coles 7f44b74532 Merge pull request #19980 from opf/code-maintenance/frozen-strings-lib_static
Freeze string literals in lib_static
2025-10-21 16:42:23 +01:00
Tobias Dillmann 53405a79fb [#64523] Minor spelling corrections
Noted these while reading through ActsAsCustomizable
2025-10-17 19:31:54 +02:00
Dombi Attila df3fce73b7 Do not use a set, just make the custom_values_to_validate uniq. 2025-10-14 12:01:58 +02:00
Dombi Attila 9181281732 Validate custom fields in all the custom actions that are custom field related. 2025-10-14 12:01:58 +02:00
Dombi Attila f90b2fee27 Validate changed custom fields when executing custom actions 2025-10-14 12:01:58 +02:00
Dombi Attila 0b75d47bdb Fix specs, activate all cusotm fields validations on the work packages update api endpoint. 2025-10-14 12:01:58 +02:00
Dombi Attila 0be5920b65 Add User invite and ldap registration specs required custom field specs 2025-10-14 12:01:58 +02:00
Dombi Attila 84e95873fd Wp and group aac spec works 2025-10-14 12:01:58 +02:00
Dombi Attila 33306505b8 Remove unused code 2025-10-14 12:01:58 +02:00
Dombi Attila 2aae862d8a [#63550] Allow editing of individual work package/project attributes even if certain other attributes are invalid (eg. required field empty)
https://community.openproject.org/work_packages/63550
2025-10-14 12:01:58 +02:00
Alexander Brandon Coles 5fbc204fd2 Fix missing copyright notices in lib_static 2025-10-06 13:12:03 +02:00
Alexander Brandon Coles 50be32c606 Freeze string literals in lib_static
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze lib_static
2025-10-06 13:12:02 +02:00
Tobias Dillmann f7b5770af2 [#66093] CalculatedValueError belongs to Project and CustomField
... instead of CustomValue. This avoids issues with soft deletion and
caching.
2025-09-24 19:19:03 +02:00
Tobias Dillmann 69f1fad907 [#66093] Delete custom value errors to avoid foreign key violations 2025-09-24 19:19:03 +02:00
Christophe Bliard a69859f0ec [67642] Avoid error when attachment is not uploaded yet
https://community.openproject.org/wp/67642

Attachments::ExtractFulltextJob is run twice:
- one time on creation
- one time when the direct upload is completed

When it runs on creation, and the attachments are stored on S3, the
attachment is in 'prepared' status and is not complete yet.

Due to a bug in carrierwave which is fixed since June 2023 (see
https://github.com/carrierwaveuploader/carrierwave/issues/2524), the
`#local_file` method raises the error "NoMethodError: undefined method
'body' for nil:NilClass". There is a separate issue for upgrading this
dependency one day: https://community.openproject.org/wp/67626.

The fix is to call `#local_file` only if the attachment is readable.

Additionnally:
- error handling has been updated to raise the error instead of
  swallowing it silently, so well have proper reporting in AppSignal
  next time.
- when a custom S3 endpoint is used (for local testing with minio for
  instance), this custom endpoint is added to the CSP.

Co-authored-by: Jan Sandbrink <j.sandbrink@openproject.com>
2025-09-24 10:21:22 +02:00
Christophe Bliard 18b6233d55 Adjust some OpenTelemetry configuration
- Use constants for semantic names. As a bonus it gives documentation
  about the metric.
- Use a random UUID for the service name. It has to be unique for a
  given service name and namespace.
- Use process type as service name.
- Add service version.

Do not set anything regarding the environment (edge / stage / prod) or
shard name as these will be available as k8s labels anyway.
2025-09-22 15:02:07 +02:00
Oliver Günther 59446719c9 Transform values to_s 2025-09-17 15:48:25 +02:00
Oliver Günther bf93b827b3 Tag opentelemetry request 2025-09-17 15:32:27 +02:00
Alexander Brandon Coles 2b144e8542 Fix wording: Change "Favored" to "Favorited"
Favorite is the correct term in the context of expressing a preference
for a particular project / other OpenProject domain object.

Updates `ActsAsFavorable` to `ActsAsFavoritable`, as well as filenames,
identifiers and strings to:

    favored => favorited
    favorable => favoritable
    favoring => favoriting
2025-09-10 19:08:15 +01:00
Oliver Günther 426ce50312 Add localized links for links to docs 2025-08-29 14:03:40 +02:00
Ivan Kuchin 10139945a8 fix custom_field_values to depend on all value 2025-08-18 14:21:05 +02:00
Oliver Günther da6fe7c012 Make term_on_timeout configurable 2025-08-11 11:16:48 +02:00
Jan Sandbrink 0fe8b5ba2b Change target parameter of link_translate to boolean
It's now called external and can only switch between external and non-external links.
This does not only affect the link target, but additionally also adds a trailing visual icon
as it is suggested by our Lookbook.

Since this made me go through all calls of link_translate, I took the opportunity to also replace
occurences of manual calls to OpenProject::Static::Links with the new abbreviated call syntax.
2025-07-31 08:52:40 +02:00
Jan Sandbrink f7db89bf78 Allow to specify whether links will be underlined
Defaults to true, because underlining them usually helps
with accessibility (making links recognizable as such).
2025-07-31 08:52:40 +02:00
Jan Sandbrink dc2bfa8948 Use Static::Links.url_for helper more consistently
This is in preparation to extend that helper at a later point to support
localized URLs.
2025-07-31 08:52:40 +02:00
Jan Sandbrink 3b775335a0 Use Primer to render links in #link_translate 2025-07-31 08:52:40 +02:00
Klaus Zanders 3ab822fa1e Implement polymorphic association for journaling 2025-07-09 10:41:26 +02:00
as-op 12a52c6582 fix link to docs [skip ci] 2025-07-07 15:29:12 +02:00
as-op 729cfceb95 fix link to blog [skip ci] 2025-07-07 13:05:49 +02:00