While my question is related to a use case that involves ScriptRunner I guess this is question that should be directed straight at JIRA / Atlassian...
If I execute a transition using the API - do that transition ID's post functions actually run?
The workflow's conditions are validated, but as far as I can see the post functions are not being run, maybe I am missing something so thought I would check...
I am fairly confident I can script the field updates and assignments I need, but I just assumed the post functions would fire...
Thanks!
Hello @David Moore
Indeed that should be the case. Any post functions bound to a workflow transition should be triggered when transitioning the issue, even when done through the API.
Thanks for the prompt response @Fernando Bordallo!
There are a couple of layers of complexity here, I am using ScriptRunner and a roles based estimation app (here). The post function that is failing is a simple reassignment to a user identified in by a Role...
The same post function works as expected through the UI.
Something must be wrong then, I'll need to do some testing...
I will update this post when I get to the bottom of it.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, wrapping around for completeness...
The app we use stores data in the issues "properties", the post function supplied by them to provide the functionality to re-assign during the post function does not function when the transition is called through the API.
The atlassian supplied post function (which essentially does the same thing) works just fine...
I will submit a bug ticket to the app supplier. I have scripted a work around with ScriptRunner to correct this in the meantime.
Thanks for the help @Fernando Bordallo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for updating the thread :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @David Moore transitions work the same way regardless if you are using UI or via REST API. I suggest you play with your transition from the user interface until you are certain it does as it should (mainly because it's easier) and then when you do it via API you will see the same results
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.