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())
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are welcome!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should add logging to your script. And have a look what is wrong
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.