Post-function error blocks Create issue

Max Andersen August 9, 2017

Hi All,

I have a Create Issue post-function on a status transition which is not 'firing' at all i.e. no issue is being created. My inclination is that it may be because of required fields however I cannot reconcile that.

 

 

The Create issue post-function looks like this (I am copying the three required fields from current issue - I would assume this is enough):

2017-08-09_09-35-05.jpg

 

 

and the error log from JMWE looks like;

[2017-08-09T07:25:53.124Z] ERROR: mwec/4 on f047c87a-d11d-4310-8ffa-e15f43bf4705: Incorrect request: {"description":"Description is required.","customfield_10901":"Brand Manager is required.","customfield_10902":"RtO is required."} (userName=max, clientUrl=https://xx.atlassian.net, postFunction=CreateIssueFunction, userKey=max, msgType=workflow-error, requestId=22d43f01-c06f-4113-8a97-b3581343009c, during=post-function-execution, issueKey=TEST-35, clientKey=jira:26063acd-2d28-4cc0-8cf0-2d83a5dd9f10)
    transition: {
      "workflowId": 32792,
      "transitionId": 361,
      "from_status": "Improve",
      "to_status": "Brief Approved",
      "transitionName": "Brief Approved",
      "workflowName": "TEST: Innovation"
    }
    --
    request: {
      "body": "{\"fields\":{\"project\":{\"key\":\"TEST\"},\"issuetype\":{\"id\":\"3\"},\"summary\":\"fluff - Product\"}}",
      "href": "https://xx.atlassian.net/rest/api/2/issue",
      "method": "POST"
    }
    --
    error: {
      "codeString": "400",
      "fields": "{\"authentication\":7,\"triggering\":3,\"queue\":3,\"execution\":1154}",
      "message": "Unexpected response: 400",
      "code": 400,
      "name": "Error"
    }
    --
    configuration: {
      "conditionalExecution": false,
      "fields": {
        "summary": {
          "action": "set",
          "value": "{{issue.fields.summary}} - Product"
        }
      },
      "project": "$sameAsCurrentIssue$",
      "navigateToNewIssue": false,
      "selectedLinkType": "inward:10001",
      "issuetype": "3",
      "runAsType": "currentUser"
    }

 

If anyone has any idea what is causing this lack of creation it would be most helpful and much appreciated

 

 

1 answer

1 accepted

0 votes
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 9, 2017

What happens if you create an identical issue manually in the UI, setting only the four fields you have named in the post-function?

Max Andersen August 9, 2017

Works perfectly...

 

Also I have just tried to make the field Brand Manager, RtO, and Decription optional and suddently the tasks can be created again through the post-function and everything works. Is there a way to have the fields as requried and create issue's through post-functions? (would be ideal for newly created issue's of same type.) 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 9, 2017

Hmm, that suggests that the post-function is not giving the creation process the mandatory fields the new issue is demanding.  I can see that they are set up correctly, so I'm really not sure what might be going wrong, making me suspect it might be a bug.

I'd want to read the application log, but you're on Cloud, so we can't.  I think this needs to go to https://support.atlassian.com/contact as a support request to investigate further.

Max Andersen August 13, 2017

Thanks Nic - I will pass along to them.

Suggest an answer

Log in or Sign up to answer