Make sure you have completed the activity set up tasks before attempting this activity.

Script Field Example

The Virtual Tour Service Management team would like better visibility into the last time a status change occurred for their story issues. By creating a script field, you can add this information right into the issue’s view. For your instance, you may use different fields than the ones used in the following examples.

  1. Navigate to Script Fields, which is found under ScriptRunner on the Manage Apps page.

  2. Click Create Script Field.

  3. Choose Time of Last Status Change.

  4. Enter the appropriate information for the Field Name, Description, and Field Note. If you’d like to test to see if the field is operating as expected, you can enter a Preview Issue Key and click Preview.

    Preview
  5. If the result of the preview is what you’re expecting, click Add to create the field. A popup appears asking you to configure the Context and Screens. You can also access these options from the cog to the right of the new field’s name.

  6. Use the Configure Context option to restrict the field’s scope to selected issue types and projects. For example, we could restrict to the Great Adventure Tours project.

    ConfigureContext
  7. Using the Configure Screens option brings you to a list of all the screens in your Jira instance. Select the appropriate screens for your project(s) and click Update.

    ConfigureScreen
  8. Open an issue from the appropriate project. The date and time of last transition should appear in the Dates section of the View screen.

Have questions? Visit the Atlassian Community to connect, share, and learn with other Atlassian users and experts, including Adaptavist staff.

Ask a question about ScriptRunner for JIRA, Bitbucket Server, or Confluence.

Want to learn more? Check out courses on Adaptavist Learn, an online platform to onboard and train new users for Atlassian solutions.