# Epic OP-1594 - Display associated repository revisions in work package show view

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

## Detailed specification

### Motivation and background information

### Acceptance criteria

### Out of scope

| Attribute | Value |
| --- | --- |
| Mockups |  |

## Planning

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

## Subitems

| ID | Type | Subject | Status | Assignee | Target versions | Project | Priority | Spent time |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| OP-2107 | Feature | Work package activities also display repository revisons | closed |  | 5.0.0 | OpenProject | Medium |  |

## Bugs and other work packages

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Module |  |
| Enterprise plan |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable | Jens Ulferts |
| Product manager |  |
| Feature Lead |  |
| Designer |  |
| Developers |  |
| Requested by |  |
| Interest by |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| Work |  |

## Description

**As** an OpenProject user  
**I want** repository revisions belonging to a work package to be displayed in the work package show view  
**so that** I can quickly see which revisions belong to a work package.

**Acceptance criteria**

  - The revisions are shown within the existing activity tab. There is <ins>no</ins> separate tab only for revisions.
  - If there is a commit in the repository module referencing the work package the changeset is shown in the activity list.
  - Only users with the permissions to see commits can see the reference.
  - The displayed revisions are ordered reverse-chronological
  - The revisions in the activity tab includes the:
      - name of the associated commit (“Revision \[Revision-ID\]”, whereas \[Revision-ID\] is the revision ID associated to the commit) as a link to the commit in the repository
      - username of the user performing the commit as a link to the personal profile
          - the username follows the format chosen in the admin settings (Administration \> Settings \> Display tab \> User display format)
      - the commit message provided when making the commit with a link of the referenced (work package(s))
  - OpenProject installations in subfolders are fully supported

**Technical solution concept**

  - Separate API v3 endpoints
      - `api/v3/work_packages/:id/journals` - exists (also it is named activities right now)
      - `api/v3/work_packages/:id/revisions` - to be created (<mention class="mention" data-id="19342" data-type="work_package" data-text="#19342">#19342</mention>)
  - Aggregation of journals and revisions happens in the front-end (<mention class="mention" data-id="21047" data-type="work_package" data-text="#21047">#21047</mention>)
      - Interlacing

**Out of scope**

  - Filter the activities for revisions, comments, status changes etc.
  - Distinct end point for all activities around the work package
      - Journals
      - Revisions
      - Mentions in wikis
      - Mentions in other work packages
      - …
  - Pagination in the backend. If performance becomes an issue, we have to review this.
