Hi,
I have a behavior that calculates Risk Level with a behaviour based on Risk Rating, Risk Consequence and Risk likelihood fields. Behaviour works nicely when I update those fields but how can I trigger the behaviour when I create an issue?
Thank you already in a advance!
Hi @Lean Li
In your description, you mentioned:-
I have a behavior that calculates Risk Level with a behaviour based on Risk Rating, Risk Consequence and Risk likelihood fields. Behaviour works nicely when I update those fields but how can I trigger the behaviour when I create an issue?
Behaviours can only be triggered on the Create, Edit, Transition and Assign Issue screens.
If you want to automatically "trigger a Behaviour" in this context and set a value to a field upon issue creation, you will need to use either a Post-Function on the Create Transition or Listener, i.e., the Issue Created Event.
Please provide some more information on what type of field you intend to update, and I will try to provide a sample code.
I am looking forward to your feedback.
Thank you and Kind regards,
Ram
Hi,
I would assume this needs to be done in a post-function in the workflow.
There you could use almost the same code as in the behaviour.
Here you can see some examples on custom script post functions as the binding variables slightly differ:
Example Custom Scripts (adaptavist.com)
Hope this helps :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.