manager-ui icon indicating copy to clipboard operation
manager-ui copied to clipboard

Content: Workflow Statuses

Open zcolah opened this issue 1 year ago • 1 comments

Problem

Many current customers have asked for the ability to add custom statuses to the content items they are working on so as to allow for them to have a more streamlined efficient workflow. Having the ability to set and see an item's current statuses will allow an organization and it's members to:

  1. Know what stage of the content lifecycle a content item is at and which team is working on it
  2. Whether a content item should be published and prevent accidental publishing of items which are still a work in progress
  3. Add and remove statuses to indicate whether a stage is complete or not only if they have permission to do

Solution

Users can view ,and manage custom statuses from Settings

A user can create, re-order, edit, and de-activate statuses via the Workflows tab in Settings

Image

Users can create custom statuses from here

For any custom status a user can set it's

  1. Name
  2. Description
  3. Color
  4. Which roles can add this status?
  5. Which roles can remove this status?
  6. Allow publish with this status?

Image

Users can add a status to a version of a content item via the version dropdown when editing a content item

Users (with the appropriate permissions) can immediately add and remove statuses via the version dropdown(e.g. Draft)

Image

Users cannot publish items unless they have a status that allows for the same

Failure to have the appropriate status, will display an error similar to the one in the image below. This helps prevent accidental publishes of items still in progress. image

Users cannot add or remove a status unless they have permission to do so

This ensures only the team with the appropriate permissions can mark whether an item is approved or ready to be reviewed or needs changes, etc.

Image

Users without the permission to edit Workflow Statuses will not be able to access the Workflows Admin Panel

This will ensure only users with the role Owners and Administrators can edit Workflow statuses and prevent users from other roles from accidentally editing or modifying statuses and status orders.

image

Figma

Phase 1: https://www.figma.com/file/8wqowEpgXM6Ru4BVdnVyXx/Workflows?type=design&node-id=117%3A42581&mode=dev&t=hXgnY8e7ynA4pDsL-1

Developer Notes

All developer notes have been put as sticky notes next to each flow. I have also listed critical notes here as well for immediate context that can help before reviewing the design.

Workflow Admin Panel in Settings

  1. In the Settings App, create a route that says Workflows under a section called User Settings (as indicated here in this mockup)
  2. By default there should be 3 custom statuses created for all instances that have workflows switched on by default. These statuses should only have a name and description. There should be no rules applied to them. A user should be able to edit these and also deactivate them. They should be in the order: Draft, Needs Review, Approved.
  3. Needs confirmation: Workflows should be loaded for any instance that already exists and for every new instance that is created.
  4. Sort statuses in the sorting order set by the user.
  5. Only users with the role: Owner, Staff, or Admin should be able to view this page. If they do not have permission, they will see the screen on the right.
  6. A user should be able to re-order statuses using the drag indicator on the left of the list item. Similar to the experience we have for re-ordering fields for a model in Schema. This sorting order should be remembered and reflected in the dropdown in the Content Editing experience as well.
  7. A new status created by the user appears at the end of the list. As soon as a new status is created, please put it into Active state (semi transparent orange bg) so that is easy for the user to see where it is. This is similar to the experience of creating a new folder in Media. Clicking anywhere outside of the list item will immediately make it go into a default state.

Status Data we need to store

When a user creates a status we need to store the following information:

  1. Name
  2. Description
  3. Color
  4. Which roles can add this status? - this ensures a status can only be added by one or more role types
  5. Which roles can remove this status? - this ensures a status can only be removed by one or more role types
  6. Allow publish with this status - this ensures a content item can only be published once it gets a status that allows for publishing
  7. Key note: a user should be able to publish a content item with any status until it has atleast one status that has “Allow publish with this status” checked

Color Options

The Color Options in the dropdown should be:

  1. Red: Red 500
  2. Blue - Blue 500
  3. Green - Green 500
  4. Yellow - Yellow 500
  5. Orange: Orange 500
  6. Pink: Pink 500
  7. Rose: Rose 500
  8. Deep Purple: Deep Purple 500
  9. Purple: Purple 500
  10. Grey: Grey 500

Emails

Adding a Status

Once a status is added:

  1. Send an email to all users who have the roles which have the ability to remove the status. See the email format to follow on the right.
  2. Add a log to the content item’s activity log - “[Status Name] status added to [Version Number]” by [User Name] on [Date Time]

Email Format

From: [Status Added By Name]

Subject: [Instance Name] [Status Name] status added to [Content Item Meta Title] [Version Number]

Email Content: [Status Added By Name] added a [Status Name] status added to [Content Item Meta Title] [Version Number]

Open Content Item on Zesty [link to content item] | You have received this email because your role has the ability to remove this status

Note: If no Content Item Meta Title is available, then use the Navigation Text

Email Example

From Gisele Blair [email protected]  Subject [Sony Alpha Universe] Draft status added to What's In My Bag: A Hybrid Sony Alpha Kit For High-Level (v12) Email Content Gisele Blair added a Draft status added to What's In My Bag: A Hybrid Sony Alpha Kit For High-Level (v12)

Open Content Item on Zesty | You have received this email because your role has the ability to remove this status

Removing a Status

  1. Send an email to all users who have the roles which have the ability to add and remove the status. See the email format to follow on the right.
  2. Add a log to the content item’s activity log - “[Status Name] status removed from [Version Number]” by [User Name] on [Date Time]

Email Format

From: [Status Added By Name]

Subject: [Instance Name] [Status Name] status added to [Content Item Meta Title] [Version Number]

Email Content: [Status Added By Name] added a [Status Name] status added to [Content Item Meta Title] [Version Number]

Open Content Item on Zesty [link to content item] | You have received this email because your role has the ability to remove this status

Note: If no Content Item Meta Title is available, then use the Navigation Text

Email Example

From Gisele Blair [email protected]  Subject [Sony Alpha Universe] Draft status added to What's In My Bag: A Hybrid Sony Alpha Kit For High-Level (v12) Email Content Gisele Blair added a Draft status added to What's In My Bag: A Hybrid Sony Alpha Kit For High-Level (v12)

Open Content Item on Zesty | You have received this email because your role has the ability to remove this status

Publishing Rules

If any of the statuses created by the user have a rule that says Needs Status to Publish, then check if that status is applied and also check if the user has permissions to publish this content item. If the answer is yes to both only then allow them to publish. Else show the error as shown down below.

image

Adding a Status and removing a status rules

If a user Tries to Add a Status (but they do not have permission to do so) then show the following tooltip. Tooltip should follow cursor. https://mui.com/material-ui/react-tooltip/#follow-cursor image

If a user Tries to Remove a Status (but they do not have permission to do so) then show the following tooltip. Tooltip should follow cursor. https://mui.com/material-ui/react-tooltip/#follow-cursor

image

zcolah avatar Jul 12 '23 13:07 zcolah