Code Monkey home page Code Monkey logo

mattermost-plugin-playbooks's People

Contributors

agarciamontoro avatar alifarooq0 avatar calebroseland avatar cpoile avatar creeper-0910 avatar crspeller avatar flynbit avatar gbochora avatar grucqq avatar iomodo avatar johnsonbrothers avatar jprusch avatar jthebab avatar julientant avatar justinegeffen avatar kaakaa avatar kaitrin avatar kayazeren avatar lieut-data avatar m-ripper avatar maksimatveev avatar marianunez avatar matt-w99 avatar milotype avatar nickmisasi avatar seoyeongeun avatar shadowshot-x avatar trilopin avatar weblate avatar yoheizuho 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

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

mattermost-plugin-playbooks's Issues

Subpath Deployments are not working

As already mentioned in #711 the subpath deployment is not working correctly. For some parts of the plugin the requests are made against domain.tld/plguins instead of domain.tld/subpath/plugins.

I'll follow up with some more detailed information; i just wanted to extract this issue from #711 because there are two issues in there.

GraphQL API for participating in a run

Add graphql APIs for participating and removing participation in a run:

type Mutation {
    ...
    addRunParticipant(runID: String!, userID: [String!]!): String!
    removeRunParticipant(runID: String!, userID: String!): String!
}

Follow existing pattern for add and remove playbook member.
Add and remove participation should follow the permissions for viewing a run. Note that this means participation means nothing in terms of permissions. It's only a virtual barrier to access.

  • create graphql mutations with current leave/participate behavior (still channel members) #1422
  • store and service functions to handle add/remove members
  • connect graphql to new service functions
  • clean channel checks when joining
  • e2e tests for run gql query and mutations
  • permissions change not covered in this task. RunView and RunManageProperties still rely on channel membrs

Unwanted port exposure

The playbook plugin is serving Prometheus info at port 9093 on all interfaces without config items to control its behavior.

Assign multiple users for a single task in playbooks

It would be great to be able to assign one or multiple users for a single task simultaneously in playbooks since it is very common to assign several people for one task at the same time. Currently, only a single user can be assigned for one task.

Create Migration for channel members to run participants

There must be a migration from members of a channel to the new run participants table. This migration must only run once. Anyone who is a member of the channel associated with the run channelid must become a participant. The list of channel members and run participants should be identical at the end of the migration. This should not change the permission level they have within the run.

This may be able to be done with a single INSERT INTO IR_Run_Participants SELECT DISTINCT. See

for a similar query.

UI for actions syncronizing channel members with run participants

Actions for synchronizing should be exposed in the UI.

  • When a participant joins a run --> Add them to linked channel
  • When a participant leaves a run --> Remove the from the linked channel

Figma

Not as actions for now:

  • When a member joins the run channel --> Add them to the linked run
  • When a member leaves the run channel --> Remove them from the linked run

complete add/join runs with private channels

Given the following resources:

  • Run (Public or Private) "R1" linked to a private Channel "C1"
  • A user "U1" who is a participant of "R1" and member of "C1"
  • A user "U2" who is a participant of "R1" but NOT member of "C1"
  • A user "U3" who is NOT a participant of "R1" and NOT member of "C1". Has view acess to "R1"

When:

  • "U3" clicks on RDP's Participate button -> "U3" is added as participant of "R1", A message is sent to "C1" requesting to be added to channel.
  • "U1" adds "U3" as participant of "R1" -> "U3" is added as participant of "R1" and as a member "C1"
  • "U2" adds "U3" as participant of "R1" -> "U3" is added as participant of "R1" and a message is sent to "C1" requesting to be added to the channel.
    Messages sent to the channel can slighly vary to reflect the different situations.

https://community.mattermost.com/core/pl/o3zhgbs1b3rmf89grhjqzf7zxa

Tasks:

  • participate: when requester has no access to private channel -> plug message again
  • add to run: when requester has no access to private channel -> create message (could be multiple users)

Can not add members to playbook

When I try to edit my playbook and add members via the playbook access and memebers there, or use the Actions to invite memebers, i get an error. From the chrome developer tools i get this:

