Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Post Function not getting fired when changed the WorkFlow for an issue

Jamshaid
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 23, 2020

I have a workflow created and some issues are there. I edited a workflow and added a custom POST function when workflow for an issue is changed to Done. I published the changes and tried to fire the post function but it didn't get fired. It always says Has not run yet. Here is a screenshot. What I might be doing wrong? Thanks

error.png

2 answers

1 accepted

0 votes
Answer accepted
Jamshaid
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 24, 2020

the issue was resolved. It was my bad. I was applying the post function over the transition and was trying to fire it by changing the workflow.

0 votes
Niranjan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 23, 2020

Hi Jamshid,

It may depend on your custom script postfunction. Could you elaborate more on the custom script and the condition?

Jamshaid
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 23, 2020

.I have the following script and want to run this script when workflow changes from In progress to done.

 

def postmanPost = new URL("https://jamshaid.free.beeceptor.com/test")
def postConnection = postmanPost.openConnection()

def form = "param1:This is request parameter."
postConnection.doOutput = true
def text="mm"
postConnection.with {
outputStream.withWriter { outputStreamWriter ->
outputStreamWriter << form
}
text = content.text
}
assert postConnection.responseCode == 200

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events