Git Product home page Git Product logo

mattermost-plugin-jira's Introduction

Mattermost Jira Plugin

Build Status Code Coverage Release HW

This plugin supports a two-way integration between Mattermost and Jira. Jira Core and Jira Software products, for Server, Data Center, and Cloud platforms are supported. It has been tested with versions 7 and 8.

For versions v3.0 and later of this plugin, support for multiple Jira instances is offered for Mattermost Professional and Enterprise plans, configured using Administrator Slash Commands.

Maintainer: @mickmister

Co-Maintainer: @jfrerich

See the Mattermost Product Documentation for details on installing, configuring, enabling, and using this Mattermost integration.

Feature summary

Jira to Mattermost notifications

Channel subscriptions

Notify your team of the latest updates by sending notifications from your Jira projects to Mattermost channels. You can specify which events trigger a notification - and you can filter out certain types of notifications to keep down the noise.

Personal notifications: JiraBot

Each user in Mattermost is connected with their own personal Jira account and notifications for issues where someone is mentioned or assigned an issue is mentioned in your own personal Jira notification bot to help everyone stay on top of their assigned issues.

A personal JiraBot helps keep you on top of your relevant Jira activities

Manage Jira issues in Mattermost

Create Jira issues

  • Create Jira issues from scratch or based off of a Mattermost message easily.

  • Without leaving Mattermost's UI, quickly select the project, issue type and enter other fields to create the issue.

    image

Attach messages to Jira issues

Keep all information in one place by attaching parts of Mattermost conversations in Jira issues as comments. Then, on the resulting dialog, select the Jira issue you want to attach it to. You may search for issues containing specific text.

image

image

Transition Jira issues

Transition issues without the need to switch to your Jira project. To transition an issue, use the /jira transition <issue-key> <state> command.

For instance, /jira transition EXT-20 done transitions the issue key EXT-20 to Done.

image

Assign Jira issues

Assign issues to other Jira users without the need to switch to your Jira project. To assign an issue, use the /jira assign command.

For instance, /jira assign EXT-20 john transitions the issue key EXT-20 to John.

License

This repository is licensed under the Apache 2.0 License, except for the server/enterprise directory which is licensed under the Mattermost Source Available License. See Mattermost Source Available License to learn more.

Development

This plugin contains both a server and web app portion. Read our documentation about the Developer Workflow and Developer Setup for more information about developing and extending plugins.

Releasing new versions

The version of a plugin is determined at compile time, automatically populating a version field in the plugin manifest:

  • If the current commit matches a tag, the version will match after stripping any leading v, e.g. 1.3.1.
  • Otherwise, the version will combine the nearest tag with git rev-parse --short HEAD, e.g. 1.3.1+d06e53e1.
  • If there is no version tag, an empty version will be combined with the short hash, e.g. 0.0.0+76081421.

To disable this behaviour, manually populate and maintain the version field.

How to Release

To trigger a release, follow these steps:

  1. For Patch Release: Run the following command:

    make patch
    

    This will release a patch change.

  2. For Minor Release: Run the following command:

    make minor
    

    This will release a minor change.

  3. For Major Release: Run the following command:

    make major
    

    This will release a major change.

  4. For Patch Release Candidate (RC): Run the following command:

    make patch-rc
    

    This will release a patch release candidate.

  5. For Minor Release Candidate (RC): Run the following command:

    make minor-rc
    

    This will release a minor release candidate.

  6. For Major Release Candidate (RC): Run the following command:

    make major-rc
    

    This will release a major release candidate.

Environment

Join the Jira plugin channel on our community server to discuss any questions.

Read our documentation about the Developer Workflow and Developer Setup for more information about developing and extending plugins.

This plugin supports both Jira Server (self-hosted) and Jira Cloud instances. There can be slight differences in behavior between the two systems, so it's best to test with both systems individually when introducing new webhook logic, or adding a new Jira API call.

To test your changes against a local instance of Jira Server, you need Docker installed, then you can use the docker-compose.yml file in this repository to create a Jira instance. Simply run docker-compose up in the directory of the repository, and a new Jira server should start up and be available at http://localhost:8080. It can take a few minutes to start up due to Jira Server's startup processes. If the container fails to start with exit code 137, you may need to increase the amount of RAM you are allowing docker to use.

To test your changes against a Jira Cloud instance, we recommend starting a 14-day trial, if you don't have a Jira project to test against. More information can be found here: https://www.atlassian.com/software/jira/try.

