custom field on resolved status doesn´t work

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
kcastro

custom field on resolved status doesn´t work

Post by kcastro »

Hi,

i've created a custom field, i want it appears only when i resolve a bug but doesn't work correctly.

doesn't show anything, in any change status page

i selected just two options:

Display When Resolving Issues
Required On Resolve


i'm doing something wrong?

thanks for your help!!

PD:sorry about my english, my native language is spanish
aditik
Posts: 2
Joined: 27 May 2014, 11:45
Location: Mumbai

Re: custom field on resolved status doesn´t work

Post by aditik »

I am also facing same problem for Custom field
I am having Date field which will have current date value on Updating issue status to Resolve
I added one function

Code: Select all

function set_resolve_date_to_custom_field( $p_bug_id,$t_status) {	
    $resfield = custom_field_get_id_from_name('Date Resolved');   
    $p_project_id = bug_get_field( $p_bug_id, 'project_id' );
    if( custom_field_is_linked($resfield, $p_project_id) ) {
        $resdate = db_now();     
        custom_field_set_value( $resfield, $p_bug_id, $resdate, true );
    }
}
function called in

Code: Select all

 function bug_resolve( $p_bug_id, $p_resolution, $p_status = null, $p_fixed_in_version = '', $p_duplicate_id = null, $p_handler_id = null, $p_bugnote_text = '', $p_bugnote_private = false, $p_time_tracking = '0:00' ) {
set_resolve_date_to_custom_field ( $p_bug_id,$t_status)
}
but its not getting called on bug resolve
why this is not working
Post Reply