diff --git a/docs/setup/configuration.md b/docs/setup/configuration.md index 8bf1c498d..cdf7055a9 100644 --- a/docs/setup/configuration.md +++ b/docs/setup/configuration.md @@ -10,6 +10,8 @@ 2. At the top of the page set **Enable Plugin** to **True**. 3. Choose **Save** to enable the Jira plugin. +Once you have the plugin configured, you may continue the process by typing `/jira setup` in any channel. This will prompt a direct message from Jira bot, which will guide you through the next setup steps as described below. + ### Step 2: Install the plugin as an application in Jira To allow users to [create and manage Jira issues across Mattermost channels](../end-user-guide/using-jira-commands.md), install the plugin as an application in your Jira instance. For Jira Server or Data Center instances, post `/jira instance install server ` to a Mattermost channel as a Mattermost System Admin, and follow the steps posted to the channel. For Jira Cloud, post `/jira instance install cloud `. diff --git a/server/command.go b/server/command.go index 0b5d8f94c..7f5819758 100644 --- a/server/command.go +++ b/server/command.go @@ -148,6 +148,7 @@ func addSubCommands(jira *model.AutocompleteData, optInstance bool) { // Admin commands jira.AddCommand(createSubscribeCommand(optInstance)) jira.AddCommand(createWebhookCommand(optInstance)) + jira.AddCommand(createSetupCommand()) // Help and info jira.AddCommand(model.NewAutocompleteData("info", "", "Display information about the current user and the Jira plug-in")) @@ -320,6 +321,13 @@ func createWebhookCommand(optInstance bool) *model.AutocompleteData { return webhook } +func createSetupCommand() *model.AutocompleteData { + setup := model.NewAutocompleteData( + "setup", "", "Start Jira plugin setup flow") + setup.RoleID = model.SystemAdminRoleId + return setup +} + type CommandHandlerFunc func(p *Plugin, c *plugin.Context, header *model.CommandArgs, args ...string) *model.CommandResponse type CommandHandler struct {