Example 2: Link issues using Power Custom Fields
This example demonstrates how to use Power Custom Fields (PCF) to link issues through a PCF - Single Autocomplete configuration using the following parameters:
One data source of type: SIL Data Source
Single script file
Minimum characters for autocomplete: 5
Maximum results: 50
The configuration enables issue selection using either the issue key or summary, as shown in the screenshot below:
The configuration enables issue selection based on issue key or summary through the following SIL data source script:
string [] issues = selectIssues("created < now()");
string [] res;
for (string iss in issues) {
if (contains(iss.summary, argv["query"])) {
res = addElementIfNotExist(res, iss);
}
}
return res;
The argv["query"]
parameter is only used when the Filtering Strategy in the Autocomplete settings tab is set to Data source.
The following select script establishes the relationship between issues:
KPOption[] selectedOption = customfield_12209;
linkIssue(key, selectedOption[0].value, "Relates");
This configuration creates a link type between the current issue and the selected issue. The link type name must match exactly the name displayed on the Issue Linking page.
To find the correct link type name for the script, check the Issue Linking page in Jira administration. Use the system name of the link type, which can differ from its display name in the Jira interface.
Need support? Create a request with our support team.
Copyright © 2005 - 2025 Appfire | All rights reserved.