View Issue Details

IDProjectCategoryView StatusLast Update
0012495mantisbtbugtrackerpublic2011-08-05 02:36
Reporterilsaul Assigned Todhx  
PrioritylowSeverityminorReproducibilityhave not tried
Status closedResolutionduplicate 
Product Version1.2.3 
Summary0012495: Edit Reporter in Bug Editing
Description

I see many Issue on this but never similar to my.

I update mantis from 1.2.1 to 1.2.3 and i can't modifiy the Reporter of an Issue.
i got an error in javascript: loading_lang is not define
this error is on min/ajax.js

TagsNo tags attached.

Relationships

duplicate of 0012412 closeddregad "Reporter" should be editable by access level 

Activities

ilsaul

ilsaul

2010-11-24 03:47

reporter   ~0027466

i make my work arrond! it's not beautiful but i can insert the reporter.

in the file bug_update_advanced_page.php

if ( $tpl_show_reporter ) {
echo '<tr ', helper_alternate_class(), '>';

$t_spacer = 4;

if ( $tpl_show_reporter ) {
    # Reporter
    echo '<td class="category">', lang_get( 'reporter' ), '</td>';
    echo '<td>';

    # my change
    #if ( ON == config_get( 'use_javascript' ) ) {
    #   $t_username = prepare_user_name( $tpl_bug->reporter_id );
    #   echo ajax_click_to_edit( $t_username, 'reporter_id', 'entrypoint=issue_reporter_combobox&issue_id=' . $tpl_bug_id );
    #} else {
        echo '<select ', helper_get_tab_index(), ' name="reporter_id">';
        print_reporter_option_list( $tpl_bug->reporter_id, $tpl_bug->project_id );
        echo '</select>';
    #}

    echo '</td>';
} else {
    $t_spacer += 2;
}
tiliarou

tiliarou

2011-01-20 10:16

reporter   ~0028018

Last edited: 2011-01-20 10:17

In the fix above, every user will be able to change the reporter,
this is better if you want to set permission or not to edit the reporter :
if ( $tpl_show_reporter ) {

Reporter

            echo '<td class="category">', lang_get( 'reporter' ), '</td>';
            echo '<td>';

            #if ( ON == config_get( 'use_javascript' ) ) {
            #       $t_username = prepare_user_name( $tpl_bug->reporter_id );
            #       echo ajax_click_to_edit( $t_username, 'reporter_id', 'entrypoint=issue_reporter_combobox&issue_id=' . $tpl_bug_id );
            #} else {
            $t_current_user_access_level =  current_user_get_access_level();
            if ( $t_current_user_access_level == (ADMINISTRATOR)XOR (MANAGER) XOR (DEVELOPER) ) {
                    echo '<select ', helper_get_tab_index(), ' name="reporter_id">';
                    print_reporter_option_list( $tpl_bug->reporter_id, $tpl_bug->project_id );
                    echo '</select>';
            } else {
                    $t_username = prepare_user_name( $tpl_bug->reporter_id );
                    print ($t_username);
            }
ilsaul

ilsaul

2011-02-08 08:18

reporter   ~0028190

thx for your sugestion. i prefer a version more similar to the original one:

#if ( ON == config_get( 'use_javascript' ) ) {
$t_current_user_access_level = current_user_get_access_level();
if ( $t_current_user_access_level != (ADMINISTRATOR)XOR (MANAGER) XOR (DEVELOPER) ) {
$t_username = prepare_user_name( $tpl_bug->reporter_id );
echo ajax_click_to_edit( $t_username, 'reporter_id', 'entrypoint=issue_reporter_combobox&issue_id=' . $tpl_bug_id );
#print ($t_username);
} else {
echo '<select ', helper_get_tab_index(), ' name="reporter_id">';
print_reporter_option_list( $tpl_bug->reporter_id, $tpl_bug->project_id );
echo '</select>';
}