Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Issue Links
Let's say you want to link the current issue to another issue that you select. Using Power Custom Fields™ you can do this easily.
Considering we have a PCF - Single Select configured with one SIL Data Source, one Selection script file, minimum characters for autocomplete set to 5 and the maximum results number set to 50. We want to select an issue using its key or summary. You can see the custom field in the picture below:
![](https://appfire.atlassian.net/wiki/download/thumbnails/15481822/5.png?version=1&modificationDate=1633036509745&cacheVersion=1&api=v2&width=680)
For this example we used the following SIL data source.
Code Block |
---|
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 select script used is:
Code Block |
---|
KPOption[] selectedOption = customfield_12209; linkIssue(key, selectedOption[0].value, "Relates"); |
It creates a link of the "Relates" type between the current and the selected issue.
![](https://appfire.atlassian.net/wiki/download/thumbnails/15481822/4.png?version=1&modificationDate=1633036508189&cacheVersion=1&api=v2&width=618)
![](https://appfire.atlassian.net/wiki/download/thumbnails/15481822/4.png?version=1&modificationDate=1633036508189&cacheVersion=1&api=v2&width=612)
Note |
---|
Note that you'll have to use the name of the link issue, as you find it on the Issue linking page (in our case, "Relates" and not "relates to"). In order to do this, you can use argv["query"] only if you set the Filtering Strategy (from Autocomplete settings) to Datasource. |
See More
Child pages (Children Display) | ||
---|---|---|
|