Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Validation in due date on issue update event

I have applied the validation in due date field at the time of issue created event.


When the ticket<task issue type> is created and due-Date is set to 10th January 2019. Then  Due Date <sub-task issue type> should be smaller than Due-Date<task issue type>

The validation rule is working fine at the time of creating the sub-task issue created event. 

The condition is provided below :

if(issue.parentObject.dueDate >= issue.dueDate )

But the validation is not working at the time of issue update event.

Also I am unable to apply the validation in due date field at the time of issue update event.  

Can anyone help me where and how to apply validation in issue update event. So that the validation will be working fine for issue update event.    

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Jan 03, 2020

Hi Kalyan,

If I understand your concern here, you have a workflow validator working when executing a transition that creates sub-tasks, but you also want this validator to be applied to issue update events that happen outside of a transition.

Unfortunately, the validators in Jira only are expected to work within the steps of a workflow (just before a transition is executed to be more precise).  More details on these can be found in Advanced Workflow Configuration: Validators

The way I would recommend trying to address this problem would be to adjust the screen configurations here.  If you remove that field from the view/edit screens of that issue type, and only leave that field on a transition screen, you can effectively prevent your users from just making changes to the field outside of the transition itself.  If your transition does not yet have a screen, you would have to create a new screen here and place that field in the screen.  This way users could still input data to that field and have it validated, but only immediately before a transition happens.

If you are unfamiliar with making a change like this, I would recommend that you consult the documentation Defining a screen.

I hope this helps. Let me know if you have any questions or concerns about this approach.


@Andy Heinzer:

Thank you so much for sharing the answer. I will implement as per your steps provided. But the only question i am having issue update permission that how to handle the permission scheme?By default, jira is not validating any custom field when agent click on edit button.  

Would you please check i had implement the script on script listener but i am facing issue on the same. I m searching for 4 days.

The two point is provided below which i need to fix:

1. I am unable to restrict for update the value of an issue at the time of issue update event. I had created a script on script listener.

2. Instead of hard coded value for key, i want to use dynamic code on script-runner. Means if the ticket is sub-task issue and project will be the same then the below script will execute.

Here the script is provided below and the requirement is duedate value for Task IssueType should be greater than the Duedate value for n number of subtask IssueType :

import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.issue.Issue
import groovy.transform.BaseScript
import com.onresolve.scriptrunner.runner.customisers.ContextBaseScript
import com.onresolve.scriptrunner.runner.util.UserMessageUtil
import com.opensymphony.workflow.InvalidInputException


@BaseScript ContextBaseScript script

Issue issue = getIssueOrDefault("TEST-258") // Hard coded issue-key defined

if(issue.parentObject.dueDate.compareTo(issue.getDueDate()) >= 0)
UserMessageUtil.success("Due Date Success"+issue.dueDate)
UserMessageUtil.success('Please enter the Subtask duedate that is less than Parent-Task Due-Date ')
//throw new InvalidInputException("Input not valid")

The problem is that when the condition fails then the Due-date will be update first and next the pop up alert is raised which i mentioned in the code but I am unable to restrict the due date update.

Also recommend us for second point on run-time environment(on production).


Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events