Automation for Jira
The Case Documentation field stores the origin of the latest document inclusion. An Automation for Jira rule can start from Jira's native triggers and branch on that origin.
The app does not add its own trigger to the Automation WHEN. Use the native Issue created and Field value changed triggers.
Origins and triggers
| When the document is included | origin value | Automation trigger |
|---|---|---|
| Creating the issue with the field in the create dialog | creacion | Issue created |
| Adding a document during a transition | transicion | Field value changed on Case Documentation |
| Adding a document from the agent panel | edicion | Field value changed on Case Documentation |
The values are evaluated exactly as shown: lowercase Spanish words without accents.
- Field value changed does not fire when the issue is created. For creation, use Issue created, with the field in the create dialog.
- The
transicionorigin is written when the document is added, before the status change is confirmed. Do not use Issue transitioned as the inclusion moment: the document is already saved before the status changes.
Required condition on the origin
Field value changed also fires on changes that are not inclusions:
- Removing, featuring or reordering documents.
- Issues created before version 1.5.0 whose field is empty.
In those cases the field is updated but has no origin. That is why the rule must require origin to be creacion, transicion or edicion. If there is no origin, the change is not an inclusion.
Add a smart values condition on the origin property of the Case Documentation field. That value is enough to branch the rule: no other data source is needed.
Requirements for Automation to see the inclusion
Adding from the panel and from a transition updates the field on behalf of the agent. For Automation to see the change:
- The Case Documentation field must be on the issue type's edit screen.
- The agent needs the Edit issues permission.
- The app needs the
write:jira-workscope. A site that already had the app installed must accept the permission upgrade.
If the field update fails (for example, because the field is not on the edit screen), the panel shows no warning. The document is still in the case list (panel and portal), but the field does not change and Automation does not fire.
When it does not fire
- If the inclusion fails (for example, the same document twice), the field does not change and Automation does not fire for that inclusion.
- If the case has no documents, or the change is not an inclusion, no origin is sent.
See also Troubleshooting.