update_project_rule
Change a project rule, by its id from list_project_rules. Only what you pass changes: pass just 'enabled' to switch a rule on or off, or any of the others to edit it. An empty string for 'type' or 'label' removes that condition; for a duty, an empty 'status', 'agentActions', 'agentFields' or 'doneStatus' clears that one. A rule's action cannot change. A rule appends its checklist to an issue's description when the issue ENTERS the rule's state — from the board, the Jira API or update_issue alike. The block starts with a hidden marker line '[//]: # (pm-rule:)'; while that line is in the description, entering the state again adds nothing (the journal says 'alreadyThere'). A [~username] in the template is a mention: that person is notified when the checklist lands. A checklist that would make the description too long is not added and the journal says 'tooLong'; the move itself still happens. A rule with action 'agent' is a DUTY instead: it says which issues may be handed to an agent role (agentRole, e.g. 'product') and what the agent may do with them. Its 'template' is then the INSTRUCTION — what doing such an issue means in this project — and nothing is appended anywhere. A duty may have no state (pass an empty 'status'): then an issue is handed only by a person. agentActions is a list from: describe, subtasks, ask, wiki, report, support. agentFields names the fields it may set: priority, labels, duedate, or the project's own fields by name. doneStatus is the state it moves the issue to when done — never a finished one. capUsd raises what one task may cost, up to 5 dollars. Commenting is always allowed; finishing, deleting, reassigning and anything outside the issue never are. Saving or switching on a duty makes it yours: it runs on your behalf and access, and is switched off if you lose the project. Project lead or admin only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The rule's id, from list_project_rules. | |
| name | No | A new name. | |
| type | No | Only issues of this type, by name. An empty string means any type. | |
| label | No | Only issues with this label. An empty string means any label. | |
| capUsd | No | For a duty: what one task may cost, in dollars, at most 5; 0 goes back to the ordinary ceiling. | |
| status | No | A new state to fire on, by name. | |
| enabled | No | true to switch the rule on, false to switch it off. | |
| template | No | A new checklist template (Markdown). Replaces the old one for issues that enter the state from now on; checklists already added stay as they are. | |
| agentRole | No | For a duty: a new agent role key. | |
| doneStatus | No | For a duty: a new review state; an empty string and it no longer moves the issue. | |
| projectKey | Yes | Project key, e.g. 'ONB'. | |
| agentFields | No | For a duty: the whole new list of fields, comma-separated. | |
| agentActions | No | For a duty: the whole new list of actions, comma-separated. |