TypeError: Cannot read properties of undefined (reading 'filter') at ND (invite_users_selector.tsx:63:44) at Xr (react-dom.production.min.js:153:146) at Pi (react-dom.production.min.js:175:309) at bs (react-dom.production.min.js:263:406) at mu (react-dom.production.min.js:246:265) at du (react-dom.production.min.js:246:194) at ou (react-dom.production.min.js:239:172) at react-dom.production.min.js:123:115 at t.unstable_runWithPriority (scheduler.production.min.js:19:467) at Yn (react-dom.production.min.js:122:325)

Some other error wich might be relevant:

assign_owner_selector.tsx:47 Error searching user profiles in custom attribute settings dropdown.

Also in Mattermost the playbooks are getting a white screen and can not be edited.

The request for the users also fails with an ERR_CONNECTION_CLOSED:

https://****/api/v4/users?active=true&in_team=swuryznripbkxp6tnw1h8cug5a&page=0&per_page=200&sort=

I am using mattermost in a docker container with Mattermost Version 6.3.0
And the current playbooks version with 1.23.0

If you need more detailed information hit me up.
Thanks :)

Saving playbook with semicolon in task description fails

Summary

Pressing the "Save" button on a playbook having a task with a description that contains a semicolon does nothing, both in Desktop on Mac and Webapp with Firefox.

Steps to reproduce

Create a playbook. Add a task. Write a description that contains a semicolon. Press the Save button.

Expected behavior

The playbook is saved, and the starting page of the playbook (the one with Preview and Usage tabs) is shown.

Observed behavior (that appears unintentional)

Nothing happens. No error messages, nothing. When using the Webapp with Firefox, the following is logged to the Developer Tools console (domain name and playbook ID altered) when updating an existing playbook ot include a semicolon in a task description:

XHR PUT https://chat.example.com/plugins/playbooks/api/v0/playbooks/ds8324jr4w90fesjf4we0greno
[HTTP/1.1 403 Forbidden 21ms]

Uncaught (in promise) Error: 
    Q Redux
    Sf client.ts:671
    df client.ts:227
    onClick playbook_edit.tsx:345
    s Transition.js:264
    m Transition.js:274
    p Transition.js:293
    p Transition.js:297
    React 5
    U Transition.js:401
    React 2
    unstable_runWithPriority scheduler.production.min.js:12
    React 3
client4.ts:3834:8
    onClick playbook_edit.tsx:347
    AsyncFunctionThrow self-hosted:642
    (Async: async)
    s Transition.js:264
    m Transition.js:274
    p Transition.js:293
    p Transition.js:297
    React 5
    U Transition.js:401
    React 2
    bind_applyFunctionN self-hosted:1319
    Xt self-hosted:1282
    unstable_runWithPriority scheduler.production.min.js:12
    React 3
    bind_applyFunctionN self-hosted:1319
    Vt self-hosted:1282

and the following when creating a new playbook with a task description containing a semicolon:

XHRPOSThttps://chat.example.com/plugins/playbooks/api/v0/playbooks
[HTTP/1.1 403 Forbidden 17ms]

Uncaught (in promise) Error: <html><head><title>Request Rejected</title></head><body>The requested URL was rejected. Please consult with your administrator.<br><br>Your support ID is: 14456753557782223731<br><br><a href='javascript:history.back();'>[Go Back]</a></body></html>
    Q Redux
    wf client.ts:635
    Cf client.ts:582
    df client.ts:223
    onClick playbook_edit.tsx:345
    s Transition.js:264
    m Transition.js:274
    p Transition.js:293
    p Transition.js:297
    React 5
    U Transition.js:401
    React 2
    unstable_runWithPriority scheduler.production.min.js:12
    React 3
client4.ts:3834:8

Possible fixes

Unknown.

Version information

We´re running:

Mattermost Enterprise Edition
Modern communication from behind your firewall.

Mattermost Version: 6.3.6
Database Schema Version: 6.3.6
Database: postgres

The Mattermost Desktop version I´m using is 5.0.4.17220. I don´t know which version of the Playbook plugin we use.

Playbooks not showing

Hey.

