Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Scenario

  • You want to further limit the number of characters a user may enter into a single-line text or multi-line text field
  • You want to provide feedback to the user with how many characters remain and if the maximum is exceeded

We'll show you how to do all of this using Power

...

Scripts™ for Jira

...

, a powerful scripting tool to help automate

...

your Jira.

What These Scripts Do

  • The listener script listens to the Summary field, and runs the executor script on any character entry or removal
  • The executor script checks the number of characters against a declared maximum and disables the create/submit button if it is exceeded

Image ModifiedImage Modified

Prerequisites

  1. You have

...

  1. Jira Core or

...

  1. Jira Software installed
  2. You have Power

...

  1. Scripts™ for Jira installed

Configure Live Field Listener

You should configure this script as a Live Field script for the relevant project.

Bitbucket file macro
showLineNumberstrue
title lfListener_CharacterLimitSummary.sil
urlhttps://bitbucket.cprime.io/projects/CAP/repos/sil-script-library/raw/lfListener_CharacterLimitSummary.

...

sil?at=refs%2Fheads%2Fmaster
syntaxHighlightingJavaScript

Listener References Live Field Executor

...

Bitbucket file macro
showLineNumberstrue
title lfExecutor_CharacterLimitSummary.sil
urlhttps://bitbucket.cprime.io/projects/CAP/repos/sil-script-library/raw/lfExecutor_CharacterLimitSummary.sil?at=refs%2Fheads%2Fmaster
syntaxHighlightingJavaScript


See also