1 | <?php |
---|
2 | /************************************************************************************************\ |
---|
3 | * Gerencia de projetos ageis * |
---|
4 | * by Rafael Raymundo da Silva (rafael2000@gmail.com) * |
---|
5 | * ----------------------------------------------------------------------------------------------* |
---|
6 | * This program is free software; you can redistribute it and/or modify it * |
---|
7 | * under the terms of the GNU General Public License as published by the * |
---|
8 | * Free Software Foundation; either version 2 of the License, or (at your * |
---|
9 | * option) any later version. * |
---|
10 | \***********************************************************************************************/ |
---|
11 | |
---|
12 | |
---|
13 | class sosprints{ |
---|
14 | var $sprints_name; |
---|
15 | var $sprints_goal; |
---|
16 | var $sprints_dt_start; |
---|
17 | var $sprints_dt_end; |
---|
18 | var $sprints_retrospective; |
---|
19 | |
---|
20 | var $sprints; |
---|
21 | var $sprintsElements; |
---|
22 | var $sprintActive; |
---|
23 | |
---|
24 | |
---|
25 | function sosprintsList(){ |
---|
26 | include_once('../phpgwapi/inc/class.db.inc.php'); |
---|
27 | include_once('inc/class.ldap_functions.inc.php'); |
---|
28 | |
---|
29 | $projId = $_SESSION['phpgw_info']['expresso']['agileProjects']['active']; |
---|
30 | |
---|
31 | $this->sprints_name = $GLOBALS['phpgw']->db; |
---|
32 | $this->sprints_goal = $GLOBALS['phpgw']->db; |
---|
33 | $this->sprints_dt_start = $GLOBALS['phpgw']->db; |
---|
34 | $this->sprints_dt_end = $GLOBALS['phpgw']->db; |
---|
35 | $this->sprints_retrospective = $GLOBALS['phpgw']->db; |
---|
36 | |
---|
37 | $this->sprints = $GLOBALS['phpgw']->db; |
---|
38 | $list = new ldap_functions(); |
---|
39 | |
---|
40 | $this->sprints->query('SELECT * FROM phpgw_agile_sprints WHERE sprints_id_proj='.$projId.' ORDER BY sprints_status DESC',__LINE__,__FILE__); |
---|
41 | if($this->sprints->num_rows()){ |
---|
42 | $i=0; |
---|
43 | while($this->sprints->next_record()) |
---|
44 | { |
---|
45 | $this->sprintsElements['sprints_id'][$i] = $this->sprints->f('sprints_id'); |
---|
46 | $this->sprintsElements['sprints_name'][$i] = $this->sprints->f('sprints_name'); |
---|
47 | $this->sprintsElements['sprints_goal'][$i] = $this->sprints->f('sprints_goal'); |
---|
48 | $this->sprintsElements['sprints_dt_start'][$i] = $this->sprints->f('sprints_dt_start'); |
---|
49 | $this->sprintsElements['sprints_dt_end'][$i] = $this->sprints->f('sprints_dt_end'); |
---|
50 | $this->sprintsElements['sprints_retrospective'][$i] = $this->sprints->f('sprints_retrospective'); |
---|
51 | $this->sprintsElements['sprints_status'][$i] = $this->sprints->f('sprints_status'); |
---|
52 | $i++; |
---|
53 | } |
---|
54 | } |
---|
55 | } |
---|
56 | function soactiveSprint($sprintId){ |
---|
57 | include_once('../header.inc.php'); |
---|
58 | include_once('../phpgwapi/inc/class.db.inc.php'); |
---|
59 | include_once('inc/class.ldap_functions.inc.php'); |
---|
60 | |
---|
61 | $projId = $_SESSION['phpgw_info']['expresso']['agileProjects']['active']; |
---|
62 | |
---|
63 | $this->sprintActive = $GLOBALS['phpgw']->db; |
---|
64 | |
---|
65 | $this->sprintActive->query('UPDATE phpgw_agile_sprints SET sprints_status=false WHERE sprints_id_proj='.$projId,__LINE__,__FILE__); |
---|
66 | $this->sprintActive->query('UPDATE phpgw_agile_sprints SET sprints_status=true WHERE sprints_id_proj='.$projId.' AND sprints_id='.$sprintId,__LINE__,__FILE__); |
---|
67 | } |
---|
68 | } |
---|