View Issue Details

IDProjectCategoryView StatusLast Update
0005891mantisbtcustom fieldspublic2005-07-23 02:16
Reporterragnel Assigned Tothraxisp  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionduplicate 
Product Version1.0.0a3 
Summary0005891: We cannot view Custom Field and add them in a project.
Description

1) Manage Custom Fields page.

The list is always empty even if we just have added some custom fields.

2) Edit Project Page

Their is now way adding a custom field.

It seems that existing custom field are invisible.


Regards.

Additional Information

I had a look on "custom_field_api.php" file. The function 'custom_field_get_ids()' do always return empty data.

I suspect that there "join" misuses in the SQL query.

I've modified the query as follow (replacing simple JOIN by LEFT JOIN) :

        # select only the ids that the user has some access to 
        #  e.g., all fields in public projects, or private projects where the user is listed
        #    or private projects where the user is implicitly listed
        $query = "SELECT distinct cft.id as id, cft.name as name
            FROM $t_custom_field_table as cft
                LEFT JOIN $t_custom_field_project_table as cfpt on cft.id = cfpt.field_id
                LEFT JOIN $t_project_table as pt on cfpt.project_id = pt.id
                LEFT JOIN $t_project_user_list_table as pult 
                    on cfpt.project_id = pult.project_id and pult.user_id = $t_user_id
                LEFT JOIN $t_user_table as ut on ut.id = $t_user_id
            WHERE pt.view_state = $t_pub OR 
                ( pt.view_state = $t_priv and pult.user_id = $t_user_id ) OR 
                ( pult.user_id is null and ut.access_level $t_access_clause )
            ORDER BY name ASC";

Now the function seems to work and the problems seems to be resolved.

TagsNo tags attached.

Relationships

duplicate of 0005696 closedthraxisp Custom Field not shown in manage_custom_field_page.php after creation 

Activities

There are no notes attached to this issue.