I started to write a little plugin which change the value of a custom field (enumeration) when the status is set to resolved.
I got the basic of the plugin and use a hook on the "EVENT_UPDATE_BUG_DATA" event.
Here is my code for the function which is triggered by the hook:
Code: Select all
function bugUpdated($p_issue_id, $p_bug_data, $p_bugnote_text)
{
if( $p_bug_data->status == RESOLVED )
{
$t_id = custom_field_get_id_from_name('KanBan.Status');
#$p_bug_data->KanBan.Status = "Ready";
#custom_field_set_value( $t_id , $p_issue_id, 'Ready');
}
return $p_bug_data;
}