Versions Compared

Key

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

The post function module can be found in Workflows so you can plug python code to run in transitions.

To access the Workflow functionality, follow the steps below:

  1. Go to Settings Workflows

  2. Select the workflow you want to add a Post function and click “Edit” in the 3 dots on the right. image-20240317-222115.pngImage Added

  3. Click “Edit”.

  4. Now you can either go to the Diagram View or the Text View.

  5. (Diagram) Click in the Transition you want to add a Post function and follow the diagram below:
    Transition → Post functions → Add Post Function → EFJ Python Script → Add

    image-20240317-223137.pngImage Added

  1. Now you are in the EFJ Python Script Module, so you should:
    1. Name your script
    2. Give it a description
    3. Add a condition to execute
    4. Add the code that you need to run.
    5. Save

Testing my script

For good measure, you should first test your script in the Console.

To do so, in the beginning of your code, you can give it a Context Issue as follows:

Code Block
languagepy
issue = Issue('Your Test Issue Key')

# Rest of your code here

That will simulate the same scenario as a Transition Post function.

After testing and validating you got the expected result:

  1. Remove the first line containing the code issue = Issue('Your Test Issue Key').

  2. Add your code to the “Script” section in the Post Function

  3. Save

Results should be equal. If not, feel free to open a ticket at our Portal