Issue Custom Fields

ISSUECUSTOMFIELDDEFINITIONS

Column

ID

NAME

TYPEDESCRIPTION

Type

BIGINT

VARCHAR

VARCHARVARCHAR

Indexed

x

x




ISSUECUSTOMFIELDVALUES

Column

ISSUEID

CUSTOMFIELDID

VALUE

Type

BIGINT

BIGINT

VARCHAR

Indexed

x

x



Permissions

Since the 5.2.3 version only Jira administrators can list all the custom fields defined on Jira and their descriptions.

Regular Jira users can only view names and ids of a given custom field only.



The two tables above replace the older ISSUECUSTOMFIELDS table. The newer tables bring a lot of benefits:

  • Better performance
  • Dynamic (it is no longer required re-start the plugin if a new custom field is added, modified or removed by JIRA or a third party plugin)
  • Custom fields' original names preserved


Since the 6.1.0 version a new Custom Fields - related table is supported: ISSUECUSOMTFIELDOPTIONS


ISSUECUSTOMFIELDOPTIONS

Column

CUSTOMFIELDID

OPTIONID

OPTIONDISABLED

OPTIONVALUE

SUBOPTIONID

SUBOPTIONDISABLED

PARENTOPTIONID

SUBOPTIONVALUE

Type

BIGINT

BIGINT

BOOLEAN

VARCHAR

BIGINT

BOOLEAN

BIGINT

VARCHAR

Indexed

x








It allows to read all the possible values for custom fields based on lists.


Example 1

Getting all the custom fields

select 
     KEY(JQL.ISSUE) as "Issue", 
     cfd.NAME as "Custom field", 
     cfv.VALUE as "Custom field value" 
from 
     JQL
         inner join
     ISSUECUSTOMFIELDVALUES cfv on cfv.ISSUEID = JQL.ISSUEID
         inner join
     ISSUECUSTOMFIELDDEFINITIONS cfd on cfd.ID = cfv.CUSTOMFIELDID 
where 
     JQL='reporter=currentUser()'

Example 2

Old style

The query above returns one record per custom field. You might want to build a report with one only record (line) per issue and each custom field as column (this is the  way that the deprecated ISSUECUSTOMFIELDS table worked). You might want to report issues in JIRA Agile/Software displaying two custom fields as columns: Sprint (10005) and Story Point(10100), then the ISSUUECUSTOMFIELDVALUES has to be joined one per custom field:

select
       key(JQL.issue) as "Issue",
       cfv1.value as "Sprint",
       cfv2.value as "Story Point" 
from 
       JQL
           join 
       issuecustomfieldvalues cfv1 on cfv1.customfieldid = 10004 and cfv1.issueid = JQL.issueid 
           join 
       issuecustomfieldvalues cfv2 on cfv2.customfieldid = 10006 and cfv2.issueid = JQL.issueid
where 
      JQL.query ='reporter = currentUser()'


Note please, that the query uses LEFT (OUTER) JOIN to include issues with null values for the Sprint or the Story Point and the conditions on the customfieldid indexed column are set on the JOIN condition instead of the WHERE clause.

New style

The query above can be optimized a lot with the CF() function to extract data from the JQL.issue object:


select
       key(JQL.issue) as "Issue",
       cf(JQL.ISSUE, 10004) as "Sprint",
       cf(JQL.ISSUE, 10006) as "Story Point" 
from 
       JQL
where 
      JQL.query ='reporter = currentUser()'

Writing queries independent of the Jira instance

Many organizations have different environments for their life cycle (development, staging, production, etc). And the custom field ids can be different in each instance. However, it is possible to re-write the query above to be use the custom field names instead of their ids. See how:

First, build a view with the ids of each targeted custom field:

select 
    cfd1.id as "Sprint Id", 
    cfd2.id as "Story Points Id"
from 
    issuecustomfielddefinitions cfd1 
       join
    issuecustomfielddefinitions cfd2 
where 
    cfd1.name = 'Sprint' 
       and
    cfd2.name = 'Story Points'

