Value

Given a SQL for JIRA query, it shows the first column in the SELECT clause on a Text custom field by replacing the ? symbol with the contextual Issue Key.

For example:

select c.body as "Last Comment"
from issues i inner join issuecomments c on c.issueid=i.id
where i.key=${id} order by c.updated desc limit 1


The SQL query must be defined in the Custom Field Description when it is created:

It can be modified by clicking on the Edit option of the Custom Field:

The custom field is not editable by the users, therefore just the same SQL query is shared among all the issues.

If it has not been defined as read only and a user tries to edit it, then the "No editable filed" message below will be shown:

And the SQL query will remain un-modified regardless the user's action.