Skip to content

Investigate/document percentage_done writability vs OpenProject progress calculation mode (status-based = read-only) #6

Description

@AndreaV-Lsi

Context

PR-4 (#1) made update_work_package gracefully skip percentage_done when the instance rejects it
as read-only (HTTP 422 PropertyIsReadOnly — verbatim on our instance: "% Complete was attempted
to be written but is not writable."
, attribute percentageDone). This issue investigates why
it is read-only and how best to document it, since the behavior is instance-configuration-dependent.

Finding (research)

OpenProject (14.0+, refined in 14.6) has an admin setting at Administration → Work packages →
Progress tracking → "Progress calculation mode"
with two modes:

  • Status-based — each status is mapped to a fixed % Complete value; % Complete is derived
    from the work package's status and is not manually writable (the API returns
    PropertyIsReadOnly). Remaining work is auto-calculated. Our instance (Core 17.5.1) is in this
    mode
    — hence the 422.
  • Work-based% Complete is manually editable/writable (or auto-derived from Work and
    Remaining work when those are set).

So whether percentageDone is writable depends entirely on this server setting; different instances
differ. Our existing graceful handling (drop the field, retry, note it was skipped) is the correct
general behavior because the server can't assume one mode.

Proposed scope

  1. Confirm our instance's mode in Administration → Work packages → Progress tracking (expected:
    status-based).
  2. Refine the update_work_package docstring + README note added in Make wrapped Pydantic input tools robust to MCP clients that serialize object args as JSON strings #1 to name the specific cause
    ("read-only when the instance uses status-based progress calculation mode") and link the OP docs.
  3. (Stretch, optional) decide whether the tool should do more than document — e.g., surface a message
    that points at the setting, or detect the mode. Likely doc-only is sufficient; the graceful
    handling already covers the runtime case.

Out of scope

Acceptance criteria

References

Type: investigation/docs. Related: #1. Label: backlog.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogLogged future work item, not yet scheduled

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions