Versions Compared

Key

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

...

For example, you have a Transition issue post-function with a lengthy template to calculate the transition to be triggered:

Calculate transitions:

Code Block
{% if issue.fields.customfield_12332 == "A" and issue.fields.customfield_11312 == "a" %}
"To Department A"
{% elif issue.fields.customfield_12332 == "B" and issue.fields.customfield_11312 == "b" %}
"To Department B"
.....
....

...

To reduce the post-function configuration length you need to replace the Nunjucks template in the post-function with a Shared Nunjucks template.

  1. Create a Shared Nunjucks template “Calculated transitions” in the Shared Nunjucks templates page

  2. Input the template in the Nunjucks editor

  3. Go back to the post-function

  4. Remove the exisitng existing template

  5. Input the following template under “Calculated transitions”

    Code Block
    {% include "Calculated transitions" %}

  6. Save the post-function and publish the workflow

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@4371b12
showSpacefalse
sortmodified
typepage
reversetrue
labelsjmwe-cloud
cqllabel = "jmwe-cloud" and type = "page" and space = "JMWEC"