# Feature AUTOWORK-339 - Implement Block-list approach for customizing List, Hierarchy and Weighted fields

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

## Planning

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

## OPEN POINTS / FEEDBACK

_No work packages_

## Use cases

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

| ID | Type | Subject | Status | Assignee | Target versions | Spent time | Module |
| --- | --- | --- | --- | --- | --- | --- | --- |
| AUTOWORK-377 | Bug | Missing danger dialog when switching from block to allow list when project settings exist | closed | OP Dev Sirius Team | 18.0.0 |  | Administration / Work package administration, Administration / Custom fields |

## Technical Details

| Attribute | Value |
| --- | --- |
| Module | Administration / Custom fields, Administration / Work package administration |
| 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 |  |
| Accountable |  |
| Product manager |  |
| Feature Lead | Klaus Zanders |
| Developers | Klaus Zanders |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

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

## Description

**As** an Administrator  
**I want to** block individual values of a list custom field in specific projects  
**so that** all values stay available everywhere by default, and I only have to configure the projects where a value must not be used

**Acceptance criteria**

  - For work package custom fields of the formats List, Hierarchy and Weighted item list, the Details tab lets the administrator choose how values are made available to projects:
    
      - All values in all projects (default)
    
      - Manually choose which values each project can use (existing allowlist) (<mention class="mention" data-id="80363" data-type="work_package" data-text="#AUTOWORK-303" data-display-id="AUTOWORK-303">\#AUTOWORK-303</mention>)
    
      - Manually choose which values each project cannot use (blocklist)

  - With the blocklist, all values are enabled in every project by default. On the values page of a project, the administrator switches off the values that must not be used there.

  - The Projects tab, the values page (toggles, "Enable all", "Disable all") and the "x of y" count behave the same in both modes.

  - Hierarchy and weighted item list:
    
      - disabling a value also disables all of its descendants;
    
      - enabling a value also enables all of its ancestors. Siblings that were not blocked before stay unblocked.

  - Switching to another mode, or switching it off, removes all project-specific settings of the custom field. When settings exist, the administrator has to confirm this in a danger dialog (same pattern as for disabling the allowlist).

  - Values blocked in a project are hidden everywhere exactly like values not allowed in allowlist mode (forms, display, filters, group by, sort, search, exports, journals, API, MCP).

**Technical notes**

  - The data model, the per-project SQL and the toggle services already support `block`. Remaining work:
    
      - allow `block` in the custom field contract (remove the TODO);
    
      - replace the checkbox on the Details tab with a mode selection;
    
      - extend the confirmation to switches between modes.

  - Extend the existing specs for the services and for usable values with the block cases, where they aren't covered yet.

**Permissions and visibility considerations**

  - *To whom is this feature visible?* Administrators only, same as the allowlist.

  - *When is it not visible?* For all custom fields other than work package List, Hierarchy and Weighted item list fields.

**Out of scope**

  - Configuring the values in the project settings and delegating it to project administrators
