On this page

Use case

Generate automatically a link to a JQL query that searches for issues based on information obtained from the current issue.

Configuration

Create a new Calculated Text Field (by JWT) custom field and name it properly.

Providing a description will help you to identify what the custom field does but this step is optional.

Parsing mode

Set the Parsing Mode to Basic text

Parser expression

Add the following expression:

<a href="%{system.baseUrl}/issues/?jql=project=%{issue.project.key} and summary ~ '%{issue.summary}'"> JQL query for %{issue.key}</a>

This expression generates a query that retrieves issues in the same project and with the same summary as the current issue. Note that some special characters are not supported in this query.

Variant for single choice fields

This expression requires the replacement of the field code %{issue.cfaaaaa} and the name of the Select List (single choice) field with the appropriate ones.

<a href="%{system.baseUrl}/issues/?jql=project=%{issue.project.key} and 'Select List (single choice)' = '%{issue.cfaaaaa}'"> JQL query for %{issue.key}</a>

This expression generates a query that retrieves issues in the same project and with the same option in a Select List (single choice) field as the current issue. Note that some special characters are not supported in this query.

Variant for multiple choice fields

This expression requires the Advanced text parsing mode and the replacement of the field code %{issue.cfaaaaa} and the name of the Select List (multiple choices) field with the appropriate ones.

"<a href=\"" + %{system.baseUrl} + "/issues/?jql=project=" + %{issue.project.key} + " and 'Select List (multiple choices)' in (" + toString(textOnStringList(toStringList(%{issue.cfaaaaa}), "'" + %{seed.text} + "'")) + ")\"> JQL query for "+ %{issue.key} + "</a>"

This expression generates a query that retrieves issues in the same project and with the same options in a Select List (multiple choices) field as the current issue. Note that some special characters are not supported in this query.

Add the field to the relevant view screens.

Remember: All calculated fields are read-only and cannot be manually updated on a create or edit screen.





If you still have questions, feel free to refer to our support team.