Scripted Field Snippets
JMCF for Jira Cloud provides several code snippets for Scripted Fields; these snippets address many of the most common data access scenarios and are designed so that they can be modified to fit your needs. To access the snippets, click the Snippets button on the right side of the script editor; you can scroll through the list of snippets here and insert the code by clicking on the snippet you want to use.
You are viewing the documentation for Jira Cloud.
Be sure to review the snippet code you choose! Many of the snippets require you to enter specific values, such as field IDs, project IDs, or user IDs.
Note: Snippets are not fully functional scripted fields! They are pieces of code designed to assist in addressing common data access tasks and calculations.
The following snippets are available:
Snippet Name  | Description  | Related APIs  | 
|---|---|---|
Get field value  | Get the value of a field (“Description” by default). Update the ID of the field to customize; see Determining custom field IDs below for details on how to find field IDs.  | |
Get property value  | Get the value of a property. Update the name of the property to customize.  | |
Get a group  | Get the ID of a group using its name.  | |
Get the members of a group  | Get a collection of User objects.  | |
Get a project  | Get a project object using the project ID. Update the ID to customize.  | |
Get projects  | Get an array of project objects using an array of project IDs. Update the IDs to customize.  | |
Get a user  | Get a User object with a User ID. Update the ID to customize; see Determining User IDs below for details on how to find Jira User IDs.  | |
Get statuses  | Get an array of status objects using an array of status ID values. Update the IDs to customize; see Determining status IDs below for details on how to find status ID values.  | |
Get all permissions  | Get an array of all permissions as objects.  | |
Get permissions  | 
  | |
Remaining story points in an epic  | This snippet calculates the total Story points for any unfinished child issues for an Epic.  | |
Completed story points in an epic  | This snippet calculates the total Story points for all finished child issues for an Epic.  | |
Time in each status - getFieldHistory() example  | This snippet returns a JSON string of all of the changes for an issue’s Status field.  | |
Updates per user - getIssueHistory() example  | This snippet returns a JSON string of the number of changes each user made to an issue.  | |
Due date countdown (duration in seconds)  | This snippet calculates the number of seconds remaining until the Due Date.  | 
Determining custom field IDs
Determining User IDs
Determining status IDs
Need support? Create a request with our support team.
Copyright © 2005 - 2025 Appfire | All rights reserved.
