Bug
Auto commit off: modification of just frozen topic in trigger fails despite ignore frozen
Issue description
The user saves a form for a new topic T1 which runs two triggers: 1) freezes a related topic T2 and 2) modifies an adjunct T3 of T2. Despite numerous ignore_frozen, the saving of the form fails with the message that the frozen T3 cannot be modified.
Developer comments
The domain case at hand is this: a *visit* V1 is released, by creating a *release* R1. This triggers the freezing of V1, which includes the freezing of the adjunct, the appointment A1 of the visit. When the visit has a reclamation R1, another frozen adjunct, an email is sent and the sending date is added to R1. This causes the exception.
This is caused by an implementation error by using a global flag for ignoring the freeze check during package saving. A trigger that uses ignore frozen will fail always, if the changes cause a trigger, since at the beginning of a trigger the global state is modified so that ignore_frozen is respected. This was a [12778, bugfix for this issue].
This behavior can *only* be observed when a topic is frozen in a trigger T1 and T1 also modifies an existing item of an adjunct, e.g. sets a new sending date (where an old one already is present). Then a BEFORE UPDATE trigger exposes this peculiar bug.
Removed the usage of the global flag.
|
Work sessions2
Start |
2024-04-25T07:19:23
|
End |
2024-04-25T11:45:44
|
Participant |
Robert Cerny
|
Start |
2024-04-25T12:46:10
|
End |
2024-04-25T14:34:28
|
Participant |
Robert Cerny
|
|
We are sorry
This page cannot be displayed in your browser. Use Firefox, Opera, Safari, or Chrome instead.