Hello, i'm trying to extract from the jira db a customfield information for each issue, everything is good when the information is 'stored' in the stringvalue (customfieldvalue table)
SELECT
CONCAT(p.pkey, '-', ji.issuenum) AS Issue, cfo.customvalue as Customer
FROM
jiraissue ji,
project p,
jiradb.customfield cf, jiradb.customfieldvalue cfv , jiradb.customfieldoption cfo
WHERE
p.pname = 'pname' AND cfo.CUSTOMFIELD='field'
AND ji.project = p.id
AND ji.id = cfv.issue
AND cfv.customfield = cf.id
AND cast(cfv.stringvalue as integer) = cfo.id;
i use a query like that and i get what i need.
for another custom field i noticed that the stringvaule and textvalue is null, and the info is in the numbervalue (customfieldvalue table)

if i use the query above it returns 0 rows, ive tried also another couple of modification and always get no results. Anyone can help me please?