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.ComponentAccessor
def 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 ?
Regards,
Dileep.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
import com.atlassian.jira.component.ComponentAccessor
def issue = ComponentAccessor.getIssueManager().getIssueByCurrentKey("issue key")
issue.getSummary()
issue.getStatus()
issue.getIssueType()
issue.getSubTaskObjects().each{subtask ->
subtask.getSummary()
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
Could you please suggest ?
Regards,
Dileep.
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.