Forums

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

Maintain separate database(row->jira issue) and periodically refresh it according to jira changes

Disha Trivedi
April 27, 2023

I have a requirement where I need to pull data for all the issues across all the projects and store it in a database where each row represents and issues and columns could look like [project, issue_type, status, summary, assigne, reporter,etc].

This database needs to be refreshed periodically so that if new issues are created, then add their corresponding rows or update the rows corresponding to the issues that have been updated.

I can think of two ways to solve this:
1. python script querying jira api:
I already have a python script which pulls data from all the issues across all the projects in a similar format and stores it in a csv. However, the script takes 1-2 hours to run. And wouldn't be very ideal for my use case, as I'll have to query all the tickets everytime since I wouldn't have any other way to figure out which issues were added/updated. Another issue with this method is that we won't get the latest data unless queried right after the db was updated.

2. Jira automation rules:
I can create an automation rule with a scope across all the projects, and figure out the triggers on which I'll trigger this rule. However, I'm not sure if its possible to insert data to some external database using jira automation rules. Moreover, does it support python scripting?

Will scriptrunner be of any help in my requirement?

Please advice on the best way to get this done. Your help is much appreciated, thanks!

1 answer

0 votes
Tarun Sapra
Community Champion
June 13, 2018

Hello @Deepak Sandilya

Currently, your requirement is an open ticket- https://jira.atlassian.com/browse/BAM-2537

Deepak Sandilya
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!
June 14, 2018

Thank you Tarun. Is there any other ways that we can use by the time the requirement gets fulfilled?

Tarun Sapra
Community Champion
June 14, 2018

You can trigger a REST call to create a issue in JIRA in case of build failure.

Sandilya Deepak
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!
June 14, 2018

Yeah, But is there any utility which helps to get the exit status of the build to make the decision on Success vs Failure to create the ticket.

Chris Johnston
Contributor
June 15, 2018

You could create a parallel stage that periodically checks the status of the primary job and once it's either completed or failed, create your ticket and finish as appropriate.

http://<server>/bamboo/rest/api/latest/result/<projkey>?buildstate
Markus_Stier
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!
October 2, 2018

Couldn't you just send an E-Mail notification to jour Jira server?

At Plan Configuration/Notifications there are several events which could be used.

Maybe if you'd use a Jira plugin like "Power Scripts" to parse the contents of the mail you could even create an issue in the appropriate project.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events