# Use Case AUTOWORK-406 - Project-specific rules

Project: Stream Workflows & Automations
Status: specified
URL: https://community.openproject.org/work_packages/AUTOWORK-406

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |

## Details

| Attribute | Value |
| --- | --- |
| Priority | Medium |

## Costs

| Attribute | Value |
| --- | --- |
| Spent units |  |
| Labor costs |  |

## Description

**User case:**

Rules are part of a workflow. Admins define and edit them in the workflow. The same status change can follow different rules in different projects by using different workflows.

Example: Workflow &quot;Bug workflow ALPHA&quot; requires the field Reason for the status change to Cancelled. Workflow &quot;Bug workflow BETA &quot; has no such rule. ALPHA uses a variant with the first workflow, BETA uses a variant with the second. Only users in ALPHA are asked to fill out the field.

**User story:**  
As an admin, I want to define different transition rules per project, so that each team works with the rules that fit its process without affecting other projects.

<br>

**Acceptance criteria:**

1.  An admin can add, change and remove rules in a workflow, directly from the Workflows page
    
2.  Rules are saved with the workflow and apply to every type and variant that uses it ~~in all projects where they are enabled~~
    
3.  ~~Before changing a shared workflow, the admin can see which types/ variants and projects use it~~ _(unrelated to transition rules)_
    
4.  When a workflow is copied, its rules are copied too. Changing the copy does not change the original
    
5.  Given ALPHA uses a workflow with the rule &quot;Reason required for Cancelled&quot; and BETA uses a workflow without it, when a user in ALPHA sets a work package to Cancelled without a reason, then the user is asked to fill in the field _before the transition can occur_. When a user in BETA does the same, then the status changes _immediately_.&nbsp;
    
6.  Changed rules apply from the next status change on. Existing work packages are not changed
    
7.  After a work package is moved to another project, its status changes follow the rules of the new project _(eg. if the new project uses a different variant with a different workflow)_, not the old one
