JIRA Table Grid Editor issue picker

David Frager _gmail_ June 24, 2014

Is it possible to use the Table Grid custom Field, and have one of the columns contain a list of JIRA issues from another project, but be selectable and validated via an issue picker query?

I realize that I can manually enter each of the issues into the table, but I would like to have some type of validation and picker capability to assist with data entry

I have a project to store Customer Initiatives (CI). Within each project, I would like to have a table that has Project Items (PI), along with some specific data on each item, as it related to this specific customer initiative. The data is related to the *linkage* between the CI and the PI and not specific CI or PI item. An example would be:

CI-1

Project Item Data Point 1 Data Point 2

PI-1 U 10

PI-2 C 8

CI-2

PI-1 C 5

PI-3 U 8

1 answer

1 accepted

0 votes
Answer accepted
francis
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 25, 2014

Hi David,

This is certainly possible using a column query in your grid table definition.

Your grid configuration would be something like

##################
# Grid properties
#
gd.columns = projectItem, dataPoint1, dataPoint2
gd.tablename = projectItems
gd.ds = jira


##################
# Define the projectItem column as a list column
# initialized with a particular set of project items
# Assume the project with project items has id 10002
# and also assume JIRA 5, as the project key in JIRA 6 is 
# calculated differently
#

col.projectItem			 =	Project Item
col.projectItem.type	         =	list
col.projectItem.query	 = 	select pkey, summary from jiraissues where project = 10002 order by pkey
col.projectItem.query.ds   =     jira


######################
# Define the other columns

col.dataPoint1 			 = Data Point 1
col.dataPoint1.type		 = string


col.dataPoint2 			 = Data Point 2
col.dataPoint2.type		 = string

David Frager _gmail_ June 25, 2014

This is a good start. I will play with the data a little more. Once I Select the project Item from the list, is there a way to capture the summary of that item into the table as well?

David Frager _gmail_ June 25, 2014

here is one of my attempts to also show the JIRA issue summary next to the pkey that was selected from the list. This does not display the value. Can you provided feedback if this approach is possible?

##################
# Grid properties
#
gd.columns = projectItem, psummary, commitment
gd.tablename = projectItems
gd.ds = jira


##################
# Define the projectItem column as a list column
# initialized with a particular set of project items
# Assume the project with project items has id 10002
# and also assume JIRA 5, as the project key in JIRA 6 is
# calculated differently
#

col.projectItem = Project Item
col.projectItem.type = list
col.projectItem.query = select pkey, summary from jiraissue where project = 10304 order by pkey
col.projectItem.query.ds = jira
col.psummary = summary
col.psummary.editable = false

######################
# Define the other columns

col.commitment = Commitment
col.dataPoint1.type = string

David Frager _gmail_ June 25, 2014

The only approach that I found that works, and this may not be a bad option is to concatenat the pkey and summary in the SQL Select. The benefit is that this does give a much more informative pull down.

col.projectItem.query = select pkey + ' - ' + summary from jiraissue where project = 10304 order by pkey

francis
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 26, 2014

Correct - I did make a mistake in the column query.
The first attribute in the query is interpreted is the label showed in the select list, the second is the value. Both (label and value) are stored in the grid table.

So you are right
col.projectItem.query = select pkey + ' - ' + summary, id from jiraissue where project = 10304 order by pkey

Would show the user the pkey and summary and store this with the id in the attributes (projectitem_name, projectitem)

Additionally you can also use list values in other columns.

If you would have an additional column 'reporter' with following configuration

col.projectitem.query = select pkey + " - " + summmary, id, reporter from jiraissue ...

col.reporter = Reporter
col.reporter.type = string
col.reporter.formula = {projectitem.reporter}

the reporter column would get automatically the corresponding value.

laralg
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 10, 2019

Hey @francis a bit late to the party but can this issue picker select list be multiselect or only single select?

Thanks!

Suggest an answer

Log in or Sign up to answer