Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to add time to a Date Time custom field?

Liam Maeder
Contributor
August 5, 2021

Good Day

I am having a minor issue which is affecting our SLA.

So what we are hoping to achieve is to setup an automation rule that can add time to a date time value from another field and add it to a custom field.

So if:

Priority Task = Yes

Then:

Start Time = Created Time + 1 hour

Else:

Start Time = Created Time

 

Please any assistance would be appreciated. 

We are using Jira Server 8.5 and Automation for Jira.

2 answers

2 accepted

3 votes
Answer accepted
Alex Koxaras -Relational-
Community Champion
August 5, 2021

Hi @Liam Maeder 

If I wanted to capture only the time, I would:

  • Create a new text field and associate it with the appropriate VIEW screen
  • Create the automation rule
  • On If priority - task
    • edit issue component "{{issue.created.plusHours(1).shortTime}}"
  • Else
    • edit issue component "{{issue.created.shortTime}}"

The above would give me the TIME only on a read-only text field.

Is this something you could work on?

 

Regards,
Alex

Alex Koxaras -Relational-
Community Champion
August 5, 2021 edited

unintentional comment :)

Liam Maeder
Contributor
August 5, 2021

I was playing around with the automation and I got the same result, but thanks, it works perfectly :)

Like • Alex Koxaras -Relational- likes this
Alex Koxaras -Relational-
Community Champion
August 5, 2021

Nice to know that you got it by yourself! Good job!

1 vote
Answer accepted
Vikrant Yadav
Community Champion
August 5, 2021

Hi @Liam Maeder  Use below smart value , Select Action  >> Select Edit Issue >> 

Select "Start Time field" :- Add below smart value 

{{issue.created.plusHours(1)}}

or

{{now.plusHours(1)}}

 Hope it works for you!

Suggest an answer

Log in or Sign up to answer