Forums

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

Querying the Current JIRA Database

Adolfo Casari
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.
November 24, 2016

I am running the query quoted here:

Querying the Current JIRA Database

in Script Console, but I get: null

Scriptrunner version is 3.1.4

JIRA 6.4.9

Thanks in advance,

2 answers

1 accepted

0 votes
Answer accepted
Adolfo Casari
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.
November 24, 2016

Looks that the Script Console only show results if you use return in the code, so instead of:

log.debug sb.toString()

I use

return sb.toString()

to show the results of the query.

0 votes
Jeff Louwerse
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.
November 24, 2016

Personally I use the built in method to query JIRA's internal tables .  They replacing your connection declaration with this one.  I cant say for sure it will work as it as I use pure java implementation.

import com.atlassian.jira.ofbiz.DefaultOfBizConnectionFactory; 
Connection conn = new DefaultOfBizConnectionFactory().getConnection();

 

 

 

 

 

 

 

Adolfo Casari
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.
November 24, 2016

Thanks. Tried that but I still get null.

Like Francisco Savignone likes this

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events