# Feature AUTOWORK-301 - Global Administration for contextualization of list/hierarchy custom fields

Project: Stream Workflows & Automations
Status: needs review
URL: https://community.openproject.org/work_packages/AUTOWORK-301

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions |  |
| Sprint |  |
| Backlog bucket |  |
| Votes |  |
| List |  |
| Roadmap |  |
| Relevance |  |

## OPEN POINTS / FEEDBACK

_No work packages_

## Use cases

_No work packages_

## Features and Chunks

| ID | Subject | Type | Status | Assignee | Target versions | Spent time |
| --- | --- | --- | --- | --- | --- | --- |
| AUTOWORK-308 | Add feature flag "Contextualization of custom fields" | Implementation | rejected |  |  |  |
| AUTOWORK-389 | Add special display of project specific items for Hierarchy CustomFields | Implementation | closed |  | 18.1.0 |  |
| AUTOWORK-390 | Add special display of project specific items for List CustomFields | Implementation | closed |  | 18.1.0 |  |
| AUTOWORK-391 | Implement Uniqueness Rules for Option Names | Implementation | closed |  | 18.1.0 |  |
| AUTOWORK-393 | UI to set all settings (custom mode, managing by project admins, adding project variants)   | Implementation | closed |  | 18.1.0 |  |
| AUTOWORK-395 | Provide project-specific field values when requesting options | Implementation | closed |  | 18.1.0 |  |
| AUTOWORK-396 | Restrictions for Hierarchy Fields with Project specific values | Implementation | closed |  | 18.1.0 |  |
| AUTOWORK-397 | Make sure that parents of project-specific values are always visible | Implementation | closed |  | 18.1.0 |  |
| AUTOWORK-398 | Management UI in project administration | Implementation | in review | Oliver Günther | 18.1.0 |  |
| AUTOWORK-399 | When copying a project, properly copy project specific values | Implementation | in review | David Friquet | 18.1.0 |  |
| AUTOWORK-400 | Management UI for adding project specific custom values in global admin | Implementation | closed |  | 18.1.0 |  |
| AUTOWORK-404 | Allow admins to make a project specific option global | Implementation | closed |  | 18.1.0 |  |

## Bugs and other work packages

_No work packages_

## Technical Details

| Attribute | Value |
| --- | --- |
| Module |  |
| Feature Flag |  |
| Requires doc change | No |
| Enterprise plan | Enterprise / Premium (PRE) |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Build Number |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee | Oliver Günther |
| Accountable |  |
| Product manager |  |
| Feature Lead | Klaus Zanders |
| Developers | Klaus Zanders |
| Designer | Parimal Satyal |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| PD (min) |  |
| PD (max) |  |
| Work |  |
| Labor costs |  |

## Description

**As** a global administrator  
**I want to** decide in the administration of a list or hierarchy custom field which values each project can use, and whether project admins may adjust or extend these values  
**so that** I maintain one global list of values while every project only sees the values that fit it

## Acceptance criteria

*Details tab of a custom field*

  - Work package custom fields of the formats list, hierarchy and weighted item list have a section "Project-specific values" with three options:
    
      - **Show the same values for all projects** (default): all values are available in all projects.
    
      - **Allow filter**: by default no value is available in any project. The global admin activates values per project.
    
      - **Block filter**: by default all values are available in all projects. The global admin deactivates values per project.

  - Switching between the options shows a warning that explains the effect of the switch before saving.

  - Below the selected option, the global admin can set what project admins may do:
    
      - "Project admins can manage values at a project level": only offered for the Allow filter and the Block filter.
    
      - "Project admins can add project-specific values": offered for all three options.

  - Only the settings of the selected option are shown. When switching to "Show the same values for all projects", "manage values at a project level" is turned off on save.

*Projects tab of a custom field*

  - For the Allow filter and the Block filter, the global admin can open a project and activate or deactivate single values for it, or all values at once.

  - With the Allow filter, a new global value is not available in any project until the global admin activates it.

  - With the Block filter, a new global value is available in all projects that use the field.

  - The project list can be filtered to the projects that have project-specific values.

*Values tab of a custom field*

  - Values that were added by a project are shown in the global list with a project-specific label (small, muted text). In the table of a flat list this is a separate "Project-specific" column.

  - A project value can only have sub-values of the same project. Its empty state explains that sub-values can only be added in the project administration.

  - The global admin cannot add a global value below a project value. Actions that would do so are not offered.

  - An administrator can convert a project-specific value to a global one.

  - When moving a value, parents it cannot be moved to are disabled, for example values of other projects.

  - A project value cannot be the default value of the field.

  - Errors that do not belong to a single input are shown as a banner above the form.

*Uniqueness of values*

  - Global values are unique among all values of the same level (hierarchy) or of the field (list).

  - Project values are unique among the global values and the values of the same project.

  - Two projects can each have a value with the same name.

  - These rules apply when creating, renaming and moving values.

*Behavior in projects*

  - Users can only select the values that are available in their project. This applies to forms, filters, sorting, grouping and the API.

  - In project context, global administrators see the same values as everyone else in that project, for example in work package filters.

  - Values added by a project are always available in that project, no matter whether the Allow filter or the Block filter is used. They are never visible in other projects.

  - In a hierarchy, a value is only available if its parents are available in the project as well.

  - When a value that is already used in a project is deactivated, the work packages keeps the value internally but it is displayed as *(Value no longer available)*.

## Technical notes

  - The settings for project admins are stored in the custom field settings (`allow_additional_project_values`, `project_level_value_management`). The available values are calculated per custom field, so no query needs to read these settings.

  - Project values carry the ID of their project. This applies to both the options of a list and the items of a hierarchy.

  - Values can be created with a project through the services (`HierarchicalItemService#insert_item`). For now these are limited to global admins, and they fail when "Project admins can add project-specific values" is off.

## Permissions and visibility considerations

  - *To whom is this feature visible?*
    
      - Global administrators, on the Details, Values and Projects tabs of work package custom fields of the formats list, hierarchy and weighted item list.
    
      - The feature requires the Enterprise feature "Project-specific values for custom fields". Without it, the options and the project admin settings are shown but disabled, together with an Enterprise banner.

  - *When is it not visible?*
    
      - For custom fields of other formats.
    
      - For project, user, version, group and time entry custom fields.
    
      - The settings for project admins are not effective yet. The project permission that project admins need is part of <mention class="mention" data-id="80364" data-type="work_package" data-text="#80364">#80364</mention>.

## Translation considerations

  - Key terms and phrases:
    
      - "Project-specific values"
    
      - "Allow filter"
    
      - "Block filter"
    
      - "Project admins can manage values at a project level"
    
      - "Project admins can add project-specific values"
    
      - "global value" and "project value"
    
      - "project administration"

  - The "Items" tab is renamed to "Values" (<mention class="mention" data-id="83074" data-type="work_package" data-text="#83074">#83074</mention>). Texts should consistently speak of values.

## Out of scope

  - Project-specific default values (V3).

  - Values per work package type or variant.

  - Archiving of values (<mention class="mention" data-id="AUTOWORK-299" data-type="work_package" data-text="#AUTOWORK-299">#AUTOWORK-299</mention>) and setting values via the API (<mention class="mention" data-id="AUTOWORK-297" data-type="work_package" data-text="#AUTOWORK-297">#AUTOWORK-297</mention>).

  - Combining hierarchy and list into a single list custom field (<mention class="mention" data-id="80362" data-type="work_package" data-text="#80362">#80362</mention>).

*Set the* **To be informed/consulted teams** *field to include all teams necessary to be informed of the changes.*
