How to get the Mapping between Workflow, Issue Status and project?

TAGNAOUTI Khaoula September 19, 2019

Hello everybody,

There is any database table in JIRA has the mapping information between workflow, Issue Status and project?

I checked the database but I didn't find a table with this association.

Could you please help me for this issue?

4 answers

2 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 19, 2019

You'll need a hideous join between project, a load of tables with "scheme" in the name, some more tables with os_ as a prefix, a couple with workflow and then jiraissue.

Please, don't try to read the database, it's the worst possible way to get information from Jira.

Could you explain what you are trying to achieve, we can almost certainly give you a much better way to do it than SQL?

TAGNAOUTI Khaoula September 20, 2019

Thank you for your return.

In fact, hte user has closed same issues without informing the closing date, I want making a script to fill the closing date by the resolution date, in "post-function" of workflow.

To do this, I need first the "workflows" that correspond to the issues having the "closed status"

Mohamed Adel
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.
September 20, 2019

@TAGNAOUTI Khaoula,

If you mean to get  the associated workflow with a specific status it is easy to get this information from the issue status page
- Choose Admin > Issues

- Select Statuses to open the 'Statuses' page.


Then you can get the associated workflow with close status

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 20, 2019

It is going to be easier to do this in the UI than with torturous SQL.

The short version is "look at the project(s) configuration to see what workflows are in use"

The longer version:

Run a search that finds all the issues you are interested in and save it (probably something like "status = closed and resolution date is empty"

Add a dashboard gadget for "filter statistics" and tell it to look at your filter.  Select "project" first to see what projects you need to look at, then maybe issue type to see what types are in use

For each project, look at the "workflow scheme", which tells you what workflow is being used by each issue type

0 votes
Mohamed Adel
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.
September 19, 2019

I totally agree with @Nic Brough -Adaptavist-  as direct connection to read JIRA db will have a sever performance issue on JIRA Server.

I recommend Power Admin plugin it can give you this information.

0 votes
laralg
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.
September 19, 2019

Hi Ariana,

It is a bit hard to navigate Jira's database because you have to take into account the schemas, which are the ones that really relate everything to the projects. I am not sure what you are trying to achieve some information is stored in weird tables.

In case this is of help, you can checkout Jira's tables relationsships here https://developer.atlassian.com/server/jira/platform/database-schema/

 

regards

0 votes
Joe Pitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 19, 2019

I would look for a plugin

Suggest an answer

Log in or Sign up to answer