issue status relate workflow

Hi, I trying to understand which projects using statuses from database. I I thought it's real ability to know from workflow_id of table jiraissue, but i was wrong. Could you help me please? 

1 answer

1 accepted

1 vote
Accepted answer

Two things:

  1.  Why?  The database is not intended to be used directly, and there is almost certainly a much better way of doing whatever it is you are trying to achieve
  2. If you insist on doing it the hard way, you'll need to read the project config tables for the workflow scheme in use, compare that with the issue type scheme to work out which workflows are actually used, then parse each workflow xml in turn to get a list of all the status ids, then read the status table to work out the labels for them. 


I thought those links there are in tables and i can get those data with help select's.

Technically, yes, it's all in tables, but it's not a direct relationship and some of the data is stored in blocks, not normalised in any way, so you can't just use SQL to get to it.

That brings me back to "why"?  What are you trying to achieve here?

Just statistic reports.

I have more then 100 statuses and users 5000+

Then you're doing it wrong.  You really shouldn't be touching the database.

What "statistics" are you trying to get to?

I just wanted to know what statuses using in projects.

That's not a statistic, that's a configuration thing and it's a one-off.  Look at the project's setup to get that, it's easier than trying to read the database.

I have more then 200 project.

So, anyway, thx for your reply smile

We could still help you with statistics, if you could tell us what you actually want.

I want to delete some statuses. So I do that, if I write sql query where I see more important statuses that are used on projects.

Right, well, that's "current usage" which is a statistic.  The status that a project uses is not necessarily the same as what is currently in use. 

It's also very easy to get to (unless you do it via the database, where it remains a bit of a pig, albeit a little easier than the original question)

Start a new filter, and blank it out.  Save it with a name like "all issues".  Go to your dashboard and add a filter statistics gadget, selecting "status" as the reporting variable and "all issues" for the filter.  You now have a list of all status that are in use, and by how many issues.

Do we have a LIKE button to like comments from Nic?

Nic, this is exactly what I need

It's not perfect, the gadget will drop lines where the total count is 0, but you can at least see the low usage ones, and you can use it to compare with the full list of status (if it's not on the gadget, then it's used by 0 issues and can be killed off.  Or at least, check the workflow its using!)

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 09, 2018 in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

214 views 6 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you