Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Date Time Custom Field addition and subtraction with Automation

Hello!

I am having a difficult time using the Automation for JSD to work with some date time fields and plain text custom fields.

We have a few date time custom fields, which is populated by a script to set the date and time on card creation (but this time will not be the time that the card was created, it will be a time when an issue was detected).

This script also passes a numeric value to a plain text field, example: 20, or 40, or 60 - this represents minutes.

Now what I need to do is take the value in the "Date Time" custom field, and add (plus) the value from "Extra Time", example (the time is shown in this annoying format):

Date Time: Mar 02, 2021, 12:00 AM

Extra time: 20

Using Automation for JSD, I have attempted to use the Smart Value, but it seems that you can't .plus or .minus a set value from a different date time custom field.

I've tried:

Edit Issue -> Custom Field Name

{{issue.Date Time.plus(20)}}

But this clears the 3rd date time custom field where I need to display this value.

I'm at a bit of a loss on this one. Is there anyone who has done something similar, or knows of some automagical way of doing this?

Keep well,
Nick

1 answer

1 accepted

2 votes
Answer accepted

Instead of using:

.plus(20)

on the datetime field, use this instead:

.plusMinutes(20)

 

From the docs here:

Screen Shot 2021-03-02 at 10.23.00 AM.png

Oh my goodness. I can't believe that I was that blind.

Thank you Mykenna! Yes, that did indeed work.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Management

ThinkTilt is joining the Atlassian Family!

This morning, Atlassian announced the acquisition of ThinkTilt , the maker of ProForma, a no-code/low code form builder with 700+ customers worldwide. ThinkTilt helps IT empower any team in their or...

339 views 19 20
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