In the query above the same ISSUECUSTOMFIELDDEFINITONS table is joined twice without any constraint (JOIN... ON). The database engine will perform all the MxN combinations, but in this particular case this is not a problem as it is a 1x1 combination which will perform good.

Now, build a new view as combination of the table above with all the records of your JQL:

select 
        * 
from
	(select 
		cfd1.id as "Sprint Id", 
		cfd2.id as "Story Points Id"
	from 
		issuecustomfielddefinitions cfd1 
		   join
		issuecustomfielddefinitions cfd2 
	where 
		cfd1.name = 'Sprint' 
		   and
		cfd2.name = 'Story Points')
	join
	(select *
	   
	from
		JQL
	where
		JQL.query = 'project SSP'
	)
Sprint Id  Story Points Id  ISSUE  
1000410006Document<stored,indexed stored,indexed stored,omitNorms<customfield_10004_changes:34;2019-01-21t09:18:06.470+01:00;a> stored,indexed,tokenized stored,indexed,tokenized stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000ev:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms>></customfield_10005:0|i000ev:></customfield_10004_changes:34;2019-01-21t09:18:06.470+01:00;a></stored,indexed
1000410006Document<stored,indexed stored,indexed stored,omitNorms<customfield_10004_changes:34;2019-01-21t09:18:06.470+01:00;a> stored,indexed,tokenized stored,indexed,tokenized stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000en:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms>></customfield_10005:0|i000en:></customfield_10004_changes:34;2019-01-21t09:18:06.470+01:00;a></stored,indexed
1000410006Document<stored,indexed stored,indexed stored,omitNorms<customfield_10004_changes:34;2019-01-21t09:18:06.469+01:00;a> stored,indexed,tokenized stored,indexed,tokenized stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000ef:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms,Z> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms,Z> stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms>></customfield_10005:0|i000ef:></customfield_10004_changes:34;2019-01-21t09:18:06.469+01:00;a></stored,indexed
1000410006Document<stored,indexed stored,indexed stored,omitNorms<customfield_10004_changes:34;2019-01-21t09:18:06.466+01:00;a> stored,indexed,tokenized stored,indexed,tokenized stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000e7:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms>></customfield_10005:0|i000e7:></customfield_10004_changes:34;2019-01-21t09:18:06.466+01:00;a></stored,indexed
1000410006Document<stored,indexed stored,indexed stored,omitNorms<customfield_10004_changes:34;2019-01-21t09:18:06.466+01:00;a> stored,indexed,tokenized stored,indexed,tokenized stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000dz:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms>></customfield_10005:0|i000dz:></customfield_10004_changes:34;2019-01-21t09:18:06.466+01:00;a></stored,indexed
1000410006Document<stored,indexed stored,indexed stored,omitNorms<customfield_10004_changes:34;2019-01-21t09:18:06.464+01:00;a> stored,indexed,tokenized stored,indexed,tokenized stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000dr:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms>></customfield_10005:0|i000dr:></customfield_10004_changes:34;2019-01-21t09:18:06.464+01:00;a></stored,indexed
1000410006Document<stored,indexed stored,indexed stored,omitNorms<customfield_10004_changes:33;2019-02-04t10:28:06.464+01:00;a> stored,indexed,tokenized> Click the "SSP-17" link and read the description tab of the detail view for more> stored,indexed,tokenized> Click the "SSP-17" link and read the description tab of the detail view for more> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,tokenized<description:*to delete="" this="" sample="" project="" _(must="" be="" performed="" by="" a="" user="" with="" administration="" rights)_*="" -="" open="" the="" interface="" to="" projects="" page="" using="" keyboard="" shortcut="" 'g'="" then="" and="" typing="" 'projects'="" in="" search="" dialog="" select="" "delete"="" link="" for="" "sample="" scrum="" project"="" *to="" workflow="" scheme="" schemes="" 'workflow="" schemes'="" "ssp:="" software="" simplified="" scheme"="" go="" workflows="" 'workflows'="" dialog(_ondemand="" users="" should="" second="" match="" workflows_)="" expand="" "inactive"="" section="" "software="" ssp"="" board="" owner="" of="" or="" an="" administrator)_*="" click="" "tools"="" cog="" at="" top="" right=""> stored,indexed,tokenized<pq_support_description:*to delete="" this="" sample="" project="" _(must="" be="" performed="" by="" a="" user="" with="" administration="" rights)_*="" -="" open="" the="" interface="" to="" projects="" page="" using="" keyboard="" shortcut="" 'g'="" then="" and="" typing="" 'projects'="" in="" search="" dialog="" select="" "delete"="" link="" for="" "sample="" scrum="" project"="" *to="" workflow="" scheme="" schemes="" 'workflow="" schemes'="" "ssp:="" software="" simplified="" scheme"="" go="" workflows="" 'workflows'="" dialog(_ondemand="" users="" should="" second="" match="" workflows_)="" expand="" "inactive"="" section="" "software="" ssp"="" board="" owner="" of="" or="" an="" administrator)_*="" click="" "tools"="" cog="" at="" top="" right=""> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000dj:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms></customfield_10005:0|i000dj:></pq_support_description:*to></description:*to></customfield_10004_changes:33;2019-02-04t10:28:06.464+01:00;a></stored,indexed
1000410006Document<stored,indexed stored,indexed stored,indexed stored,indexed stored,omitNorms<customfield_10004_changes:34;2019-01-21t09:18:06.456+01:00;a> stored,omitNorms<customfield_10004_changes:33;2019-02-04t10:28:06.457+01:00;a> stored,indexed,tokenized> Try closing this sprint now> stored,indexed,tokenized> Try closing this sprint now> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000db:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms></customfield_10005:0|i000db:></customfield_10004_changes:33;2019-02-04t10:28:06.457+01:00;a></customfield_10004_changes:34;2019-01-21t09:18:06.456+01:00;a></stored,indexed
1000410006Document<stored,indexed stored,indexed stored,omitNorms<customfield_10004_changes:33;2019-02-04t10:28:06.456+01:00;a> stored,indexed,tokenized> Click "Reports" to view the Burndown Chart> stored,indexed,tokenized> Click "Reports" to view the Burndown Chart> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000d3:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms></customfield_10005:0|i000d3:></customfield_10004_changes:33;2019-02-04t10:28:06.456+01:00;a></stored,indexed
1000410006Document<stored,indexed stored,indexed stored,omitNorms<customfield_10004_changes:33;2019-02-10t15:28:06.455+01:00;a> stored,indexed,tokenized> Try clicking the "Only My Issues" Quick Filter above> stored,indexed,tokenized> Try clicking the "Only My Issues" Quick Filter above> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,tokenized<description:*creating quick="" filters*="" you="" can="" add="" your="" own="" filters="" in="" the="" board="" configuration="" (select="" *board=""> Configure*)> stored,indexed,tokenized<pq_support_description:*creating quick="" filters*="" you="" can="" add="" your="" own="" filters="" in="" the="" board="" configuration="" (select="" *board=""> Configure*)> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000cv:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms></customfield_10005:0|i000cv:></pq_support_description:*creating></description:*creating></customfield_10004_changes:33;2019-02-10t15:28:06.455+01:00;a></stored,indexed
1000410006Document<stored,indexed stored,indexed stored,omitNorms<customfield_10004_changes:33;2019-02-04t10:28:06.455+01:00;a> stored,indexed,tokenized> Click the "SSP-13" link at the top of this card to open the detail view> stored,indexed,tokenized> Click the "SSP-13" link at the top of this card to open the detail view> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,tokenized<description:*editing using="" the="" detail="" view*="" many="" of="" fields="" in="" view="" can="" be="" inline="" edited="" by="" simply="" clicking="" on="" them.="" for="" other="" you="" open="" quick="" edit,="" select="" "edit"="" from="" cog="" drop-down.=""> stored,indexed,tokenized<pq_support_description:*editing using="" the="" detail="" view*="" many="" of="" fields="" in="" view="" can="" be="" inline="" edited="" by="" simply="" clicking="" on="" them.="" for="" other="" you="" open="" quick="" edit,="" select="" "edit"="" from="" cog="" drop-down.=""> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000cn:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms></customfield_10005:0|i000cn:></pq_support_description:*editing></description:*editing></customfield_10004_changes:33;2019-02-04t10:28:06.455+01:00;a></stored,indexed
1000410006Document<stored,indexed stored,indexed stored,omitNorms<customfield_10004_changes:33;2019-02-08t19:55:06.455+01:00;a> stored,indexed,tokenized> Drag this task to "Done" too> stored,indexed,tokenized> Drag this task to "Done" too> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000cf:$0|i0007z:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms></customfield_10005:0|i000cf:$0|i0007z:></customfield_10004_changes:33;2019-02-08t19:55:06.455+01:00;a></stored,indexed
1000410006Document<stored,indexed stored,indexed stored,omitNorms<customfield_10004_changes:33;2019-02-07t22:30:06.455+01:00;a> stored,indexed,tokenized> Try dragging this task to "Done"> stored,indexed,tokenized> Try dragging this task to "Done"> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000cf:$0|i0007r:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms></customfield_10005:0|i000cf:$0|i0007r:></customfield_10004_changes:33;2019-02-07t22:30:06.455+01:00;a></stored,indexed
1000410006Document<stored,indexed stored,indexed stored,omitNorms<customfield_10004_changes:33;2019-02-04t10:28:06.454+01:00;a> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,tokenized stored,indexed,tokenized stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000cf:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms></customfield_10005:0|i000cf:></customfield_10004_changes:33;2019-02-04t10:28:06.454+01:00;a></stored,indexed
1000410006Document<stored,indexed,tokenized> Click the Active sprints link at the top right of the screen to go to the Active sprints where the current Sprint's items can be updated> stored,indexed,tokenized> Click the Active sprints link at the top right of the screen to go to the Active sprints where the current Sprint's items can be updated> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000c7:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms></customfield_10005:0|i000c7:></stored,indexed,tokenized
1000410006Document<stored,indexed,tokenized> Bugs like this one will also appear in your backlog but they are not normally estimated> stored,indexed,tokenized> Bugs like this one will also appear in your backlog but they are not normally estimated> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,tokenized<description:*estimation of="" bugs*="" scrum="" teams="" do="" not="" normally="" apply="" story="" point="" estimates="" to="" bugs="" because="" are="" considered="" be="" part="" the="" ongoing="" work="" that="" team="" must="" deal="" with="" (i.e="" overhead).="" if="" you="" view="" points="" completed="" in="" a="" sprint="" as="" measure="" progress,="" then="" also="" have="" no="" value="" they="" deliver="" anything="" additional="" customer.="" however,="" can="" wish="" by="" configuring="" "story="" points"="" field="" other="" issue="" types="" (by="" default="" it="" only="" applies="" stories="" and="" epics).="" some="" more="" information="" on="" this="" is="" [documentation|https:="" confluence.atlassian.com="" display="" gh="" story+point].=""> stored,indexed,tokenized<pq_support_description:*estimation of="" bugs*="" scrum="" teams="" do="" not="" normally="" apply="" story="" point="" estimates="" to="" bugs="" because="" are="" considered="" be="" part="" the="" ongoing="" work="" that="" team="" must="" deal="" with="" (i.e="" overhead).="" if="" you="" view="" points="" completed="" in="" a="" sprint="" as="" measure="" progress,="" then="" also="" have="" no="" value="" they="" deliver="" anything="" additional="" customer.="" however,="" can="" wish="" by="" configuring="" "story="" points"="" field="" other="" issue="" types="" (by="" default="" it="" only="" applies="" stories="" and="" epics).="" some="" more="" information="" on="" this="" is="" [documentation|https:="" confluence.atlassian.com="" display="" gh="" story+point].=""> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000bz:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms></customfield_10005:0|i000bz:></pq_support_description:*estimation></description:*estimation></stored,indexed,tokenized
1000410006Document<stored,indexed,tokenized stored,indexed,tokenized stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000br:$0|i0006v:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms></customfield_10005:0|i000br:$0|i0006v:></stored,indexed,tokenized
1000410006Document<stored,indexed,omitnorms stored,indexed,tokenized> Try creating a task by clicking the Sub-Tasks tab in the Detail View on the right> stored,indexed,tokenized> Try creating a task by clicking the Sub-Tasks tab in the Detail View on the right> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,tokenized<description:*task breakdown*="" many="" teams="" choose="" to="" break="" down="" user="" stories="" into="" a="" set="" of="" tasks="" needed="" implement="" the="" story.="" they="" then="" update="" status="" these="" during="" sprint="" track="" progress.="" completion="" last="" task="" signals="" end="" you="" can="" add="" sub-tasks="" story="" on="" sub-task="" tab="" (folder="" icon)="" above.=""> stored,indexed,tokenized<pq_support_description:*task breakdown*="" many="" teams="" choose="" to="" break="" down="" user="" stories="" into="" a="" set="" of="" tasks="" needed="" implement="" the="" story.="" they="" then="" update="" status="" these="" during="" sprint="" track="" progress.="" completion="" last="" task="" signals="" end="" you="" can="" add="" sub-tasks="" story="" on="" sub-task="" tab="" (folder="" icon)="" above.=""> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000br:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms></customfield_10005:0|i000br:></pq_support_description:*task></description:*task></stored,indexed,omitnorms
1000410006Document<stored,indexed,tokenized> Click "Create Sprint" then drag the footer down to select issues for a sprint (you can't start a sprint at the moment because one is already active)> stored,indexed,tokenized> Click "Create Sprint" then drag the footer down to select issues for a sprint (you can't start a sprint at the moment because one is already active)> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,tokenized<description:*starting a="" sprint*="" during="" the="" planning="" meeting="" team="" will="" examine="" stories="" at="" top="" of="" backlog="" and="" determine="" which="" they="" can="" commit="" to="" completing="" coming="" sprint.="" based="" on="" this="" information="" product="" owner="" might="" break="" down="" into="" smaller="" stories,="" adjust="" story="" priorities="" or="" otherwise="" work="" with="" define="" ideal="" sprint="" outcome.="" when="" is="" started="" are="" moved="" backlog.=""> stored,indexed,tokenized<pq_support_description:*starting a="" sprint*="" during="" the="" planning="" meeting="" team="" will="" examine="" stories="" at="" top="" of="" backlog="" and="" determine="" which="" they="" can="" commit="" to="" completing="" coming="" sprint.="" based="" on="" this="" information="" product="" owner="" might="" break="" down="" into="" smaller="" stories,="" adjust="" story="" priorities="" or="" otherwise="" work="" with="" define="" ideal="" sprint="" outcome.="" when="" is="" started="" are="" moved="" backlog.=""> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000bj:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms></customfield_10005:0|i000bj:></pq_support_description:*starting></description:*starting></stored,indexed,tokenized
1000410006Document<stored,indexed,tokenized> Try setting the Story Points for this story in the "Estimate" field> stored,indexed,tokenized> Try setting the Story Points for this story in the "Estimate" field> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,tokenized stored,indexed,tokenized stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000bb:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms></customfield_10005:0|i000bb:></stored,indexed,tokenized
1000410006Document<stored,indexed,tokenized> Try dragging this story up above the previous story> stored,indexed,tokenized> Try dragging this story up above the previous story> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,tokenized<description:*about the="" product="" backlog*="" backlog="" is="" source="" of="" truth="" for="" order="" work="" to="" be="" completed.="" it="" expected="" that="" owner="" will="" with="" team="" make="" sure="" represents="" current="" approach="" delivering="" product.="" jira="" software="" makes="" easy="" prioritise="" (rank)="" stories="" by="" dragging="" them="" up="" and="" down="" backlog.=""> stored,indexed,tokenized<pq_support_description:*about the="" product="" backlog*="" backlog="" is="" source="" of="" truth="" for="" order="" work="" to="" be="" completed.="" it="" expected="" that="" owner="" will="" with="" team="" make="" sure="" represents="" current="" approach="" delivering="" product.="" jira="" software="" makes="" easy="" prioritise="" (rank)="" stories="" by="" dragging="" them="" up="" and="" down="" backlog.=""> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000b3:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms></customfield_10005:0|i000b3:></pq_support_description:*about></description:*about></stored,indexed,tokenized
1000410006Document<stored,indexed,tokenized> Try creating a new story with the "+ Create Issue" button (top right of screen)> stored,indexed,tokenized> Try creating a new story with the "+ Create Issue" button (top right of screen)> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,tokenized stored,indexed,tokenized stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000av:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms></customfield_10005:0|i000av:></stored,indexed,tokenized
1000410006Document<stored,indexed,tokenized> Click the "SSP-1" link at the left of this row to see detail in the Description tab on the right> stored,indexed,tokenized> Click the "SSP-1" link at the left of this row to see detail in the Description tab on the right> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,tokenized<description:*about scrum*="" scrum="" is="" an="" iterative="" approach="" to="" agile="" software="" development.="" the="" methodology="" has="" been="" around="" since="" 1980s="" but="" was="" popularised="" by="" jeff="" sutherland="" and="" ken="" schwaber.="" breaks="" development="" of="" a="" product="" down="" in="" discrete="" iterations="" (termed="" sprints)="" that="" each="" deliver="" functionality="" could="" potentially="" be="" shipped="" users.="" alliance="" offers="" excellent="" [introduction="" scrum|http:="" www.scrumalliance.org="" resources="" 47]="" provides="" overview="" key="" concepts,="" stakeholders,="" processes="" artefacts.=""> stored,indexed,tokenized<pq_support_description:*about scrum*="" scrum="" is="" an="" iterative="" approach="" to="" agile="" software="" development.="" the="" methodology="" has="" been="" around="" since="" 1980s="" but="" was="" popularised="" by="" jeff="" sutherland="" and="" ken="" schwaber.="" breaks="" development="" of="" a="" product="" down="" in="" discrete="" iterations="" (termed="" sprints)="" that="" each="" deliver="" functionality="" could="" potentially="" be="" shipped="" users.="" alliance="" offers="" excellent="" [introduction="" scrum|http:="" www.scrumalliance.org="" resources="" 47]="" provides="" overview="" key="" concepts,="" stakeholders,="" processes="" artefacts.=""> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed<customfield_10005:0|i000an:> stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed stored,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms stored,indexed,omitNorms></customfield_10005:0|i000an:></pq_support_description:*about></description:*about></stored,indexed,tokenized

