Forums

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

Is there any way to Directely connect to Jira Database instead of API's if so How we do that?

Hari Gudladona February 5, 2018

Is there any way to Directely connect to Jira Database instead of API's if so How we do that?

2 answers

0 votes
Herve_Foko February 5, 2018

you can connect directly to the database with some plugin that offer the option, in this case, you don't really needs Database credential to connect, but still needs JIRA admin access to use those feature. As Nic asked, it would be important to tell us exactly what you are trying to achieve, cause you might not need it.  

Hari Gudladona February 5, 2018

I'm trying to get worklogs for all the issues using rest api "/rest/api/2/issue/${issue.id}/worklog". 

After few hits api server is going idle, there is no response from the server. 
Why am i unable to get worklogs for the all issues in one go? 
Sometimes, I'm getting worklogs for 5 to 10 issues only, later the server is going idle.

Here is my code
worklogs = []
//looping through issues to get worklog of a particular issue
for (issue of issues) {
let worklogData = await axios(`/rest/api/2/issue/${issue.id}/worklog`, requestObj)
for (worklog of worklogData.data.worklogs) {
console.log('worklog');
worklogs.push(worklog)
}
}

This is why I thought of connecting directly to the jira database and get the data with out using apis

Kindly help me with this.

Herve_Foko February 6, 2018

Which script are you using ? is it groovy[scriptrunner] ? or something else ?

Hari Gudladona February 9, 2018

we are using Node.js

0 votes
Nic Brough -Adaptavist-
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.
February 5, 2018

If you are on server, then yes, but don't do it.

The Jira database is a data store.  It is not designed for reporting, even the most simple question like "show me an issue" can result in queries needing hundreds of joins, and it absolutely cannot be updated by systems outside Jira.

So, don't.   Please use the APIs

What are you trying to do though?

Hari Gudladona February 5, 2018

I'm trying to get worklogs for all the issues using rest api "/rest/api/2/issue/${issue.id}/worklog".

After few hits api server is going idle, there is no response from the server.
Why am i unable to get worklogs for the all issues in one go?
Sometimes, I'm getting worklogs for 5 to 10 issues only, later the server is going idle.

Here is my code
worklogs = []
//looping through issues to get worklog of a particular issue
for (issue of issues) {
let worklogData = await axios(`/rest/api/2/issue/${issue.id}/worklog`, requestObj)
for (worklog of worklogData.data.worklogs) {
console.log('worklog');
worklogs.push(worklog)
}
}

This is why I thought of connecting directly to the jira database and get the data with out using apis

Kindly help me with this.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events