# Feature SPPM-102 - Filters for phases and phase gates in project list

Project: Stream Project Portfolio Management
Status: closed
URL: https://community.openproject.org/work_packages/SPPM-102

## Planning

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Target versions | 16.1.0 |
| 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 |
| --- | --- | --- | --- | --- | --- | --- | --- |
| SPPM-172 | Bug | "This week" filter is not working correctly | closed |  | 16.1.0 |  | Modules and project features / Query and filter, Modules and project features / Project lifecyle - phases and gates |
| SPPM-171 | Bug | Project phase filters are not ordered alphabetically as other filters | rejected |  | 16.1.0 |  | Modules and project features / Query and filter, Modules and project features / Project lifecyle - phases and gates |

## Technical Details

| Attribute | Value |
| --- | --- |
| Module | Modules and project features / Project lifecyle - phases and gates |
| 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 Polaris Team |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Estimates and progress

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

## Description

**As** a project portfolio manager  
**I want to** have filters for phases and gates on the project list  
**so that** I can drill down on projects falling into a category (e..g all projects currently being closed)

**Acceptance criteria**

  - The project list offers filters on stages and gates
    
      - Available filters:
        
        1.  Projects that are in any phase/gate
            
              - Name: "Project phase: Any"
        
        2.  Projects that are in a specific phase/gate
            
              - This will require having one filter per phase/gate that are dynamically added/removed when new phase/gates are added.
            
              - The activation/deactivation of a phase/gate within a project does not factor into the availability of the filter. As soon as the phase/gate is created in the administration, the filter is available.
            
              - Name for a stage: "Project phase: \[Name of the phase\]"
            
              - Name for a gate: "Project phase gate: \[Name of the gate\]"
    
      - Operators for both filters:
        
          - today - no value required: Matches if the specified phase/gate (for 2.) or if any phase/gate (for 1.) has a start date lower and an end date higher than today.
        
          - this week - no value required: Matches if the specified phase/gate's (for 2.) or if any phase/gate's (for 1.) interval formed by start and end date overlap the date interval created by the current week.
            
              - The calculation for the current week takes the "Week starts on" Setting into account.
        
          - on  - one value required: Matches if the specified phase/gate (for 2.) or if any phase/gate (for 1.) has a start date lower and an end date higher than the provided date.
        
          - between - two values: Matches if the specified phase/gate's (for 2.) or if any phase/gate's (for 1.) interval formed by start and end date are within the date interval created by the two values. If only the lower value is provided, it matches if the stage/gate's values are higher than the value. If only the upper value is provided, it matches if the phase/gate's values are lower than the value.
        
          - is empty - no value required: Matches if the specified phase/gate (for 2.) or if any phase/gate (for 1.) has no value set.
    
      - Restrictions
        
          - In case a phase/gate is disabled in a project the value that stage/gate might have set in the project is not found.
        
          - The filters are only available if the user has the "View project phases" permission in any project.
        
          - Only values set for stages/gates within a project are only filtered on if the user has the "View project phases" in that project.

  - The filters are also available via the API v3.
    
      - Those added filters need to be documented in the API documentation.

**Assumptions**

  - A stage will always have no date or both dates set. It will never be the case that only the start or only the end date are set.

**Note**

  - the filter for lifecycle columns has been [hard-coded to be disabled](https://github.com/opf/openproject/pull/17400). Remove the comment in `sort_helper`.
