issue status relate workflow

artafon July 13, 2016

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
Answer accepted
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.
July 13, 2016

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. 

 

artafon July 13, 2016

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

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.
July 13, 2016

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?

artafon July 13, 2016

Just statistic reports.

I have more then 100 statuses and users 5000+

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.
July 13, 2016

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

What "statistics" are you trying to get to?

artafon July 13, 2016

I just wanted to know what statuses using in projects.

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.
July 13, 2016

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.

artafon July 13, 2016

I have more then 200 project.

So, anyway, thx for your reply smile

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.
July 13, 2016

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

artafon July 13, 2016

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.

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.
July 13, 2016

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.

Deleted user July 13, 2016

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

artafon July 13, 2016

Nic, this is exactly what I need

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.
July 13, 2016

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