How to set up the "Comments" field as mandatory when changing fields such as Priority
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
Currently, there are no options in JSM (Jira Service Management) to make Comments mandatory, which is crucial for understanding the reasoning/context for scenarios such as when an incident ticket's priority is upgraded/downgraded.
Solution
Use the following combination to require a comment when the Priority field is changed:
A transition screen that contains the Priority field and Comment field.
A Workflow rule that requires the Comment field for the transition.
An Automation that reverts a Priority change made in the Work item view and comments on the associated ticket.
The transition is the supported route in this example: the user edits the Priority field through the transition screen, where the Comment field is required.
How the pieces fit together
This solution combines three components that must all be configured for it to work: (1) a transition screen containing the Priority and Comment fields, (2) a transition validation rule that blocks the transition unless Comment is filled, and (3) an automation rule that reverts direct edits to Priority made in the work item view and @mentions the user to redirect them to the transition. All three are required.
Transition screen
Navigate to Work items > Screens, then create a new screen or edit an existing one. Add the Priority field and the Comment field. The Comment field must be available on the transition screen.
Associate the screen with the relevant transition:
Go to Space Settings > Workflows.
Click the Edit workflow to edit the relevant workflow.
Select Diagram, then select the relevant transition.
Under Rules, select Request Input.
Add a Show Screen rule, select the screen that was created or modified, and save.
Workflow Rule
This is where you will configure the Rule for a given transition. You may need to repeat these steps for other transitions if there are other statuses that would allow agents to make changes to Jira fields.
Go to Space Settings > Workflows.
Click the Edit workflow to edit the relevant workflow.
Select the relevant transition and on the Rules tab, expand Validate Details.
Click Add Validate Details rule and select Validate a Field rule.
Under Validate That Field, select Isn't Empty.
In the For field(s), select Comment.
If other transitions allow agents to modify Jira fields, repeat this validator configuration for those transitions.
Automation
Prerequisite: Complete the Transition screen and Workflow validation sections above before configuring this rule. The automation reverts direct Priority edits in the work item view; the transition validation rule is what enforces the mandatory Comment on the transition screen. Both are required, automation alone does not make Comment mandatory.
Scope the rule to suit your needs: The example automation is generic and applies to a wide range of issues. Add further conditioning or scoping as needed.
Trigger — Field value changed
Action #1 — Edit issue: use
{{fieldChange.from}}.Action #2 — Comment on issue: use
[~accountID:{{initiator.accountID}}]to mention the user.
Example comment:
Hi [~accountID:{{initiator.accountID}}], the value for the Priority field has been reverted. Please edit this field via the transition screen and add a brief comment for the change.
After configuring the rule, publish and enable it.
The automation reverts the change and adds this comment to the associated ticket, while the transition screen and validator require the user to provide a Comment when changing Priority through the transition.
Was this helpful?