I wanted to add custom post function to workflow, so I followed documentation - created controller to handle POST request and included jiraWorkflowPostFunctions in modules in atlassian-connect.json file.
When I was trying to choose this post function in workflow transition, it was on the list, but after clicking 'Add' it redirected me to internal server error page.
Any suggestions?
Hello @Ania ,
I would be happy to take a look and see if I can spot the blocker, can you post the code you are using in the post function and I will see if I can spot the error or reproduce it to do some troubleshooting.
Regards,
Earl
The problem was that I didn't have defined "create" in atlassian-connect.json for post function, but it is marked in documentation as optional so it is confusing why it doesn't work without it.
"create": {
"url": "/..."
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What then in the case of a function that does not require special parameters ? Why do we have to go through the /create page when there's nothing to do there... only to click on the 'Add' button and have the function set up ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Ania ,
So the create URL dialogue is a requirement of the function and should contain the full context:
"create": {
"url": "/create"
I recommend checking out the layout of the full hosed on a bitbucket repo at the link above the partial example in the documentation you linked:
For a full add-on example, see the workflow post function example add-on.
The full formatting can be seen under atlassian-connect.json
Regards,
Earl
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.