How to build a column containing a list of project components

Introduction 

How to create a list column containing only the components of the containing issue project.

Solution

Assume you are creating a grid which contains a component column. This column should list all the
components of the project which contains the surrounding issue.

 

The configuration you can use is as follows

 

col.icomponent=Component col.icomponent.name=component col.icomponent.type=list col.icomponent.query=select cname, id from component c inner join project p on c.project = p.id on where p.key = {0} col.icomponent.query.parameters = project:key col.icomponent.query.ds=jira col.icomponent.required=true col.icomponent.autocomplete=true col.icomponent.width= 75

 

The project.key is initialized to the value of the project key of the contaiining issue.
This value is injected into the query using the col.icomponent.query.parameters parameter.