For example - on the 'create' form a user selects a date picker to populate customfield 'Meeting Date' - say 8/10/2017. How can I write a script to automatically populate a customfield 'Meeting Start' with a fixed time, to make it '8/10/2017 08:30:00'? So it would be set at 8:30am for whatever date the user picks
Thanks for any feedback!
You could do with this in a script field. I wrote the following script that will:
import com.atlassian.jira.component.ComponentAccessor
import java.text.SimpleDateFormat
enableCache = {-> false}
def customFieldManager = ComponentAccessor.getCustomFieldManager()
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy 08:30:00")
def meetingDate = customFieldManager.getCustomFieldObjectByName("Meeting Date")
return sdf.format(issue.getCustomFieldValue(meetingDate))
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.