I wanted to have a look on the playbook - plugin on my Selfhosted Mattermostserver.
Unfortunately, the playbooks are not displayed in my self-hosted mattermost (Version 6.4.1).
I already tried to remove and reinstall the plugin.
The Server Log shows the following error:
{"timestamp":"2022-03-04 09:04:10.595 +01:00","level":"error","msg":"Access to route for non-existent plugin","caller":"app/plugin_requests.go:37","missing_plugin_id":"com.mattermost.apps","url":"/plugins/com.mattermost.apps/api/v1/bindings?user_id=pzpnx81j4jgubyu7q4szucuh7e&channel_id=u19sbydcp7domg31m55yrwkk8a&team_id=pqzjxxrwa7rg7dw3dhzqt19i5w&user_agent=webapp","error":"plugin not found: com.mattermost.apps"}

Can you help me with that issue?

Deleted Playbook still partly accessible

Summary

Deleting a Playbook does not properly & thoroughly remove it.

Steps to reproduce

  • Create a Playbook
  • Start a Run for this Playbook
  • End the Run (maybe not mandatory)
  • Delete the Playbook
  • Go to the Run list
  • Enter the Run just ended
  • Access to the Playbook from the link below the Run name (top left hand corner)

Expected behavior

  • The Playbook should not be accessible, as it has been deleted
  • The Playbook should not be editable and saved
  • Even though the Playbook is edited and saved, it remains invisible in the Playbook list (as it should be)

Observed behavior (that appears unintentional)

  • The Playbook should be deleted
  • The Playbook bot prompts 'Playbook not found for id: ...' when starting a Run for this allegedly deleted Playbook

