I would like to add 1 month to a custom date field (Next Cycle Date) and then update that date field upon a workflow transition (post-function).
I have the current script but it's not doing anything, not sure what I am doing wrong.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.event.type.EventDispatchOption
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.UpdateIssueRequest
import java.text.SimpleDateFormat
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager()
SimpleDateFormat dateFormatter = new SimpleDateFormat("dd/MMM/yy");
java.sql.Timestamp nextCycleDate = (java.sql.Timestamp)issue.getCustomFieldValue(customFieldManager.getCustomFieldObject("customfield_10603")) //get current "next cycle date"
nextCycleDate.setMonth(nextCycleDate.getMonth() + 1) //add 1 month to current cycle date to get next cycle date
issue.setCustomFieldValue(customFieldManager.getCustomFieldObject("customfield_10603"), nextCycleDate) //update next cycle date
ok, then. There's a report a bug link in the bottom of the page. Use it, it's more useful than 'stupid blacklist'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Answer: Blacklist is not stupid.
Proof: This question exists. Therefore, Answers lets you use the word 'assignee'. This answer contains the word 'assignee'. Therefore, blacklist is not stupid.
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.