Hi,
I would like to know the Custom script post-function allows to update a custom date field (dd/mm/yyyy) with the current transition date.
I have tried few codes but non of them works.
using ScriptRunner 5.1.6
Thanks in advance.
Problem solved.
i used this script :
import com.atlassian.jira.component.ComponentAccessorimport java.sql.Timestampdef customFieldManager = ComponentAccessor.getCustomFieldManager()def dateCf = customFieldManager.getCustomFieldObject("customfield_12345") // Date time fields require a Timestampissue.setCustomFieldValue(dateCf, new Timestamp((new Date()).time))
thanks for this document: https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/postfunctions/set-issue-attributes.html
Without knowing what you've tried, it's quite likely someone will give you the code you've already used.
Could you tell us what you've tried?
hi, i had some weird behavior (could not create new Timestamp) but seems like today it is working better... not sure what i did wrong.
Thanks
Hello @Raphael Israel KLEIN ,
This worked for me - thank you very much.
Regards,
Rahul Savaikar
Hi Raphael ,
i am searching for the same but here i need to capture the date while i click on new transition for every transition i need to pick the date. And when i ever i click on new transition i need to capture the date . Please guide me through the steps and hoe to implement this.
for your example and for better understanding: it should be like in the history user changed from this to this on this date like that
please help me to achieve this and come out from this.
thanks in advance!
uday.
It looks like you're new here. Sign in or register to get started.