Possible fixes

  • Remove the Playbook link below the Run title on a specific Run page (see https://mattermost.atlassian.net/browse/MM-37191)
  • Actually remove 'deleted' Playbook
  • Allow treatment of Runs associated to a deleted Playbook (ability to remove purge those Runs?)
  • Allow deletion of Runs

Actions for syncronizing channel members with run participants (no UI)

In an effort to restore existing functionality as soon as possible create hidden actions on run channels that are enabled by default but hidden. No UI is necessary for this ticket.

After this is complete this will restore the existing functionality so we may continue iterating on UI for participant separation.

Run Actions

  • When a participant joins a run --> Add them to linked channel
  • When a participant leaves a run --> Remove the from the linked channel

In addition we will need a migration for existing runs. All existing runs should have all the above actions enabled by default.

Channel Actions (fake)

As we currently don't intend to actually support these channel actions beyond the scope of compatibility, these can be fake non-actions.

  • When a member joins the run channel --> Add them to the linked run
  • When a member leaves the run channel --> Remove them from the linked run

Plural forms at Weblate

Please specify, how plurar forms should be translated at Weblate … which part of the strings should be translated and how. Please give an example for Croatian (which uses plural forms "one", "few", "other").

I'm not a programmer, so I'm insecure how to go about it …

For instance:

  • {numActiveRuns, plural, =0 {no active runs} =1 {# active run} other {# active runs}} (key 1MQ3XZ)
  • {numParticipants, plural, =0 {no active participants} =1 {# active participant} other {# active participants}} (key Q7aZO4)
  • {num_runs, plural, =0 {Not run yet} one {# run} other {# total runs}} (key YDuW/T)
  • {numTotalRuns, plural, =0 {no runs started} =1 {# run started} other {# runs started}} (key sQu1rA)
  • {num_checklists, plural, =0 {no checklists} one {# checklist} other {# checklists}} (key soePYH)

I have the same problem with Focalboard webapp at Weblate for:

  • {count, plural, one {# Board} few {# Boards} other {# Boards}} (key General.BoardCount )

start-a-run modal, common fields

Stop using the old (and recently modified) modal and implement the minimum version of the new one.

Figma

This task should cover:

  • run name
  • run summary
  • choose linked channel or choose to create one

Image

out of scope:

  • advanced config
  • playbooks step

Schedule a playbook to run periodically

Hello, Is there a way to schedule a playbook to run periodically? For example, schedule it to run every week on Thursday morning? If not, I would like to leave this suggestion.

No notification if trying to save private playbooks on MM Team Edition

Hi,
I just started to play around with playbooks when I noticed a quite confusing thing. When I create a private playbook on a MM Team Edition server and try to save it, nothing is happening. I was lucky because I could see the following in the server logs:
{"timestamp":"2022-03-11 09:50:32.562 +01:00","level":"warn","msg":"public error message: Not authorized; internal details: private playbooks are not available with your current subscription: not covered by current server license","caller":"app/plugin_api.go:931","plugin_id":"playbooks"}
but for all the other users, that might be quite a negative user experience.

Maybe you could show a popup, that private playbooks are not available for MM Team Edition, right when you try to create them or even "disable" them completely, if the right license is not available.

Unstoppable playbook runtime if target channel renamed

Hi there
Steps to reproduce:

  • start a playbook runtime
  • rename target channel
  • press "Go to channel" from runtime page

By the end we have endlessly runtime with "freezed" state. and this writes messages to members every day. without ability to stop runtime
Official way to stop it: press "Go to channel" button and execute '/playbook finish'. But then target channel was renamed you have "Channel Not Found" error

I try to archive parent playbook but this runtime still run

Seems like there is no "simple" way to drop it

May be you can told me legitimately query to DB for delete this runtime like WA?

Update table for run participants

There exists a table that tracks followers. For tracking participants we will update it.

The IR_Run_Participants table currently has the following fields:

Column Description
IncidentID ID of the run the user may be a participant or follower in. Refrences ir_incident
UserID ID of the user. References users
IsFollower true if the user is a follower false if not

Despite the name it doesn't track participants, only followers. We must add the following fields:

Column Description
IsParticipant true of the user is actually a participant

Existing queries such as the one in

should be updated to match.

Running Mattermost 6.4.1, I see Unable to activate plugin (playbooks)

(As requested, I'm "re-opening" this here instead.)

Summary

After upgrading from MM 6.3.x to .6.4.1, I see this in the log: "Unable to activate plugin","caller":"app/plugin.go:142","plugin_id":"playbooks"

Steps to reproduce

I don't know, I get it every time I re-start MM

Expected behavior

I would expect any migration to successfully complete.

Observed behavior (that appears unintentional)

{"timestamp":"2022-03-07 19:55:58.715 Z","level":"error","msg":"Unable to activate plugin","caller":"app/plugin.go:142","plugin_id":"playbooks","error":"failed to run migrations: failed to complete migrations: error executing migration from version 0.25.0 to version 0.26.0: failed adding column CategoryName to table IR_Playbook: Error 1118: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs"}
{"timestamp":"2022-03-07 19:56:03.920 Z","level":"warn","msg":"Unrecognized config permissions tag value.","caller":"api4/config.go:379","tag_value":"sysconsole_write_*_read"}

Other information

  • Ubuntu 20.04.LTS
  • MariaDB 10.6
  • MM 6.4.1 (upgraded from MM 6.3.x)

Webhook Update Status - Pass update message to JSON

Hi!

I'm currently trying to synchronize playbook runs' activity with external tools via the Status update outcoming webhook. Unfortunately, when the user "posts" an update, it seems the plugin doesn't pass the posted text of the update to the webhook.

Could it be possible to pass this information to the webhook-update-status.json?

Thanks a lot,
Johan

PS: the playbook feature has a great potential, great work!

Pre-assign tasks

Hey there,

I just started playing around with Playbooks in our Mattermost instance. Looks like this could make onboarding for new coworkers simpler and more structured. As we have certain tasks that are performed, could I pre-assign specific tasks to specific people?

Thanks a lot! Lucas

channels RHS: runs list

Figma designs

server side done at #1545

out of task scope
The following points will be covered in other issues:

  • link run to another different channel
  • multiple sort options component

Run card UI
Image

Card with the following info:

  • run name
  • run owner
  • run participants
  • playbook name
  • last update info if not empty / status update due date if overdue
  • progress bar (length based on completeness and color in due/overdue)
  • dotmenu: link to run details

Runs list

List of all runs linked to this channel:

  • first list, all in-progress runs in alphabetical order
  • second list: the last N finished runs sorted by updated at desc, if there are more finished runs we must offer a "show more" button to get the next batch.

Image

prepare core playbook and update at Playbook Editor

The model and store layer of ir_playbook will need a couple more attributes:

  • channelid: should be filled with the channel id in case we want to default new runs to be linked to an existent channel
  • channelmode (better names accepted) enum to govern the radio. we could rely on the nullability of the channelid field, but that could be a problem later (if we don't want channel at all for example).

we need to migrate the database and extend the models and the webapp types.

UI at PBE
https://www.figma.com/file/eq9Nwyot47KZ9gb4pf5C2L/%E2%96%B6%EF%B8%8F-Multiple-runs-in-a-channel?node-id=321%3A169395

Image

Radio button + input to have the possibility of choosing an existent channel.
When the new choice is checked, Configure channel and public/private selector should be disabled.

To discuss:

  • if we attach runs to existing channels, don't we have to decouple the channel name from the run name? Does it mean we have to move from "Channel name template" to "Run name template" and make it available to both choices "existing and new channels"?

Permissions service migration from channel members to run participants

The current permissions still rely on channel members.

They need to be migrated to run participants.

func (p *PermissionsService) RunManageProperties(userID, runID string) error {
func (p *PermissionsService) RunView(userID, runID string) error {

ManagePermission -> granted if the user is a participant
ViewPermission -> granted if the run is public or if the user is a participant

Check if other functions related to channels can be removed.

Start a run buttons for RHS runs list

For this issue, it's required to have finished the playbook-list step in the start-a-run modal.

Figma designs

Image

At Channels RHS, Add header with start-a-run CTA that triggers the start-a-run modal in the "Select a playbook" step (since we don't have playbook id).

There is also a start run button on the no active runs screen.

start-a-run modal

Figma link

For this task, we assume that we always have playbook id, so there's no back flow to playbooks list and we don't cover the advanced-configuration flow.

The fields that appear are:

  • name template (field with initial focus)
  • choice of existing/new channel
  • channel (if existing channel flow is checked)

The main idea is to re-use the current modal (first screenshot) and add the new options (second and third screenshots)

Image

Image

Image

run list by channel server side (GQL)

Prepare service and store layer to be able to get all the runs linked to a channeled.

At graphql side we have to decide if we evolve the runs root resolver to accept channelID as criteria (and make optional participantOrFollowerID?) or to create another root resolver.

Current:

	runs (participantOrFollowerID: $userID, teamID: $teamID, sort: "name", statuses: ["InProgress"]){
		id
		name
		isFavorite
		playbookID
		ownerUserID
		participantIDs
		metadata { followers }
	}
func (r *RunRootResolver) Runs(ctx context.Context, args struct {
	TeamID                  string `url:"team_id,omitempty"`
	Sort                    string
	Statuses                []string
	ParticipantOrFollowerID string `url:"participant_or_follower,omitempty"`
}) ([]*RunResolver, error) {
...

Markdown Checkbox render issues

When adding tasks the text to the markdown checkbox is rendered in a new line in the "Title" field. In the "Description" field it is correct.

image

Modify existing participation flows

Participation currently means joining the linked channel. Places where users participate need to be modified so they participate rather than join the channel.

Known locations (search for more):

  • Run detail page participate button Figma Designs
  • Playbook action to "invite members" to the channel should instead "invite participants"

Unable to Install Playbooks-Plugin

Hello,

when trying to install the Playbooks-Plugin from the Marketplace on Mattermost 6.7.0, I get the following error:

{"timestamp":"2022-05-25 16:55:37.128 +02:00","level":"error","msg":"Could not find the requested marketplace plugin.","caller":"web/context.go:105","path":"/api/v4/plugins/marketplace","request_id":"XXX","ip_addr":"XXX","user_id":"XXX","method":"POST","err_where":"GetMarketplacePlugin","http_code":500,"err_details":"plugin not found"}

How can this be fixed?

Real time for runs in a channel-decoupled context

we relied on PublishWebsocketEventToChannel, but run members are no anymore necessarily on the channel, so we lost real-time for those users

Temporarily we are sending individual (userid based) was event to avoid breaking the experience.
That should be removed as part of this effort

Optional Description Field Collapsing in RHS View of active Run

See the attached gif file. In this I'm trying to use the Optional Description field of a task to store a template I can paste in the channel header. When I go to select the template text for the channel header the box collapses and I'm not sure I can accurately copy the text I needed.

There seems to be a sequence of using the expand button that allows me to do the copy-paste, but it seems inconsistent (the gif does not demonstrate this).
Task Description Collapsing

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.