# Feature OP-10279 - Allow cost types to be enabled/disabled per project

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-10279

## Planning

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

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

| ID | Subject | Type | Status | Assignee | Target versions | Spent time |
| --- | --- | --- | --- | --- | --- | --- |
| OP-19302 | Add project-specific selection for cost types | Implementation | closed |  | 17.6.0 |  |

## Bugs and other work packages

| ID | Type | Subject | Status | Assignee | Target versions | Spent time | Module |
| --- | --- | --- | --- | --- | --- | --- | --- |
| OP-19609 | Bug | Cost fields are still showing on WPs even if all cost types are disabled in the project | closed |  | 17.6.0 |  | Modules and project features / Costs and budgets |
| OP-19599 | Bug | Disabled project cost types not correctly filtered out | closed |  | 17.6.0 |  | Modules and project features / Costs and budgets |
| OP-19608 | Bug | New and existing Cost types systematically show in all projects | rejected |  | 17.6.0 |  | Modules and project features / Costs and budgets |

## Technical Details

| Attribute | Value |
| --- | --- |
| Module |  |
| Feature Flag |  |
| Requires doc change | Yes |
| Enterprise plan |  |

## Details

| Attribute | Value |
| --- | --- |
| Pull preview |  |
| Mockups |  |
| Accessibility | No |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Feature Lead |  |
| Developers | OP Dev Sirius Team |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

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

## Description

**As** an Enterprise user,  
**I want** to have the option to limit cost types for certain projects  
**so that** these are only available in certain projects.

<br>

**Acceptance criteria**

*   Add a projects association to every cost type, similar to a custom field
    
*   When editing a cost type
    
    *   a new boolean field &quot;For all projects&quot; is added, which is checked in the migration
        
        *   This ensures current behavior stays the same
            
    *   There is a second tab &quot;Projects&quot;
        
        *   This tab behaves identical to the custom field administration, allowing administrators to add cost types
            
*   When inside the project settings
    
    *   There is a new menu entry &quot;Time and costs&quot;
        
    *   The &quot;Time entry activities&quot; are moved into that menu, as a tab
        
    *   A new tab &quot;Cost types&quot; is added, showing a selection list for all cost types similar to time entry activities
        
*   When all cost types are disabled in a project, the option to log and show unit costs is removed
    
*   When a subset of cost types are active, only those types can be chosen by the user
    
    *   In effect, a cost type is only visible to a user if they can log costs with it in any projects the type is active
        
*   The edit form and project select is primerized
    
    *   We remove the rate editing on the index page, in favor of showing rates as a separate tab
        

<br>

**Mockup ideas**

**<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/920867/content">**

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/920868/content"> <img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/920870/content">

<br>