It's almost done. In the query above there are not join constraints either. This will build all the combinations (MxN) again. However, M is 1 and N are all the records (issues) of the JQL. Therefore, there are performance drawbacks and it will perform good. 

Simply, extract the custom fields value from the issue obects (third column) by using the CF() function:

select 
        key(Issue) as "Issue",
        cf(Issue, "Sprint Id") as "Sprint",
        cf(Issue, "Story Points Id") as "Story Points"
from
	(select 
		cfd1.id as "Sprint Id", 
		cfd2.id as "Story Points Id"
	from 
		issuecustomfielddefinitions cfd1 
		   join
		issuecustomfielddefinitions cfd2 
	where 
		cfd1.name = 'Sprint' 
		   and
		cfd2.name = 'Story Points')
	join
	(select
                issue
	from
		JQL
	where
		JQL.query = 'project = SSP'
	)
Issue  Sprint  Story Points  
SSP-23Sample Sprint 12.0
SSP-22Sample Sprint 12.0
SSP-21Sample Sprint 11.0
SSP-20Sample Sprint 13.0
SSP-19Sample Sprint 15.0
SSP-18Sample Sprint 13.0
SSP-17Sample Sprint 2null
SSP-16Sample Sprint 2, Sample Sprint 12.0
SSP-15Sample Sprint 24.0
SSP-14Sample Sprint 23.0
SSP-13Sample Sprint 2null
SSP-12Sample Sprint 2null
SSP-11Sample Sprint 2null
SSP-10Sample Sprint 25.0
SSP-9null3.0
SSP-8nullnull
SSP-7nullnull
SSP-6null1.0
SSP-5null1.0
SSP-4null5.0
SSP-3null5.0
SSP-2null2.0
SSP-1null2.0

No custom field id is hard coded anywhere. (smile)