Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get issue details

Andrew Striletskyi
Contributor
July 31, 2018

Hello everyone. How to get issue details using Groovy? It can be comments , resolution , summary etc. For example in JSON format. I know about using REST API , but how to do that without any entering credentials etc or withour REST API

1 answer

1 accepted

0 votes
Answer accepted
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 31, 2018

Hello,

You would need to use Jira Java Api. For example,

import com.atlassian.jira.component.ComponentAccessor

def issue = ComponentAccessor.getIssueManager().getIssueByCurrentKey("issuekey")

def summary = issue.getSummary()

def resolution = issue.getResolution()

def comments = ComponentAccessor.getCommentManager().getComments(issue)

You can find Issue class here:

https://docs.atlassian.com/software/jira/docs/api/7.1.2/com/atlassian/jira/issue/Issue.html

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events