Forums

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

Fetch Jira issues based on JQL and print details like Key, assignee and FixVersion

Ganesh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 1, 2023

I want to fetch Jira issues using JQL and print the fields(Key, Assignee..) values with the loop. Need some examples to do this. 

I could print Jira key value, but other issue fields print only "null"

def jiraQuery = 'project = "Test" AND status="done"'
def testExecutionSearch = jiraJqlSearch jql: jiraQuery

if (testExecutionSearch != null){
def issues = testExecutionSearch.data.issues

for (def jiraIssue : issues){
def issueId = jiraIssue.key
def issueEmail = assignee.emailAddress
echo issueId
echo issueEmail
}
}

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events