We use the old method of posting Jira webhooks to the Mattermost: by webhook created on the Jira side. Jira sends calls webhook and sends JSON payload successfully but on the Mattermost side we always receive the next error: ‘unexpected end of JSON input’.
Full error message from the Mattermost log:
{“level”:“error”,“ts”:1584741523.2237434,“caller”:“mlog/sugar.go:23”,“msg”:“ERROR: “,“plugin_id”:“jira”,“Status”:“400”,“Error”:“unexpected end of JSON input”,“Host”:“matter:8065”,“RequestURI”:”/plugins/jira/webhook?secret=FlHvJth-3x_HsMI5iIC0yvJ1r2BhNoyb&team=blackwood&channel=test&user_id=olegok&user_key=olegok”,“Method”:“POST”,“query”:“channel=test&secret=FlHvJth-3x_HsMI5iIC0yvJ1r2BhNoyb&team=blackwood&user_id=olegok&user_key=olegok”}
Hey,
i couldn’t reproduce with your versions. Is there any reason why you use the Jira webhook instead of the app connection? Can you try to setup using /jira install server URL and afterwards follow the commands Mattermost prints out? This should work without problems. Another possibility might be to regenerate the secrets and create the webhook again.
The reason we use Jira-side webhooks is the need to filter issues by parent task: we need to post to the mattermost any changes in the all sub-tasks of the given task. Its not possible to setup such behaviour via current UI that jira plugin provides.
We already did “/jira install” for our Jira server. Probably it doesn’t make sense to regenerate the key since the basic webhook that posts ALL Jira changes to the mattermost works fine ("/jira subscribe" posts changes successfully to the channels)
Its output from the Jira log. Mattermost for some reason does not show webhook payload even with “File\Console Log Level = DEBUG” and “Enable WebHook debugging = TRUE”.
Posting via Curl with your example payload works fine (i see the message in the mattermost). Posting with the payload from the log file I’ve attached above still does not produce mattermost message (but receives HTTP code 200 OK). Also I found that “unexepected end of JSON input” received when there is no ContentType sepecified in Curl. So probably Jira sens webhook with incorrect ContentType.
@K1tty A screenshot of the Jira plugin settings and the filters, as well as your Mattermost logs would also be helpful. Then I can replicate the issue in a local instance and file a bug report.
Today we’ve updated Jira to the version 8.8 and now sub-task tickets status/resolution updates work (i see update messages in mattermost). But still don’t work: comments updates, worklog updates, other fields updates (priority, components).
You can find requested screenshots and mattermost log here: https://drive.google.com/file/d/1IsmYTsCSDi0CosvnvoXdBZHxMclL4LIS/view