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
Community moderators have prevented the ability to post new answers.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.