1<?php
2# ---------------------------------------------------------------------
3# rth is a requirement, test, and bugtracking system
4# Copyright (C) 2005 George Holbrook - rth@lists.sourceforge.net
5# This program is distributed under the terms and conditions of the GPL
6# See the README and LICENSE files for details
7#----------------------------------------------------------------------
8# ------------------------------------
9# Bug Group Action
10#
11# $RCSfile: bug_group_action.php,v $    $Revision: 1.1.1.1 $
12# ------------------------------------
13
14include"./api/include_api.php";
15auth_authenticate_user();
16
17$page                   = basename(__FILE__);
18$redirect_page			= 'bug_page.php';
19$project_properties     = session_get_project_properties();
20$project_name           = $project_properties['project_name'];
21$project_id				= $project_properties['project_id'];
22
23
24$ids					= explode(":", $_POST['bug_ids']);
25$field					= $_POST['field'];
26$value					= $_POST['field_value'];
27$update_db				= true;
28$test_id_str			= "";
29
30switch( $field ) {
31
32	case 'bug_status':
33		$field_name = BUG_STATUS;
34		break;
35	case 'assign_to':
36		$field_name = BUG_ASSIGNED_TO;
37		break;
38	case 'assign_to_dev':
39		$field_name = BUG_ASSIGNED_TO_DEVELOPER;
40		break;
41
42	case 'test_type':
43
44}
45
46if( $update_db ) {
47
48	# This could become too expensive as we update each bug individually
49	# I'm doing this because we wan't to update the history table for each bug
50	# I can probably find a better way of doing this later bug for now this'll do
51	# UPDATE bug_table WHERE bug_id IN ( 1, 2, 3, 4 )
52	# Or maybe use a temp table to join the bug_table and history table and run
53	# one update
54	foreach($ids as $bug_id) {
55
56		if( $bug_id != '' ) {
57			bug_update_field( $bug_id, $field_name, $value );
58		}
59	}
60
61
62}
63
64html_print_operation_successful( "bug_page", $redirect_page );
65
66# ------------------------------------
67# $Log: bug_group_action.php,v $
68# Revision 1.1.1.1  2005/11/30 23:00:56  gth2
69# importing initial version - gth
70#
71# ------------------------------------
72?>