Versions Compared

Key

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

...

Code Block
languagesql
SELECT 		CF.cfname, count(CV.ISSUE) 
FROM 		customfield CF 
JOIN 		customfieldvalue CV on CF.ID = CV.CUSTOMFIELD
GROUP BY 	CF.cfname


Return

...

Code Block
languagesql
SELECT screen.name 
FROM fieldscreenlayoutitem layoutItem 
INNER JOIN fieldscreentab tab 	on layoutItem.fieldscreentab = tab.id
  INNER JOIN fieldscreen screen on tab.fieldscreen = screen.id
  WHERE fieldidentifier = 'priority'

Return remote links (other Jiras,Confluence,Websites) and what page they're on

Code Block
languagesql
SELECT p.pkey||'-'||j.issuenum as Key, a.title, a.url,
       a.iconurl, a.icontitle, a.relationship, a.applicationtype, a.applicationname
  FROM remotelink a
  JOIN jiraissue j on a.issueid=j.id
  JOIN project p on j.project = p.id

Return screens where a given field is used

Code Block
languagesql
SELECT
    screen.name,
    layoutitem.fieldidentifier
FROM
    fieldscreenlayoutitem   layoutitem
    INNER JOIN fieldscreentab          tab ON layoutitem.fieldscreentab = tab.id
    INNER JOIN fieldscreen             screen ON tab.fieldscreen = screen.id
WHERE
    layoutitem.fieldidentifier IN ('priority','customfield_16165')


Return saved filters that have a given

...

field set as a column

Code Block
SELECT SR.filtername, CLI.fieldidentifier 
FROM columnlayoutitem    CLI
INNER JOIN columnlayout  CL  ON CLI.columnlayout = CL.id
INNER JOIN searchrequest SR  ON CL.searchrequest = SR.id
WHERE CLI.fieldidentifier IN ('summary','customfield_16165'); --'supervisor' custom field

...