Help wanted!

If you're interested in joining our community of developers who contribute to Mattermost - check out the current set of issues that are being requested.

You can also find issues labeled "Help Wanted" in the Jira Repository that we have laid out the primary requirements for and could use some coding help from the community.

Help and support

  • For Mattermost customers - Please open a support case.
  • For questions, suggestions, and help, visit the Jira Plugin channel on our Community server.
  • To report a bug, please open an issue.

mattermost-plugin-jira's People

Contributors

aaronrothschild avatar agmeteor avatar asaadmahmood avatar bbodenmiller avatar carantunes avatar ccbrown avatar cpanato avatar cpoile avatar crspeller avatar cwarnermm avatar dependabot[bot] avatar francois-d avatar haardikdharma10 avatar hanzei avatar hectorgabucio avatar jasonblais avatar jespino avatar jfrerich avatar justinegeffen avatar jwilander avatar kshitij-katiyar avatar levb avatar mickmister avatar nityanand13 avatar raghavaggarwal2308 avatar sibasankarnayak avatar srkgupta avatar themaverikk avatar trilopin avatar vladimirdotk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mattermost-plugin-jira's Issues

Auto-create and link Mattermost channel to JIRA issue

Sorry if this is already available or links to another feature. Please let me know if it does.

It would be great if it was possible to auto-create and link a channel to a JIRA issue.

The use-case for us is we use JIRA Service Desk to speak to our customers and there can also be a lot of internal chatter which takes place around it. Comments in JIRA are pretty terrible at tracking internal and external conversations because there is no proper comment threading, which means comments become fractured.

I thought it would be a good idea to be able to create a Mattermost channel for conversations about a specific issue and auto-link it so an internal discussion can take place there. I guess the current workaround would be to create a channel and link it manually?

Not sure if there is a better way to do it so I am open to ideas/options.

If not, it would be great to see this feature developed.

Migrate Jira plugin to use bot accounts

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.


There are two stages for the issue:

1 - Migrate Jira plugin to use bot accounts.

For an example, here is a PR that migrated the Demo Plugin to use bot accounts with a helper function mattermost/mattermost-plugin-demo#29

2 - Remove User Mattermost System Console setting in plugins.json.

mattermost jira plugin directory structure renamed

Hello

In the latest 5.6.0 release of mattermost, it appears that directory structure for jira plugin has changed.

~/prepackaged_plugins $ ls
com.mattermost.jira-1.0.2.tar.gz  zoom-1.0.3.tar.gz
~/prepackaged_plugins $ 
~/plugins $ ls -la
total 20
drwxr-Sr--    4 mattermo mattermo      4096 Dec 15 19:01 .
drwxr-sr-x    1 mattermo mattermo      4096 Dec 15 19:03 ..
drwxr-Sr--    3 mattermo mattermo      4096 Dec 15 19:01 com.mattermost.jira
drwxr-Sr--    4 mattermo mattermo      4096 Dec 15 19:01 zoom
~/plugins $ 

As a result the webhook in the old format no longer works from jira, returning 404.
https://REDACTED/plugins/jira/webhook returns 404
However the following works:
https://REDACTED/plugins/com.mattermost.jira/webhook

This appears to be a bug. Because the plugin page advises users to use the former instead of latter.
Please either update the plugin page or update the archive name.

Show user their settings with `/jira settings`

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.


Summary

Currently, /jira settings command requires a name, value and sets them.
Add support for /jira settings (no arguments) to display all settings, in a user-friendly format. The only setting we have now is notifications anyway.

https://mattermost.atlassian.net/browse/MM-18166

Plugin 1.1.0 not working anymore.

We are runing Mattermost on an Ubuntu 16.04.
Since update MM to 5.7.1 yesterday the Jira Plugin stopped working.
Activation of Plugin is successful (it says)
In Jira we didn't change the hook.
https://mattermost.ourserver.lan/plugins/jira/webhook?secret=xxxx&team=ourteam&channel=jiranotes
If i open the link in a Browser it gives me "500 internal server error"
If Jira hits it, I get following in the logs:

