Helper Functions

 

There are two helper routines available to ease your work with persistent variables. These routines allow you to set or retrieve the value of a persistent variable from a script that is not in the context of the issue or just to retrieve a global variable:

Routines

  • Page:
    setPersistentVar (Power Scripts for Jira Cloud) — Sets the persistent var, as a string
  • Page:
    getPersistentVar (Power Scripts for Jira Cloud) — Gets the persistent var, as a string

Values are treated as strings. For the above example:

string globalCounterVar = getPersistentVar("counter"); number test_one_counter = getPersistentVar("TEST-1", "counter"); //notice the implicit cast! values are treated like strings, though!
  • Although useful, persistent variables come with a small performance penalty. Don't overuse them!

  • There's no way to delete a persistent var (other than direct SQL) at the moment. Think hard if you really need them.

See More

 

Peacock