Affects Version/s: 6.21.0
Fix Version/s: None
Component/s: Scripted Fields
Users are able to successfully display "Text Field (multi-line)" Script Field data in dashboard gadgets (e.g. pie chart or two-dimensional filter) when they configure it to be “Free Text Searcher (Stattable)" by navigating to the Issues > Custom Fields > Edit screen.
However, as implied by the image in our Script Fields documentation, users are not able to display data in their dashboard gadgets when they configure their Script Fields to be “Exact Text Searcher (Stattable)"
In the example below, we demonstrate how to reproduce this problem using a Scripted Field which returns issue.getIssueType().name and displays the information in a pie chart dashboard gadget.
Using: ScriptRunner 6.21.0 | Jira 8.15.0
- Create a simple JQL filter. E.g. "project = ABC"
- Create a ScriptRunner "Custom Script Field"
- Configure the SF to return a "Text Field (multi-line)", using issue.getIssueType().name as the return value.
- Configure contexts and screens.
- Navigate to Issues > Custom Fields > Your Custom Field > Edit. Select "Exact Test Searcher (Stattable) as the Search Template.
- Perform a background re-index.
- Create a pie chart dashboard gadget.
- Set the filter as described above and set the "Statistic Type" to be the Script Field that you created earlier.
The pie chard displays all issue types for the given project in a pie chart.
Use "Free Text Searcher (Stattable)" instead.
Ensure you perform a background re-index after making the change to the Custom Field.