Forums

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

How To Set Date/Time Field into future based off another Date/Time Field & auto-fill out field

Robert Kendrick
May 5, 2021

I'm looking to add a scriptrunner behavior on my Service Desk portal create form. I want to set the Date/Time field "Live End Time" to be defaulted to 60 minutes after "Live Start Time".  The Requester should still have the option to edit the field if they need to. 

I'm just starting out with scripting and most of the answers that I've seen on this board has talked about setting a field days into the future, but none, where it would auto-populate on after the first field, is set.  

Example:

Live Start Time = 5/May/21 05:00 PM 

When the user clicks out of this field, I want to auto fill out the Live End Time to read:

5/May/21 06:00 PM 

When the form loads, both fields are empty.  The user will fill out the Live Start Time field first.  After they fill it out, I want the Live End Time field to auto-populate.  

 

I have scriptRunner installed and I'm on Jira Server 8.15

 

Thank you 

3 answers

1 accepted

0 votes
Answer accepted
Sumit akare
August 25, 2013

I have created a query on below tables to get the required data.

jiraissue,issuestatus,customfieldvalue,changegroup

0 votes
Sumit akare
August 20, 2013

I have created a query on below tables to get the required data.

jiraissue,issuestatus,customfieldvalue,changegroup

0 votes
Timothy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
August 13, 2013

A changegroup is tied to a username and a changegroup has many changeitems. A changeitem is tied to a custom field and uses the oldvalue/oldstring and newvalue/newstring. Start from there.

Suggest an answer

Log in or Sign up to answer