Information Technology Reference
In-Depth Information
How to do it…
Creating a scripted field is a two-step process. We first need to create an instance of the
custom field in JIRA and then add the script to it:
1. Log in to JIRA as a JIRA administrator.
2. Navigate to
Administration
|
Issues
|
Field Configurations
.
3. Click on the
Add Custom Field
button and select
Advanced
from the dialog box.
4. Scroll down and select
Scripted Field
from the list, and click on
Next
, as shown in
the following screenshot:
5. Name our new custom field
Total Comments
, and add it to the appropriate
screens.
6. Navigate to
Add-ons
|
Script Fields
.
7. Click on the
Edit
link for the
Total Comments
field.
8. Enter the following Groovy script in the script text box:
import com.atlassian.jira.ComponentManager