2019-02-05T10:22:56.324Z	error	plugin/client_rpc.go:326	Plugin failed to ServeHTTP, RPC call failed	{"plugin_id": "jira", "error": "connection is shut down"}
2019-02-05T10:23:01.324Z	error	plugin/client_rpc.go:281	Plugin failed to ServeHTTP, muxBroker couldn't accept connection	{"plugin_id": "jira", "serve_http_stream_id": 22, "error": "timeout waiting for accept"}
2019-02-05T10:23:01.324Z	error	plugin/client_rpc.go:300	Plugin failed to ServeHTTP, muxBroker couldn't Accept request body connection	{"plugin_id": "jira", "error": "timeout waiting for accept"}

config show gives me the values, which are set in the config.json:
jira:map[username:jira-bot enabled:true secret:xxx]

If i try to change settings (enable/disable or username) in the webinterface following appears in the logs:
2019-02-05T11:01:45.346Z error plugin/client_rpc_generated.go:67 RPC call OnConfigurationChange to plugin failed. {"plugin_id": "jira", "error": "connection is shut down"}

Settings in the plugin.json seem ok (relative path to plugin path not changed).

{
    "id": "jira",
    "name": "Jira",
    "description": "Receives webhook events from JIRA and makes Mattermost posts for them.",
    "version": "1.1.0",
    "server": {
        "executables": {
            "linux-amd64": "server/dist/plugin-linux-amd64",
            "darwin-amd64": "server/dist/plugin-darwin-amd64",
            "windows-amd64": "server/dist/plugin-windows-amd64.exe"
        },
        "executable": ""
    },
...

Btw: other plugins like autolink are working fine.

When posting a response from the Jira plugin, we get React warnings in the console

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.


Repro steps:

  1. Enable and configure the plugin using steps at https://github.com/mattermost/mattermost-plugin-jira
  2. Use "/jira connect" to connect your Mattermost account with Jira
  3. Complete the connection flow
  4. Hover over a message, click on the "More Actions" (...) menu, and either create or attach an issue using the post menu
  5. Complete the flow and submit changes

Observed: JavaScript error in the console
image

Expected: No error

Add server-side validation to Subscription APIs

Subscription management APIs,

func httpChannelSubscriptions(p *Plugin, w http.ResponseWriter, r *http.Request) (int, error) {
, should implement server-side data validation, they currently rely on the webapp submitting valid data.

https://mattermost.atlassian.net/browse/MM-17903


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.

Add support for Jira issue previews, including "/jira settings preview" command

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.


DETAILS

When someone posts a link to a Jira issue, or a Jira issue key, a preview of the issue is shown in the Mattermost channel. The preview includes the assignee, status, type and priority as message attachment fields side-by-side, when available, along with the description.

Desktop UI (wide, regular view, no description):

image

Desktop UI (wide, regular view, with description):

image

Desktop UI (narrow, mobile view):

image

PERMISSIONS

Those without permissions to view a Jira issue should see the following text in the resulting issue preview.

Those without permissions would see You do not have the appropriate permissions to view the issue. Please contact your Jira administrator.

/JIRA SETTINGS

Add a new slash command that enables users to enable or disable issue previews. It should default to "on".

  • /jira settings preview on - enables issue previews
  • /jira settings preview off - disables issue previews

You can review https://github.com/mattermost/mattermost-plugin-jira/blob/master/server/command.go for examples of other Jira plugin slash commands.

Note: In addition to adding support for /jira settings preview [on/off], update the /jira settings entry in /jira help command with the setting parameter now accepting both notifications and preview values.

compatibility issue with mattermost 5.8.0

I'm testing the plugin v1.1.1 on our mattermost instance, the plugin setup is okay and is configured okay but when testing with curl I get an error 500.
There is not that much clue on what's going wrong on mattermost logs:

{"level":"debug","ts":1552652119.5225964,"caller":"app/plugin_api.go:650","msg":"HTTP request","plugin_id":"jira","Host":"mattermost.devinternet.net","RequestURI":"/plugins/jira/webhook?secret=dMn2ZBjPMN5ogORmsFCutxexOy55hk74&team=devops&channel=jira","Method":"POST","query":"channel=jira&secret=dMn2ZBjPMN5ogORmsFCutxexOy55hk74&team=devops"}
{"level":"debug","ts":1552652119.5253737,"caller":"app/plugin_api.go:650","msg":"Failed to serve HTTP request","plugin_id":"jira","Error message":"Failed to create post"}

My curl command seems correct:
curl -v --insecure "https://mattermost.devinternet.net/plugins/jira/webhook?secret=dMn2ZBjPMN5ogORmsFCutxexOy55hk74&team=devops&channel=jira" --data '{"WebhookEvent":"issue_created"}'

Is it a compatibility issue?

Isolation between jira projects

We tried this jira plugin. However, it looks like this does not have any isolation in mattermost side? For instance, I can subscribe to jira organizations which I do not have access at all - and also those events will be published to channel. This is quite huge issue in security perspective. This should work in similar way that github mattermost plugin is working (check does user have access to organization). Are we doing something wrong or is this plugin working as "planned"?

It looks like the isolation is handled in Jira server side - but then we can have only one webhook per mattermost installation. It does not work.

Render Jira webhook comments as slack attachment posts

This Jira plugin send notifications from Jira projects to Mattermost channels via webhooks. To learn more about configuring and using the webhooks, see the documentation at https://github.com/mattermost/mattermost-plugin-jira/blob/master/README.md.

For the source code, see the server-side webhook code at https://github.com/mattermost/mattermost-plugin-jira/tree/master/server

PROPOSED CHANGE

For webhook events sent for issue comment creations and issue comment updates, add a Markdown quotation in front of the comment, inside the webhook attachment

Current:

image

Proposed:

image

Note that the comment is in a slack attachment style post and also quoted.

Additionally, this issue requests to fix the following issue, in tandem.
https://mattermost.atlassian.net/browse/MM-19652


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.

Secrets with a plus sign not recognized

Summary

Testing the Jira plugin with a curl is a common way of figuring out if it's working. However, if there is a + in the secret it is not recognized by the plugin.

Environment

  • Mattermost Server: 5.8.0

Steps to Reproduce

  1. Edit config.json so that the PluginSettings.Plugins.jira.secret value has a + in it. For example: KBcCZm_JWQWM2WD9tr5IMo+fUo5zGJwS
  2. curl the URL:
curl -XPOST "https://mattermost.example.com/plugins/jira/webhook?secret=KBcCZm_JWQWM2WD9tr5IMo+fUo5zGJwS&team=a-team&channel=town-square

Expected Behavior

curl command outputs this:

EOF

Observed Behavior

curl command outputs this:

You must provide the configured secret

Recommended Fixes

Scrub secrets of + character when generating them.

After executing "/jira install server", link to the appropriate Jira Application Links page in the resulting ephemeral message

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.


Repro: Post /jira install server <URL>

Observed: First step asks the admin to navigate to "Settings > Applications > Application Links".
Expected: First step includes a link to "Settings > Applications > Application Links", which redirects user to /plugins/servlet/applinks/listApplicationLinks

More specifically, change this line of code (https://github.com/mattermost/mattermost-plugin-jira/blob/master/server/command.go#L264) to

1. Navigate to [**Settings > Applications > Application Links**](%s/plugins/servlet/applinks/listApplicationLinks)

where %s is the URL specified in the /jira install server <URL> command

Bold action verb in webhook notification pretext

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.


This Jira plugin send notifications from Jira projects to Mattermost channels via webhooks. To learn more about configuring and using the webhooks, see the documentation at https://github.com/mattermost/mattermost-plugin-jira/blob/master/README.md.

For the source code, see the server-side webhook code at https://github.com/mattermost/mattermost-plugin-jira/tree/master/server

PROPOSED CHANGE

For webhook events sent for issue creation/update/delete and comment creation/update/delete, add Jira issue type icon in front of issue type in webhook notification pretext

Current: Action verb is not bolded

image

Proposed: Bold the action verb to draw attention to whether it was created, updated or deleted

  • for issue creation: bold created
  • for issue assignment: bold assigned
  • for issue transition: bold reopened, or resolved
  • for issue deletion: bold deleted
  • for comment creation: bold commented
  • for comment updates: bold edited a comment
  • for comment deletions: bold removed a comment

image

Note: You can ignore other formatting changes in the sample screenshot, these are covered by other open issues.

Support multiple Jira project subscriptions to Mattermost channels

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.


This will need some user experience and technical considerations, so we encourage opening a discussion if you're interested working on this feature!

Allow me to Modify Notifications settings

The current notification behavior is such that if you are assigned to a Jira task, any updates to the task will send you a DM. I just want to make sure this is the desired behavior. Some users may find this bothersome.

Add an ephemeral response after user completes "/jira connect" flow

Repro steps:

  1. Enable and configure the plugin using steps at https://github.com/mattermost/mattermost-plugin-jira
  2. Use "/jira connect" to connect your Mattermost account with Jira
  3. Complete the connection flow

Observed: No feedback sent back in Mattermost after completing the flow.

Proposed changes:

  1. If the user successfully connects their account: Ephemeral message posted to user with text
You have successfully connected your Jira account (**{Jira email address}**).
  1. If the connection is not successful: Ephemeral message posted to user with text
We were not able to connect your Jira account. Please try again later.
  1. If the user had already connected their account: Ephemeral message posted to user with text
You already have a Jira account (**{Jira email address}**) connected. If you would like to connect another account, use `/jira disconnect` to first disconnect the existing one.

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.

Unsupported webhook data: jira:issue_updated_v2.1.0_rc2

After we upgraded our mattermost server to version 5.13.2 we're experiencing issues with our Jira integration via the webhook method.

Update from 5.5.0 and in this version (5.5.0 it is worked for example Resolved)
I already update plugin from 2.0.7 pre-packed to 2.1.0_rc2 and results the same

Before the upgrade we were notified about opened and closed issues in the respective channel. After the update we only get notifications for opened issues. If someone closes a task in Jira we also see the following error message in our mattermost server log:

{"level":"error","ts":1565268360.034311,"caller":"mlog/sugar.go:23","msg":"ERROR: ","plugin_id":"jira","Status":"400","Error":"Unsupported webhook data: jira:issue_updated"

Thanks,
Razmik

In the System Console, add Site URL and secret for the generated webhook URL

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.


In Mattermost System Console > Jira settings page, we display a webhook URL for the admin to use when configuring webhooks in Jira.

image

Proposal is to automatically update the Site URL and Webhook Secret for this URL, which makes it easier for an admin to configure it.

Note that this requires adding the ability for plugins to dynamically display or update text on the System Console settings page: https://mattermost.atlassian.net/browse/MM-11830

Support „share issue“ workflows

In jira it is possible to share a certain ticket to certain users.
This usually triggers a email notification with the given text message.
(See the red box in https://www.google.de/search?q=jira+share+issue&prmd=nisv&source=lnms&tbm=isch&sa=X&ved=2ahUKEwiElebegdPiAhWCCuwKHYwpBZQQ_AUoAnoECAwQAg&biw=1024&bih=634#imgrc=mnsLR2VazD05WM)

It would be great if we could get a mattermost notification instead of such emails, which get often read only once and afterwards will be deleted

plugin 1.0.4 is not working

Hello

I have tried to get the jira plugin to work, but was not able to. I enabled debug level log but nothing appears in the log file.
I'm running mattermost 5.6.2 on centos 7.xx with postgress database.
I enabled normal webhook for other service we use (site24) and that works fine.
Our Jira is running on the cloud with atlassian.

Thanks

New command `/jira unassign <issue-key>`

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.


For a sample PR that added "/jira assign " command, see #60

A) Add "/jira unassign " command. refers to the Jira issue key such as "MM-14151"

When successful, the command does two things:

  1. removes the assignee of a Jira issue.
  2. sends an ephemeral message back to the channel the user posted their command with text
Unassigned Jira issue <issueKey>

B) The following is a list of error cases and the returned ephemeral message. The ephemeral message should have the same profile picture and username as other messages posted by the Jira plugin.

  1. if user doesn't have permissions for the action, return ephemeral message "You do not have the appropriate permissions to perform this action. Please contact your Jira administrator.
  2. if "/jira unassign" is posted, return ephemeral message "Please specify an issue key in the form /jira unassign <issue-key>"
  3. if is not found, return ephemeral message "We couldn't find the issue key. Please confirm the issue key and try again."

When selecting project in Create Jira Issue dialog, an error is logged in the JavaScript console

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.


Repro steps:

  1. Enable and configure the plugin using steps at https://github.com/mattermost/mattermost-plugin-jira
  2. Use "/jira connect" to connect your Mattermost account with Jira
  3. Complete the connection flow
  4. Hover over a message, click on the "More Actions" (...) menu, then select "Create Jira Issue".

Observed: JavaScript error in the console
image

Expected: No error.

Potential cause: We are setting state outside of where we're supposed to in the React lifecycle.

Document that Jira mentions need to be turned on by the authenticated user

Mattermost user aaron.rothschild from https://community.mattermost.com has requested the following be documented:

https://jsoftconnector.atlassian.net/wiki/spaces/JS/pages/765001735/Mattermost+-+Direct+message

End users:  Get notified personally by the Jira bot whenever you are mentioned or an issue that is assigned to you is updated: You need to type `/jira notifications....`

See the original post here.

This issue was generated from Mattermost using the Doc Up plugin.

Move templates to /assets

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.


https://github.com/mattermost/mattermost-plugin-sample/pull/28/files introduces a standard location for static files that plugins use, and we have a p.API.GetBundlePath() in 5.10. We should use it, and also update the MakeFile accordingly.

When testing, make sure the plugin installation with /jira install and user connection with /jira connect continue to work.

Unsupported webhook data: jira:issue_updated

After we upgraded our mattermost server to version 5.13.2 we're experiencing issues with our Jira integration via the webhook method.

Currently our Jira WebHook setup looks like this:

Image Pasted at 2019-8-8 14-54

Before the upgrade we were notified about opened and closed issues in the respective channel. After the update we only get notifications for opened issues. If someone closes a task in Jira we also see the following error message in our mattermost server log:

{"level":"error","ts":1565268360.034311,"caller":"mlog/sugar.go:23","msg":"ERROR: ","plugin_id":"jira","Status":"400","Error":"Unsupported webhook data: jira:issue_updated","Host":"<URL>","RequestURI":"/plugins/jira/webhook?secret=<SECRET>&team=<TEAM>&channel=<CHANNEL>&updated_status=1&user_id=<USERID>&user_key=<USERID>","Method":"POST","query":"channel=<USERID>&secret=<SECRET>&team=<TEAM>&updated_status=1&user_id=<USERID>&user_key=<USERID>"}

Is there any possibility to see which field or part of the posted content is causing this error?

Regards,

Daniel

jira plugin bot does not pull in human readable account id on channel update

The jira integration is working quite well, aside from one minor detail (not a deal breaker, but I can't figure out if this is a know issue or misconfiguration?)

Jira bot posts into a #jira-updates channel on our mattermost server, each time someone references a team member (using @membername) in jira on a comment, update, or new ticket -- the associated message in #jira-updates shows the ticket, but the @membername is shown in this format:

[~accountid:5c45e4d6cc3a1d3d8a2b9117]

does anyone know how I can get that to map to the mattermost membername, or just to a text string with the jira username instead of the internal account id?

Support "Share Issue" workflow in Jira plugin

Reopened from #131

CONTEXT

In Jira, it is possible to share a specific ticket with certain users.

This triggers an email notification with the given text message.

image

(See the red box in https://www.google.de/search?q=jira+share+issue&prmd=nisv&source=lnms&tbm=isch&sa=X&ved=2ahUKEwiElebegdPiAhWCCuwKHYwpBZQQ_AUoAnoECAwQAg&biw=1024&bih=634#imgrc=mnsLR2VazD05WM)

PROPOSED CHANGE

Enable users to receive these notifications via Mattermost instead of email.

The exact approach would need to be investigated, but one option is for Mattermost to plug in to the Jira notification preferences and enable users to choose between receiving these notifications in email or Mattermost. The sender would then not be required to make a choice about the message medium.

After executing "/jira uninstall", link to the appropriate Jira Settings page in the resulting ephemeral message

SCENARIO 1:
Repro: Successfully uninstall Jira Cloud via "/jira uninstall cloud "
Observed: Ephemeral message:

Jira instance successfully disconnected. Go to **Settings > Apps > Manage Apps** to remove the application in your Jira Cloud instance.

EXPECTED: Ephemeral message, containing a link to Manage Apps page

Jira instance successfully disconnected. Go to [**Settings > Apps > Manage Apps**](...appropriate page link here...) to remove the application in your Jira Cloud instance.

SCENARIO 2:
Repro: Successfully uninstall Jira Server via "/jira uninstall server "
Observed: Ephemeral message:

Jira instance successfully disconnected. Go to **Settings > Applications > Application Links** to remove the application in your Jira Server or Data Center instance.

EXPECTED: Ephemeral message, containing a link to Manage Apps page

Jira instance successfully disconnected. Go to [**Settings > Applications > Application Links**](...appropriate page link here...) to remove the application in your Jira Server or Data Center instance.

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.

Webhooks and subscriptions should support for `worklog` events (created/updated/deleted)

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.


Note that worklog hooks do not appear to have enough data in the webhook message itself.

Hence, the Jira Plugin may need to use OAuth/API to get more details such as the issue key.

When connecting server, if a user was already connected to that server, their client won't be updated until they reload

Repro: (Admin-A refers to a MM System Admin; User-A refers to an end user)

  1. Admin-A connects to Jira-A, User-A connects their account to Jira-A.
  2. Admin-A disconnects from Jira-A, User-A is notified that they are no longer connected to a Jira instance (they are shown no menu items related to Jira).
  3. User-A logs off, logs back on. Their state is "jira intance not connected" AND "user account not connected" (because there was no jira instance to test if their account was connected)
  4. Admin-A connects back to Jira-A.

Observed: User-A is notified that they are now connected to a Jira instance. But their client state still thinks their user account is NOT connected. User-A reloads their webapp, and it correctly pulls that their account is connected.

Expected: User-A is notified that they are now connected to a Jira instance. The client correctly pulls that their account is connected.


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.

Add Support Additional Events

I'm interested in adding support for additional events and looking for feedback. I'd love to see support for:

  • Comment (Created/Updated/Deleted)
  • Work Log (Created/Updated/Deleted)

Add support for issue transitions

Our team currently relies on the Hipchat integration within Jira Service Desk to send notifications to a Hipchat room. Now that we are transitioning to Mattermost, we're looking for a way to accomplish the same type of notifications. However, we can't seem to figure out a way to pull that off because it seems the current plugin does not support the functionality we need.

Here's how it works for us now. We configure the Hipchat integration within Jira Service Desk to match the following issues:

project = PROJECT_NAME AND issuetype in standardIssueTypes() AND "Assignment Group" = "SOME_GROUP" AND assignee in (EMPTY) AND status not in (Resolved, Closed)

Then, when an issue within the Jira Serve Desk projects transitions to the status "Open", it fires a notification to the room if the issue matches the query above.

hipchat-transition

Since the plugin only supports a single Jira instance, it would be awesome if we could accomplish this with a webhook. I'd prefer a webhook because we have the Mattermost Jira plugin configured to use one of our other Jira servers and configure additional notifications via webhooks for our Jira Service Desk.

Automatically convert JIRA-formatted messages to Mattermost Markdown

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.


See this PR as a starting point: #24

The objective of this PR is to convert Jira-formatted messages to Mattermost Markdown, when notifications from Jira are posted to a Mattermost channel.

Only messages for "Issue created" are displayed

We don't get messages for events other than "Issue created". According to the logs Mattermost receives notifications for the "missing" events, e.g.:

2019-07-05T14:37:31.224+0200    debug   mlog/sugar.go:15        skipping: "abc transitioned foo [FOO-42: asdf](https://jira.xyz.com/browse/FOO-42) from \"Planned\" to \"In Progress\""     {"plugin_id": "jira"}
2019-07-05T14:37:31.226+0200    debug   mlog/sugar.go:15        OK:     {"plugin_id": "jira", "Status": "200", "Host": "mattermost.xyz.com", "RequestURI": "/plugins/jira/webhook?secret=12345&team=someteam&channel=somechannel&user_id=abc%40xyz.com&user_key=abc%40xyz.com", "Method": "POST", "query": "channel=somechannel&secret=12345&team=someteam&user_id=abc%40xyz.com&user_key=abc%40xyz.com"}

Versions involved:

  • mattermost-jira-plugin v2.0.6
  • mattermost-server v5.12.1
  • JIRA 7.12.3

Automatically convert Mattermost Markdown to Jira formatting

REPRO:

  1. Enable and configure the plugin with instructions at https://github.com/mattermost/mattermost-plugin-jira
  2. As a user, connect your account in Mattermost to Jira by posting /jira connect
  3. As a user, hover over a message, click the "More Actions" (...) post menu option, then select "Create Jira Issue".
  4. Complete the steps to create a Jira issue.
  5. As a user, hover over a message, click the "More Actions" (...) post menu option, then select "Attach to Jira Issue"
  6. Complete the steps to attach the chosen message to a Jira issue.

Observed: Mattermost Markdown is not converted to Jira formatting, breaking the appearance of the issue in Jira. Few of these cases are listed below.

Proposed change: When a Jira issue is created or a message is attached to Jira, automatically convert Mattermost Markdown to Jira formatting.


CASES: (See https://mattermost.atlassian.net/browse/MM-15723 for the original ticket)

image


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Plugin: Jira" community channel.

New contributors please see our Developer's Guide and our Plugins Guide.

could not insert reporter field of jira when create jira issues

I am using Mattermost 5.12.
I checked this issue when use language settings of Jira are Japanese and Chinese. It could not insert reporter field of jira when create jira issues at Mattermost messages.

As a result, the issue can not be created.
It works only when the language setting of Jira is English.

language settings of Jira : Japanese

mattermost512_jira_integration_get_messages

language settings of Jira : English

mattermost512_jira_integration_no_messages

Feature request. / command for issue overview

It has been useful to have an issue overview in channel discussion when no public access to jira is available. The integration slash-jira does this but it might be more appropriate in the plugin.
290BD180-2BB8-47B4-9104-7CBFE8850007

On the spot info more than Autolink
e.g. /jira ASDF-1234

Travis release deployment doesn't work

The release deployment of both v1.0.1 and v1.0.2 failed with:

�[33mPreparing deploy�[0m
Logged in as Chris
Deploying to repo: mattermost/mattermost-plugin-jira
Current tag is: v1.0.2

travis_fold:end:dpl.2
travis_fold:start:dpl.3
�[33mDeploying application�[0m
Setting target_commitish to 7419e8a0b3883497af435f59820a47a81185baa0

travis_fold:end:dpl.3
/home/travis/.rvm/gems/ruby-2.4.1/gems/octokit-4.6.2/lib/octokit/response/raise_error.rb:16:in `on_complete': PATCH https://api.github.com/repos/mattermost/mattermost-plugin-jira/releases/14509117: 404 - Not Found // See: https://developer.github.com/v3/repos/releases/#edit-a-release (Octokit::NotFound)
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/faraday-0.15.4/lib/faraday/response.rb:9:in `block in call'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/faraday-0.15.4/lib/faraday/response.rb:61:in `on_complete'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/faraday-0.15.4/lib/faraday/response.rb:8:in `call'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/octokit-4.6.2/lib/octokit/middleware/follow_redirects.rb:73:in `perform_with_redirection'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/octokit-4.6.2/lib/octokit/middleware/follow_redirects.rb:61:in `call'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/faraday-0.15.4/lib/faraday/rack_builder.rb:143:in `build_response'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/faraday-0.15.4/lib/faraday/connection.rb:387:in `run_request'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/faraday-0.15.4/lib/faraday/connection.rb:175:in `patch'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/sawyer-0.8.1/lib/sawyer/agent.rb:94:in `call'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/octokit-4.6.2/lib/octokit/connection.rb:154:in `request'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/octokit-4.6.2/lib/octokit/connection.rb:46:in `patch'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/octokit-4.6.2/lib/octokit/client/releases.rb:55:in `update_release'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/dpl-releases-1.10.6/lib/dpl/provider/releases.rb:154:in `push_app'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/dpl-1.10.6/lib/dpl/provider.rb:199:in `block in deploy'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/dpl-1.10.6/lib/dpl/cli.rb:41:in `fold'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/dpl-1.10.6/lib/dpl/provider.rb:199:in `deploy'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/dpl-1.10.6/lib/dpl/cli.rb:32:in `run'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/dpl-1.10.6/lib/dpl/cli.rb:7:in `run'
	from /home/travis/.rvm/gems/ruby-2.4.1/gems/dpl-1.10.6/bin/dpl:5:in `<top (required)>'
	from /home/travis/.rvm/gems/ruby-2.4.1/bin/dpl:23:in `load'
	from /home/travis/.rvm/gems/ruby-2.4.1/bin/dpl:23:in `<main>'
failed to deploy

"Attach to Jira Issue" should also search issue by key.

  • Select "Attach to Jira" from post-option menu.
  • Type some text. Observe search results in the autocomplete dropdown.
  • Erase the text and try typing an existing ticket number. Observe search not finding the ticket

Expected: typing in an existing ticket number should work.

image

This may be as simple as tuning the search API we use, or may involve recognizing ticket keys with a regex and using a different API.

Jira: https://mattermost.atlassian.net/browse/MM-18154

Allow uppercase in URL?

If I create a custom webhook in Jira specifying the channel name in lowercase, the plugin works perfectly. If I try using the project.key variable (channel=${project.key}), the URL resolved in uppercase and I get a 404 error. Is there any change I can make to the webhook URL to send the post in lowercase or an edit to the plugin to negate case?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.