We would like to have a post function to update 'Target Start' field to Sprint Start date. We are using 'Set field value (JMWE app)'. We are using Groovy expression - 'issue.get("Sprint")*.startDate.flatten()'. However, this is not updating the Target Start, probably due to date format miss match. Can someone help us.
Hi @Sadath Ali Syed ,
that expression returns an array of dates, which is not what's expected. Try this instead:
issue.get("Sprint")?.find{it.active}?.startDate
which will find the active sprint of the issue and then return that sprint's start date
@David Fischer - I did try the above. It gives below error:
An error occurred while executing a Set Field Value post-function: Field type com.atlassian.rm.jpo.customfields.baseline.start.BaselineStartCustomFieldType@cb91b52 of field Target start is not supported. : root cause: Field type com.atlassian.rm.jpo.customfields.baseline.start.BaselineStartCustomFieldType@cb91b52 of field Target start is not supported.
I think it is related to the date format of Sprint start vs the date format 'Target start' field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sadath Ali Syed ,
the problem is that the destination custom field is not a standard custom field but a field that belongs to Advanced Roadmaps.
Can you share the full error (with stack trace) as found in the Jira logs?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sadath Ali Syed ,
sorry, my bad, the correct Groovy expression is:
issue.get("Sprint")?.find{it.active}?.startDate?.toDate()
The reason is that the Sprint start date is returned as a org.joda.time.DateTime object, whereas most Jira fields expect a java.util.Date object...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Sadath Ali Syed @David Fischer ,
I have created one script field with same groovy expression. But i dont see it reflecting in jira created.
should i try this with script filed (date type) ? or in different way?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.