Conditionally display user action buttons

Peter van Meijel 12 months ago • updated 10 months ago 4 2 duplicates

As an administrator, I would like to display user action buttons conditionally so that I can reduce the number of statuses.

(WHY) Depending on the status of a document, user action buttons are displayed. However, sometimes there is need for more fine-grained control.

(WHO) Administrator

(WHAT) Conditionally display user action buttons

Current Situation

Currently user action buttons are displayed based on the status of a document. To hide a button, the status of a document needs to change.

This is not always desirable:

  • Sometimes we want to show/hide a button based on a condition (say a checkbox that is marked). This condition does not necessarily represent a new "stage" in the business process.
  • By adding a large number of statuses to the document, the document definition itself gets big.

Acceptance Criterea

This story consists of two parts:

  • Setting the condition
  • Show/hide the button conditionally

Set the condition

To set the condition, the administrator

  1. Opens the document definition
  2. Opens the Workflow section
  3. Double clicks on a user action so that the user action dialog opens
  4. Enters the condition in the Display Only If box
  5. Clicks on Ok to close the User Action dialog
  6. Clicks on Save to persist the document definition

Show/hide the button conditionally

A user action button is displayed if:

  • The document has the status to which the user action button is linked (already in place)
  • The user is an administrator or belongs to an access group that has access to the user action (already in place)
  • If there is a condition, the condition is met

This last step has to be implemented for both desktop and mobile.

UI/UX Design

Mockup 1: the User Action dialog with the Display Only If field

Sprint 26 April 2017 - 23 May 2017

Duplicates 2