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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • 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

Scripted Date Field to calculate according to the dropdown list

Hi Guys,

 

Need your help in order to calculate to Date according to the dropdown list and date field. 

If A ( dropdown list) = XYZ and Target Date = 10/12/2020, then Scripted date field would be 1st of the month like 01/12/2020.

 

If A (dropdown list) = LMN and Target Date = 15/12/2020 then Scripted Date field would be -20 of Target Date , like 25/11/2020

 

Please suggest, how can i achieve this, i have script runner plugin . 

I am thinking to do it via Escalation Service. PLease suggest. What's is the best solution. 

2 answers

Hi @Nic Brough _Adaptavist_  Please suggest on above query. 

0 votes

It'll be easiest to do this with a scripted field, not an escalation service.

A scripted field can be set up as a date/time field, so your code will simply have to read the two fields, do some simple calculations to work out the new date and return the date/time as the output.

There are a load of example scripts for looking up fields and working with dates over at https://library.adaptavist.com/search?page=1&products=jira&platforms=server&term=date

Hi @Nic Brough _Adaptavist_  Thanks for the help. 

I have tried to create a scripted date field " Target Release Date", which will set automatically according to the select list "Country" and date field "Audit Start Date". When country = India then Target Release date would be the next day of the Audit Start Date, for this i have added +1 I have tried to create a script but it not working. Showing error. Please suggest ...I am not sure how to do calculation in date field.Target Date.PNGScripted Date field.PNGError message.PNG

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Trello

📹 Favorite Trello templates

Hello Community!  My name is Brittany Joiner and I am a Trello enthusiast and Atlassian Community Leader. In this video, I'll share my favorite Trello templates. Templates mentioned in ...

75 views 4 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