Require Jira user to log work or time spent during transition
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
Jira's workflow editor allows for the combination of a transition screen and a workflow validator(or Rule). Together, these two pieces can ensure that Jira users must fill out certain fields during a work item transition. We'll use this to require filling out the the Time spent field during a work item transition. We'll use this to require filling out the the Time spent field as an example, but the same method can apply to any field in Jira.
Note: On the transition screen you add the Log work field, and in the validator you select the Time Spent field. These work together, the Log work field is where people enter time, and the validator confirms the Time Spent value was modified.
Solution
Requiring a field during transition is based on two components:
A transition screen that is always used between two work item statuses
A workflow rule configured between the two work item statuses
Company-managed Spaces
Create a transition screen including the Log work field
If you have a screen you want to use already, you can skip these steps.
Select Settings (gear icon) > Work items > Screens
Select Add screen and choose a name and description, then select Add
Open the new screen.
Add the Log work field.
Add the screen to the workflow
pen the Space and select Space settings > Workflows.
Locate the workflow used by the relevant work item type.
Select Edit.
Select the transition that should require work logging, such as the transition to Done.
Attach the transition screen created in the previous step in Request input Rule. You need to click Show a screen and select the screen created previously.
The screenshot below illustrates the workflow editor with a screen selected:

Add the enforcement rule to the workflow
Select the transition arrow leading to the target status in the workflow
In the configuration panel, open Rules.
Select Add rule.
Choose the rule (Validate Details) that checks whether a field is required or has a value.
Configure the rule for Time Spent or the applicable work-log field.
Add an error message such as Please log work before completing this transition.
Save the Rule and select Update Workflow.
The screenshot illustrates what the rule will look like after configuration:

Transition screen and validator in action
When users transition the work item, they will see the transition screen you've chosen.
Users must select the Log Work option and enter the time spent as illustrated in the screenshot:

Once work is logged, users can proceed to complete the transition, and the work item will be moved to the next status.
If the time is not entered, Jira will display the warning message configured in the Rule.
Tip: Although this example requires the Time Spent field, you can require any field on a transition by adding that field to the transition screen and pointing the Field has been modified validator at it.
Team-managed Spaces
Team-managed Spaces use a simplified workflow configuration and may not provide classic workflow validators or screen schemes.You can follow following KB:
Was this helpful?