Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Use caution when querying a JIRA DB directly as heavy queries (e.g. multiple joins) could cause crashes.

Lots of issue related SQL queries page from Atlassian

Return saved filters that contain the text In Post LC

No Format
SELECT a.id, a.filtername, dbms_lob.substr(a.reqcontent, 4000, 1 ) as JQL, a.authorname
  FROM searchrequest a
  WHERE dbms_lob.substr(a.reqcontent, 4000, 1 ) like '%In Post LC%'

...

 

Return who has dashboard 'QTP Overview' as as a favorite

OR who has dashboard with id 12272 as a favorite

No Format
SELECT f.username, p.pagename as Dashboard, p.id
FROM favouriteassociations f
JOIN portalpage p ON f.entityid = p.id 
WHERE f.entitytype = 'PortalPage' 
and p.pagename = 'QTP Overview'
--and f.entityid = 12272

 

Return a user's (biasella) favorite filters

No Format
SELECT si.filtername, dbms_lob.substr( si.reqcontent, 4000, 1 ) as JQL
FROM favouriteassociations fa
JOIN searchrequest si ON fa.entityid = si.id
WHERE fa.username = 'biasella';