mattermost / mattermost-plugin-jira

JIRA plugin for Mattermost 🔌
https://mattermost.gitbook.io/plugin-jira/
Apache License 2.0
97 stars 127 forks source link

UPDATED: updated_priority=1 option does not work #1087

Open ifeldshteyn-emc opened 1 week ago

ifeldshteyn-emc commented 1 week ago

UPDATE: Code and Documentation has a typo! The command is update_prioity and should be update_priority

This needs to be updated

https://github.com/mattermost/mattermost-plugin-jira/blob/8ff19475757a65263766d3046922a2411aad4117/server/webhook_http.go#L31

image

I am on the latest version of the plugin 4.1.1 and mattermost is 9.5.4. I notice that updated_priority=1 does not seem to trigger the plugin updates. I am following these instructions --> https://docs.mattermost.com/integrate/jira-interoperability.html

My trigger is is PROJECT=XXX and issue CREATED/UPDATED.

https://XXXXXXXX.com/plugins/jira/webhook?channel=test&secret=YYYYYYYY&team=technology&updated_priority=1

This does not trigger an update in mattermost when I change priority. I confirmed an update is sent by jira and the json payload is

"changelog": { "id": "1294695", "items": [ { "field": "priority", "fieldtype": "jira", "from": "2", "fromString": "Critical", "to": "3", "toString": "Major" } ] }

I did a test with various settings (labels, description, summary, priority...).

Ex: https://XXXXXXXX.com/plugins/jira/webhook?channel=test&secret=XXXXXX&team=technology&updated_labels=1&updated_description=1&updated_summary=1&updated_priority=1

All of them work except priority.

I have a workaround hack where I use updated_all=1 . It captures priority changes but I would prefer to only be updated on priority updates. Any ideas what I can do?

Thanks!

mickmister commented 1 week ago

Hi @ifeldshteyn-emc, thanks for filing this issue. Would you be up for fixing the issue if you are able to do so? Otherwise we'll take a look at the issue in our normal triage process. Thanks

ifeldshteyn-emc commented 1 week ago

Hi @ifeldshteyn-emc, thanks for filing this issue. Would you be up for fixing the issue if you are able to do so? Otherwise we'll take a look at the issue in our normal triage process. Thanks

It's a typo in the code and documentation. Just rename prioity to priority . I don't think I have perms to raise PRs?

mickmister commented 1 week ago

It's a typo in the code and documentation. Just rename prioity to priority

Awesome work!! Thank you @ifeldshteyn-emc!

I don't think I have perms to raise PRs?

You should be able to fork the repo and make the changes there to submit a PR. Are you up for doing this?

ifeldshteyn-emc commented 1 week ago

I'd love to but I can't do it here due to restrictions. It's just an easy fix. Also important note - the DOCUMENTATION needs to be updated as well.

mickmister commented 1 week ago

@ifeldshteyn-emc Does the feature work without the fix if you use updated_prioity? We can add the fix, but we should probably also keep the old functionality as well for backwards compatibility, as some systems may already be using that typo spelling if it works correctly