REST API PUT /contacts/{id}
: update
called with notrigger = 1
#29594
Labels
Bug
This is a bug (something does not work as expected)
Bug
Currently, the API endpoint for contact update bypasses triggers (notrigger = 1).
The same is true for some other PUT endpoints (
thirdparty for instance), but not all (contract, BOM, proposal, anything made with ModuleBuilder, etc.).[edit] I was wrong about
thirdparty
because Societe::update's 3rd parameter is$call_trigger
and not$notrigger
as is usually the case. So the 3rd parameter is1
but it does call the trigger. If the endpointPUT /contacts/{id}
was copy-pasted from the third party API, it could explain this issue because this detail is easy to overlook (I'm a good example of that).I assume this is on purpose, but I can't find the reason why, and it is inconsinstent (why notrigger for updating and not for creating, why some objects and not others).
We are developing a feature using triggers to change information whenever a contact is created or updated, but because of this
notrigger
, we can't make it work in APIs.Dolibarr Version
17.0, 18.0, 19.0, develop, …
Environment PHP
any
Environment Database
No response
Steps to reproduce the behavior and expected behavior
Attached files
No response
The text was updated successfully, but these errors were encountered: