Yes ... if I understand you correctly. From what I understand about what you're doing, you need the events for after user data has been entered, and before it has been posted to the database. See details under:
https://www.mantisbt.org/docs/master/en ... ction.html
You are handling this event:
This event allows plugins to perform post-processing of the bug data structure after being updated.
I think you want these events:
This event allows plugins to perform pre-processing of the new bug data structure after being reported from the user, but before the data is saved to the database. At this point, the issue ID is not yet known, as the data has not yet been persisted.
This event allows plugins to perform pre-processing of the updated bug data structure after being modified by the user, but before being saved to the database.
Then (I believe) your custom field data will be saved with the actual bug item.
Also look at the type of the event : Execute or Chain. The parameters and return values are different.
For EVENT_UPDATE_BUG, you don't get the ID, bug data, and note text. The doc says
<Complex>: Original bug data structure (see core/bug_api.php)
<Complex>: Updated bug data structure (see core/bug_api.php)
And be sure that the data you're saving matches the specs for the custom field. For example, don't allow saving a category that isn't listed in =categories. See chapter 7 of the developer's guide.
Use the right event for your purpose.
Check the specs for the inbound/outbound parameters.
Does that help?