View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026611 | mantisbt | custom fields | public | 2020-01-18 17:35 | 2020-02-09 07:05 |
Reporter | bluescreenterror | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Platform | Intel i5 | OS | Windows 7 | OS Version | 64 bit Sp1 |
Product Version | 2.23.0 | ||||
Summary | 0026611: Mantis overrides change in custom fields values made by plugin calling custom_field_set_value triggered by EVENT_UPDATE_BUG_DATA | ||||
Description | Hi, I started to write a plugin which updates a custom field when the status is set to resolved (comfort feature for my colleagues). I used the function custom_field_set_value() to manipulate the custom field and get back true, from that function. I checked the db (debug-mode) and the changes where written (phpmyadmin). But the changes where rolled back by update_bug.php line 410 to 413:
The variable $t_custom_fields_to_set is filled with data before the event is triggered, is it possible to change that ? EDIT [dregad] fix markdown | ||||
Steps To Reproduce | Write a plugin, triggered by event EVENT_UPDATE_BUG_DATA, try to change a custom field with the custom_field_set_value() function. | ||||
Tags | No tags attached. | ||||
Adding/Updating this to line 409 in bug_update.php could maybe solve the problem: //Check if custom field where updated trough plugin
} |
|
Can be closed...with wont fix. Got the wrong event...to manipulate Custom_Fields you need EVENT_UPDATE_BUG. Sry but the doc´s as thin as paper on the topic. |
|
Thanks for the feedback
Guilty as charged your honor... But we gladly accept pull requests if you're willing to improve it :-) |
|