0

Add "was changed" Comparison Operator for Ticket Business Rules

CornYriEgelchen ayer a las 04:27 0

### Problem

Currently, Business Rules for tickets in GLPI allow conditions based on field values (e.g., *is*, *is not*, *contains*, etc.).

However, there is no comparison operator such as:

> **"was changed"**

This makes it impossible to trigger a rule only when a specific field value has actually been modified.

At the moment, rules are executed whenever a ticket is saved, even if the relevant field was not changed.

---

## Use Case

A rule should be executed only if:

- The **Category** of a ticket was changed

- The **Priority** was modified

- A specific **custom field** value was updated

### Example Scenario

If the ticket category changes from *Hardware* to *Software*, then trigger reassignment or notification.

If the category remains the same, the rule should not run.

---

## Proposed Solution

Introduce a new comparison operator in Business Rules:

```

Field → Comparison → Value

Category → was changed → (no value required)

```

### Optional Extended Functionality

```

Category → changed from → [old value]

Category → changed to → [new value]

```

---

## Expected Behavior

The rule should execute only when:

- The selected field value differs between the previous and the current state of the ticket.

The rule should not execute when:

- The ticket is saved without modifying that specific field.

---

## Benefits

- More precise automation

- Avoid unnecessary rule executions

- Better control in complex workflows

- Potential performance improvement when many rules are configured

---

## Additional Context

This feature would enhance workflow precision and improve the flexibility of Business Rules in environments with complex automation requirements.