I am trying to set a relationship between Workflows and Issue types. I did get it to a certain extent. Thanks to Community. However, I am unable to get the unassigned issuetypes in the table result.
Below is the script I have used. It would be great if anyone can advice n how to get unassigned issuetypes too in the picture
select distinct workflow,pname from workflowschemeentity w
join nodeassociation n on n.sink_node_id=w.scheme
join issuetype it on w.issuetype=it.ID
You won't be able to "get" unassigned issue types, there is nothing in the database for them. You'll have to infer it from the absence of data.
This is one of many reasons that using SQL on a Jira database is by far the worst way to get any information out of it.
Instead of messing around with a data structure that has no relations (because they are all done in the code, not the data), could you explain what you are trying to achieve? We can almost certainly give you a better way to do it than "read it with SQL"
@Nic Brough -Adaptavist- I am trying to get the list of workflows and the associated Workflows in a table using SQL Query
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That does not tell us what you are trying to achieve, you've just repeated you're trying to do something in a bad way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Without having access to my Jira instance right now my guess is this might help:
select distinct workflow, pname
from issuetype it
left join workflowschemeentity w
on w.issuetype = it.id
I don’t know what the table nodeassociation in your script does and right now I cannot test it. Basically a “left join” says take everything from the left table (issuetype) and look for a match in the right table (workflowschemeentity). If you don’t find something in the right right table keep the left value and assume right to be empty (null).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I really appreciate your response. A big thanks. I tried this out. It gives a result to a certain level.the unassigned issue types is showing up(This is good), However, the corresponding workflows for the unassigned issue types are not being shown up. It shows NULL. is there any way we can capture them too?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @HaRsHaS' V
that is as I described. When a left join does not find anything on the right side the result shows NULL. Maybe you can provide some screenshots of your configuration and a mock-up of the results you expect. The I can try to understand the underlying data structure in the database and post a SQL query. It may take a few days for me to squeeze you in...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Florian , Thanks I will send the details to you. Thanks, I was occupied with something else and was not able to look into this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.