Hi ,
I would like to check if story fix version is equal or different from its Epic fix Version .
Any idea how to do it ?
Will be happy to get suggestions
Hello,
If you want to do it in a post function, your code would look like this:
import com.atlassian.jira.component.ComponentAccessor;import com.atlassian.jira.issue.CustomFieldManager;import com.atlassian.jira.issue.fields.CustomField;import com.atlassian.jira.issue.Issue;CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager();CustomField epicLink = customFieldManager.getCustomFieldObjectByName('Epic Link');Issue epic = issue.getCustomFieldValue(epicLink) as Issue;log.error(epic.getFixVersions())
thanks a lot
You are welcome!
I have small question , and will be happy if you can assist me
I adjust the code to work as script listener -
1) script called when issue updated
2) I am failing to get previous fixVersion value , it always null
I tried both below w/o luck :
1)
nameOfUpdatedField = "Fix Version"def changeFixVersion = event?.getChangeLog()?.getRelated("ChildChangeItem").find {it.field == nameOfUpdatedField}2) ChangeHistoryManager changeHistoryManager;List<ChangeItemBean> changeList = changeHistoryManager.getChangeItemsForField(issue, "Fix Version")
Thanks in advance
It looks like you're new here. Sign in or register to get started.