Hi,
I have an requirement to access the existing JIRA issue and it's different parameter like-Type, Status etc using groovy script in post-function.
Any suggestion, how can i achieve this ?
Regards,
Dileep
Hello,
Your code would be like this:
import com.atlassian.jira.component.ComponentAccessordef issue = ComponentAccessor.getIssueManager().getIssueByCurrentKey("issue key")issue.getSummary()issue.getStatus()issue.getIssueType()
Thanks @Alexey Matveev for your reponse !! I will check the above script.
Now, I have a sub-task in above issue. How can i access sub-task of given issue, using groovy script ?
Could you please suggest ?
Dileep.
import com.atlassian.jira.component.ComponentAccessordef issue = ComponentAccessor.getIssueManager().getIssueByCurrentKey("issue key")issue.getSummary()issue.getStatus()issue.getIssueType()issue.getSubTaskObjects().each{subtask -> subtask.getSummary()}
Thanks @Alexey Matveev for response !!
Now, i have the below requirement :-
If Status of Child Issue1 changes from To Do --> WIP then the type: Sub-Task should replace all other child issue type, if its different.
Screen-Capture is attached.
It looks like you're new here. Sign in or register to get started.