# Feature OP-12143 - Adding custom hook for custom fields calculation

Project: OpenProject
Status: rejected
URL: https://community.openproject.org/work_packages/OP-12143

## Planning

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

## OPEN POINTS / FEEDBACK

_No work packages_

## Features and Chunks

_No work packages_

## Bugs and other work packages

_No work packages_

## Technical Details

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

## Details

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

## People

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

## Estimates and progress

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

## Description

## User Story

**As** a _plugin developer,_  
**I need** specific hooks in the service implementation\_,\_  
**so that** I am _able to calculate the values of custom fields automatically based on values of other custom fields of one or more work-packages._

**Acceptance criteria**

*   hooks for creation, updating and deletion of work-packages

## Context information of the current impementation of the plugin

*   The hooks are already in our core implemenation. **A pull request can be created.**
*   The plugin should allow the user to specify a formula for calculating the custom field values.
*   The plugin should automatically update a custom field with the calculated value for each work package whenever a custom field (added to the formula) is updated or a new work package is created.
*   The plugin should automatically update the ranking of each work package based on the updated custom field with the calculated value whenever a custom field (added to the formula) is updated or a new work package is created.
*   The plugin should also update the ranking of each work package when a work package is deleted.
*   The plugin should provide a user-friendly interface for managing custom fields and configuring the calculation formula.
