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

Next challenges

Recent achievements


  • Give kudos
  • My kudos


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to Calculate Due Date based on Priority field?

Hi, guys need your help here!! :)

I create a field type Calculated (scripted) Date/Time Field (JMCF app) and I want to calculate Due Date based on the creation date and the Priority, including weekends.

For example, if the priority is Critical should add 2 days based on the created date and that's the Due Date. Create date 18/08/20 + 2 = Due Date 20/08/20

So I ran with this solution

I tried to change it a little bit removing the part that excludes the weekends and adding the priorities that we work with,

But in many cases, I got Null as a result or will calculate only this part default : return date(issue.get("created"),5);

I'm not that good coding I'm just trying to use the logic here and is not helping me,

If anyone had an idea of how to calculate this will appreciate very much the help!!


Best regards,

1 answer

1 accepted

Hi Ariel,

The formula for the Due date field should be: 

switch ({
case "Critical" : return issue.created + 2
case "Medium" : return issue.created + 4



Thanks, you saved me!!!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Marketplace Apps & Integrations

5 mobile apps for Jira Cloud to boost productivity

  It’s very important to have access to the workflow process from anywhere. Especially if you manage the work of others. There is no difference whether you’re out of office, or drive a ca...

284 views 2 5
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you