Dear all,
I want to query the Jira database to get all the issues (from the jiraissue table) and group them by request type.
After some research I found that the customer request type of an issue is the STRING VALUE in the customerfieldvalue table. I have noticed that the pre-configured customer request type STRING values are in text, e.g. nmits/newhardware while the configured customer request type are in the form of a GUID (e.g. nmits/e05d7597-63b2-4c0a-aff3-e56222353136).
So to get what I want all issues grouped by customer request type I have to create a table with mappings from the nmits/e05d7597-63b2-4c0a-aff3-e56222353136 to a text value. Meaning that I have to add a third table to the below query.
SELECT STRINGVALUE, COUNT(*) FROM jiraissue i
LEFT JOIN customfieldvalue crt
ON i.id = crt.ISSUE
GROUP BY STRINGVALUE
Am I correct or is there an easier way?