cs-project-svn_notify Mailing List for CS-Project (Page 7)
Brought to you by:
crazedsanity
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(65) |
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(34) |
Feb
(82) |
Mar
(21) |
Apr
(12) |
May
(16) |
Jun
|
Jul
(6) |
Aug
(8) |
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
(1) |
Feb
(52) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(9) |
Aug
(5) |
Sep
(12) |
Oct
(11) |
Nov
(4) |
Dec
(15) |
2010 |
Jan
|
Feb
|
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(9) |
2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: <cra...@us...> - 2008-05-12 22:18:44
|
Revision: 891 http://cs-project.svn.sourceforge.net/cs-project/?rev=891&view=rev Author: crazedsanity Date: 2008-05-12 15:18:42 -0700 (Mon, 12 May 2008) Log Message: ----------- Fix email notices (#159). Modified Paths: -------------- trunk/1.2/lib/helpdeskClass.php Added Paths: ----------- trunk/1.2/templates/email/helpdesk.tmpl Removed Paths: ------------- trunk/1.2/templates/email/helpdesk-new.tmpl trunk/1.2/templates/email/helpdesk-remark.tmpl Modified: trunk/1.2/lib/helpdeskClass.php =================================================================== --- trunk/1.2/lib/helpdeskClass.php 2008-05-12 20:49:31 UTC (rev 890) +++ trunk/1.2/lib/helpdeskClass.php 2008-05-12 22:18:42 UTC (rev 891) @@ -173,7 +173,7 @@ if($retval > 0) { //send the submitter an email $newRemarks = $remark; - $emailTemplate = html_file_to_string("email/helpdesk-remark.tmpl"); + $emailTemplate = html_file_to_string("email/helpdesk.tmpl"); $linkAction = "view"; if($useRespondLink) { @@ -198,7 +198,7 @@ //okay, now send the email. The function "send_email()" should be ensuring that all values in // the recipients array are valid, and there's no dups. - $subject = "Update to Helpdesk Issue #". $helpdeskId ." -- ". $tmp['name']; + $subject = "Helpdesk Issue #". $helpdeskId ." -- ". $tmp['name']; $sendEmailRes = send_email($recipientsArr, $subject, $emailTemplate, $parseArr); //log who we sent the emails to. @@ -341,19 +341,19 @@ //got good data... get the note_id. //now send 'em an email about it. - $emailTemplate = html_file_to_string("email/helpdesk-new.tmpl"); + $emailTemplate = html_file_to_string("email/helpdesk.tmpl"); $parseArr = $this->get_record($retval); $normalEmailExtra = NULL; $emailAddressList = $linkObj->get_record_email_list($newRecord); if((strlen($_SESSION['login_email'])) && ($_SESSION['login_email'] != $parseArr['email'])) { - $subject = "Created Helpdesk Issue #$retval Created [for ".$parseArr['email'] ."] -- ". $parseArr['name']; + $subject = "Helpdesk Issue #$retval Created [for ".$parseArr['email'] ."] -- ". $parseArr['name']; send_email($emailAddressList, $subject, $emailTemplate, $parseArr); $normalEmailExtra = " [registered by ". $_SESSION['login_loginname'] .": uid=". $_SESSION['login_id'] ."]"; } else { - $subject = "Created Helpdesk Issue #$retval Created". $normalEmailExtra ." -- ". $parseArr['name']; + $subject = "Helpdesk Issue #$retval Created -- ". $parseArr['name']; send_email($emailAddressList, $subject, $emailTemplate, $parseArr); } Deleted: trunk/1.2/templates/email/helpdesk-new.tmpl =================================================================== --- trunk/1.2/templates/email/helpdesk-new.tmpl 2008-05-12 20:49:31 UTC (rev 890) +++ trunk/1.2/templates/email/helpdesk-new.tmpl 2008-05-12 22:18:42 UTC (rev 891) @@ -1,49 +0,0 @@ -<html> -<body> - -<font color="red"><b>DO NOT REPLY TO THIS EMAIL!</b></font> Please -utilize the link provided at the bottom of this message to view -and/or reply to it. Thank you.<BR><BR> - -A new helpdesk issue has been submitted! Please review the details below<br> -for more details. You will be sent an email when the issue is resolved,<br> -along with any updates along the way (if you submitted it or add remarks). - -<table border="1" cellpadding="2" cellspacing="0"> -<tr> - <th>Issue Number:</th> - <td><pre>{public_id}</pre></td> -</tr> -<tr> - <th>Name of Issue:</th> - <td><pre>{name}</pre></td> -</tr> -<tr> - <th>Submitted by:</th> - <td>{email}</td> -</tr> -<tr> - <th>Contents:</th> - <td><pre>{subject}</pre></td> -</tr> -<tr> - <th>Date of Submission:</th> - <td>{start_date}</td> -</tr> -<tr> - <th>Issue Category:</th> - <td>{tag_list}</td> -</tr> -<tr> - <td colspan="2" align="center">Click the link to view online: - [<a href="http://{project_url}/extern/helpdesk/view?ID={public_id}">view</a>]</td> -</tr> -</table> - -Generated by: {PROJ_NAME} v{VERSION_STRING} - -<hr> -$Id$ - -</body> -</html> \ No newline at end of file Deleted: trunk/1.2/templates/email/helpdesk-remark.tmpl =================================================================== --- trunk/1.2/templates/email/helpdesk-remark.tmpl 2008-05-12 20:49:31 UTC (rev 890) +++ trunk/1.2/templates/email/helpdesk-remark.tmpl 2008-05-12 22:18:42 UTC (rev 891) @@ -1,57 +0,0 @@ -<html> -<body> - -<font color="red"><b>DO NOT REPLY TO THIS EMAIL!</b></font> Please -utilize the link provided at the bottom of this message to view -and/or reply to it. Thank you.<BR><BR> - -<table border="1" cellpadding="2" cellspacing="0"> -<tr> - <th>Issue Number:</th> - <td>{public_id}</td> -</tr> -<tr> - <th>Name of Issue:</th> - <td><pre>[helpdesk_id={public_id}]</pre></td> -</tr> -<tr> - <th>Submitted by:</th> - <td>{email}</td> -</tr> -<tr> - <th>Contents:</th> - <td><pre>{subject}</pre></td> -</tr> -<tr> - <th>Date of Submission:</th> - <td>{start_date}</td> -</tr> -<tr> - <th>Issue Category:</th> - <td>{tag_list}</td> -</tr> -<tr> - <th>Assigned To:</th> - <td>{assigned}</td> -</tr> -<tr> - <th>Priority:</th> - <td>{priority}</td> -</tr> -<tr> - <th>New Remark:</th> - <td><pre>{newRemark}</pre></td> -</tr> -<tr> - <td align="center" colspan="2">Click the link to view/respond online: - [<a href="http://{project_url}/extern/helpdesk/view?myLinkAction={linkAction}&ID={public_id}{linkExtra}">{linkAction}</a>]</td> -</tr> -</table> - -Generated by: {PROJ_NAME} v{VERSION_STRING} - -<hr> -$Id$ - -</body> -</html> \ No newline at end of file Copied: trunk/1.2/templates/email/helpdesk.tmpl (from rev 888, trunk/1.2/templates/email/helpdesk-remark.tmpl) =================================================================== --- trunk/1.2/templates/email/helpdesk.tmpl (rev 0) +++ trunk/1.2/templates/email/helpdesk.tmpl 2008-05-12 22:18:42 UTC (rev 891) @@ -0,0 +1,57 @@ +<html> +<body> + +<font color="red"><b>DO NOT REPLY TO THIS EMAIL!</b></font> Please +utilize the link provided at the bottom of this message to view +and/or reply to it. Thank you.<BR><BR> + +<table border="1" cellpadding="2" cellspacing="0"> +<tr> + <th>Issue Number:</th> + <td>{public_id}</td> +</tr> +<tr> + <th>Name of Issue:</th> + <td><pre>[helpdesk_id={public_id}]</pre></td> +</tr> +<tr> + <th>Submitted by:</th> + <td>{email}</td> +</tr> +<tr> + <th>Contents:</th> + <td><pre>{subject}</pre></td> +</tr> +<tr> + <th>Date of Submission:</th> + <td>{start_date}</td> +</tr> +<tr> + <th>Issue Category:</th> + <td>{tag_list}</td> +</tr> +<tr> + <th>Assigned To:</th> + <td>{assigned}</td> +</tr> +<tr> + <th>Priority:</th> + <td>{priority}</td> +</tr> +<tr> + <th>New Remark:</th> + <td><pre>{newRemark}</pre></td> +</tr> +<tr> + <td align="center" colspan="2">Click the link to view/respond online: + [<a href="http://{project_url}/extern/helpdesk/view?myLinkAction={linkAction}&ID={public_id}{linkExtra}">{linkAction}</a>]</td> +</tr> +</table> + +Generated by: {PROJ_NAME} v{VERSION_STRING} + +<hr> +$Id$ + +</body> +</html> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-05-12 20:51:01
|
Revision: 890 http://cs-project.svn.sourceforge.net/cs-project/?rev=890&view=rev Author: crazedsanity Date: 2008-05-12 13:49:31 -0700 (Mon, 12 May 2008) Log Message: ----------- *** RELEASE 1.2.0-ALPHA5 *** SUMMARY OF CHANGES: * more changes to rename "Todo" to "Task" * remove unused admin "config" settings * fix invalid call to logging * fix broken redirect on helpdesk search (#183) * minor alignmnent changes & display version on main page * fix problems with AJAX tags (#185) * fix decimal handling on task creation (#180) Modified Paths: -------------- trunk/1.2/VERSION Modified: trunk/1.2/VERSION =================================================================== --- trunk/1.2/VERSION 2008-05-12 20:43:26 UTC (rev 889) +++ trunk/1.2/VERSION 2008-05-12 20:49:31 UTC (rev 890) @@ -1,4 +1,4 @@ $Id:VERSION 628 2007-11-20 16:58:45Z crazedsanity $ -VERSION: 1.2.0-ALPHA5 +VERSION: 1.2.0-ALPHA6 $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/VERSION $ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-05-12 20:45:20
|
Revision: 889 http://cs-project.svn.sourceforge.net/cs-project/?rev=889&view=rev Author: crazedsanity Date: 2008-05-12 13:43:26 -0700 (Mon, 12 May 2008) Log Message: ----------- Fix problems with AJAX tags and decimals in tasks. AFFECTS ISSUES: #180: Tasks handling decimals poorly #185: AJAX tags failing on helpdesk issues /includes/content/helpdesk.inc: * don't do any exiting or redirecting if $_POST[xajax] is set * remove the exit that ran NO MATTER WHAT. /lib/taskClass.php: * create_task(): -- added "estimate_current" to the cleanStringArr as a decimal so it gets cleaned properly (instead of having the period removed). Modified Paths: -------------- trunk/1.2/includes/content/helpdesk.inc trunk/1.2/lib/taskClass.php Modified: trunk/1.2/includes/content/helpdesk.inc =================================================================== --- trunk/1.2/includes/content/helpdesk.inc 2008-05-06 00:23:25 UTC (rev 888) +++ trunk/1.2/includes/content/helpdesk.inc 2008-05-12 20:43:26 UTC (rev 889) @@ -182,7 +182,10 @@ $url = $baseUrl; //don't bother redirecting to the "view" page if the ID isn't valid. - if(preg_match('/view/', $urlSection) && !is_numeric($urlExtrasArr['ID'])) { + if(isset($_POST['xajax'])) { + //don't exit or anything here: let the AJAX stuff work itself out, I guess. + } + elseif(preg_match('/view/', $urlSection) && !is_numeric($urlExtrasArr['ID'])) { unset($urlSection); conditional_header('/content/helpdesk'); exit; @@ -203,7 +206,6 @@ conditional_header($url); exit; } - exit; } else { $helpdeskId = $_GET['ID']; Modified: trunk/1.2/lib/taskClass.php =================================================================== --- trunk/1.2/lib/taskClass.php 2008-05-06 00:23:25 UTC (rev 888) +++ trunk/1.2/lib/taskClass.php 2008-05-12 20:43:26 UTC (rev 889) @@ -389,6 +389,7 @@ $insertArr[$field] = $value; } + $cleanStringArr['estimate_current'] = 'decimal'; //merge it with the fields we manually set.. $insertArr = array_merge($insertArr, $addFieldsArr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-05-06 00:23:28
|
Revision: 888 http://cs-project.svn.sourceforge.net/cs-project/?rev=888&view=rev Author: crazedsanity Date: 2008-05-05 17:23:25 -0700 (Mon, 05 May 2008) Log Message: ----------- Minor alignment changes, display version on main page. Modified Paths: -------------- trunk/1.2/templates/login.content.tmpl Modified: trunk/1.2/templates/login.content.tmpl =================================================================== --- trunk/1.2/templates/login.content.tmpl 2008-05-06 00:05:37 UTC (rev 887) +++ trunk/1.2/templates/login.content.tmpl 2008-05-06 00:23:25 UTC (rev 888) @@ -8,13 +8,13 @@ <table cellspacing="0" cellpadding="3" border="0"> <tr> - <td> + <td align="center"> <form action='/login.php' method='post' name='frm' onSubmit="this.login.value='Logging in...';this.login.disabled=true;"> <input type='hidden' name'loginform' value='1'> <table cellspacing=1 cellpadding=5 bgcolor="#D5D5D5" border=0> <tr> - <td colspan="2"> + <td colspan="2" align="center"> <br><br><img src='/images/logo.gif' border='0'> </td> </tr> @@ -61,8 +61,8 @@ <tr> <td align="center"> <div>Brought to you by:</div> - <img src="http://www.crazedsanity.com/php-bin/hitsTracker.php?data=_version:{cs-project_version}/_name:{PROJ_NAME}/_image:isUpdateable" border="0"> - </td> + <img src="http://www.crazedsanity.com/php-bin/hitsTracker.php?data=_source:cs-project/_version:{cs-project_version}/_name:{PROJ_NAME}/_image:isUpdateable" border="0"> + <br><font size="-7">CS-Project v{cs-project_version}</font> </td> </tr> </table> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-05-06 00:06:07
|
Revision: 887 http://cs-project.svn.sourceforge.net/cs-project/?rev=887&view=rev Author: crazedsanity Date: 2008-05-05 17:05:37 -0700 (Mon, 05 May 2008) Log Message: ----------- Fix for broken redirect on helpdesk search (#183). AFFECTS ISSUES: #183: Search on helpdesk broken? Redirects broken, probably when AJAX was added (since it POSTs). Precheck that the ID is numeric before setting $urlExtrasArr... also, if the urlSection is "view", and ID isn't set, call conditional_header() to go back to the main helpdesk page. Modified Paths: -------------- trunk/1.2/includes/content/helpdesk.inc Modified: trunk/1.2/includes/content/helpdesk.inc =================================================================== --- trunk/1.2/includes/content/helpdesk.inc 2008-05-05 16:14:13 UTC (rev 886) +++ trunk/1.2/includes/content/helpdesk.inc 2008-05-06 00:05:37 UTC (rev 887) @@ -16,9 +16,11 @@ $helpdeskId = $_POST['id']; $baseUrl = "/content/helpdesk"; $urlSection = "view"; - $urlExtrasArr = array( - "ID" => $helpdeskId - ); + if(is_numeric($helpdeskId)) { + $urlExtrasArr = array( + "ID" => $helpdeskId + ); + } $byPassUrlExtras = FALSE; if($action) { @@ -180,8 +182,10 @@ $url = $baseUrl; //don't bother redirecting to the "view" page if the ID isn't valid. - if(preg_match('/view/', $urlSection) && !is_numeric($urlExtrasArr['ID']) && $byPassUrlExtras === FALSE) { + if(preg_match('/view/', $urlSection) && !is_numeric($urlExtrasArr['ID'])) { unset($urlSection); + conditional_header('/content/helpdesk'); + exit; } else { if(isset($urlSection) && !preg_match('/\?/', $url)) { @@ -199,6 +203,7 @@ conditional_header($url); exit; } + exit; } else { $helpdeskId = $_GET['ID']; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-05-05 16:18:39
|
Revision: 886 http://cs-project.svn.sourceforge.net/cs-project/?rev=886&view=rev Author: crazedsanity Date: 2008-05-05 09:14:13 -0700 (Mon, 05 May 2008) Log Message: ----------- Remove unused admin "config" settings, fix invalid call to logging. Modified Paths: -------------- trunk/1.2/includes/content/settings.inc trunk/1.2/lib/mainRecordClass.php trunk/1.2/templates/content/settings/admin.content.tmpl Modified: trunk/1.2/includes/content/settings.inc =================================================================== --- trunk/1.2/includes/content/settings.inc 2008-05-02 04:45:07 UTC (rev 885) +++ trunk/1.2/includes/content/settings.inc 2008-05-05 16:14:13 UTC (rev 886) @@ -131,11 +131,6 @@ if(count($page->ftsSections) == 3 && $page->ftsSections[2] == 'admin') { if($user->is_admin() == 1) { - #debug_print(get_class($page)); - - $config = new config(); - $config->build_update_interface($page); - //create an object with administrative capabilities. $adminUserClass = new adminUserClass($page->db); Modified: trunk/1.2/lib/mainRecordClass.php =================================================================== --- trunk/1.2/lib/mainRecordClass.php 2008-05-02 04:45:07 UTC (rev 885) +++ trunk/1.2/lib/mainRecordClass.php 2008-05-05 16:14:13 UTC (rev 886) @@ -634,7 +634,7 @@ } else { $details = __METHOD__ .": no data for ancestry (". $ancestryString .") with recordId=(". $recordId ."), or couldn't find lastRecordId (". $this->lastRecordId .")::: ". debug_print($data); - $this->log_by_class($details, 'error'); + $this->logsObj->log_by_class($details, 'error'); throw new exception($details); } $this->isHelpdeskIssue = $oldIsHelpdesk; Modified: trunk/1.2/templates/content/settings/admin.content.tmpl =================================================================== --- trunk/1.2/templates/content/settings/admin.content.tmpl 2008-05-02 04:45:07 UTC (rev 885) +++ trunk/1.2/templates/content/settings/admin.content.tmpl 2008-05-05 16:14:13 UTC (rev 886) @@ -2,63 +2,7 @@ <h2><font color="red">Administrative Settings</font></h2> -<a name="config" /> -<table border="1" cellpadding="3" cellspacing="0" width="80%"> -<tr> - <th colspan="2">Config Settings</th> -</tr> -<tr> - <td colspan="2" align="center"> - <div class="note" style="width:60em"><b>NOTE:</b> You should be <font color="red"><b>absolutely certain</b></font> of the - effects of the changes you make here. Changing an item to an incorrect value make render the - installation useless. To rectify a broken configuration, you would need to modify the - <b>{CONFIG_FILE_LOCATION}</b> file manually.</div> - </td> -</tr> -<tr> - <th width="80%">Name/Description</th> - <th width="20%">Value/Select Option</th> -</tr> -<!-- BEGIN setting_text --> - <tr> - <td> - <b>%%title%%</b> (%%index%%)<BR> - %%description%% - </td> - - <td><input name="%%index%%" type="text" value="%%value%%" %%disabled%%></td> - </tr> -<!-- END setting_text --> -<!-- BEGIN setting_select --> - <tr> - <td> - <b>%%title%%</b> (%%index%%)<BR> - %%description%% - </td> - - <td> - <select name="%%index%%" %%disabled%%> - %%setting_select__normal%% - </select> - </td> - </tr> -<!-- END setting_select --> -<!-- BEGIN setting_locked --> - <tr> - <td> - <b>%%title%%</b> (%%index%%)<BR> - %%description%% - </td> - - <td> - <!-- NOTE: should we even have hidden elements in the form? --> - <input type="text" name="%%index%%" value="%%value%%" disabled> - </td> - </tr> -<!-- END setting_locked --> -</table> - <a name="group" /> <table border=1 cellpadding=3 cellspacing=0> <tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-05-02 04:45:17
|
Revision: 885 http://cs-project.svn.sourceforge.net/cs-project/?rev=885&view=rev Author: crazedsanity Date: 2008-05-01 21:45:07 -0700 (Thu, 01 May 2008) Log Message: ----------- Minor changes to rename "Todo" to "Task". Modified Paths: -------------- trunk/1.2/includes/content/task.inc trunk/1.2/includes/setup/3.inc trunk/1.2/lib/taskClass.php trunk/1.2/templates/content/helpdesk/view.content.tmpl Modified: trunk/1.2/includes/content/task.inc =================================================================== --- trunk/1.2/includes/content/task.inc 2008-05-02 04:25:50 UTC (rev 884) +++ trunk/1.2/includes/content/task.inc 2008-05-02 04:45:07 UTC (rev 885) @@ -73,14 +73,14 @@ if($action == "create" && $retval > 0) { set_message_wrapper(array( "title" => "Creation Successful", - "message" => "Todo #$retval was created successfully.", + "message" => "Task #$retval was created successfully.", "type" => "notice" )); } elseif($retval == 1) { set_message_wrapper(array( "title" => "Update Successful", - "message" => "Todo was updated successfully.", + "message" => "Task was updated successfully.", "type" => "notice" )); } @@ -120,7 +120,7 @@ } //update the title. - create_page_title($page, array('title' => "Create New Todo")); + create_page_title($page, array('title' => "Create New Task")); //show the proper drop-downs. $page->add_template_var("user_assign_list", $proj->create_user_option_list()); @@ -143,7 +143,7 @@ $taskDetails = $proj->taskObj->get_task($taskId); //set the page's title. - create_page_title($page, array('title' => "Todo #". $taskId .": \"". $taskDetails['name'] ."\"")); + create_page_title($page, array('title' => "Task #". $taskId .": \"". $taskDetails['name'] ."\"")); //format the body, so long sentences fit properly. Modified: trunk/1.2/includes/setup/3.inc =================================================================== --- trunk/1.2/includes/setup/3.inc 2008-05-02 04:25:50 UTC (rev 884) +++ trunk/1.2/includes/setup/3.inc 2008-05-02 04:45:07 UTC (rev 885) @@ -7,7 +7,7 @@ if($_POST) { $validSubmission = test_submitted_data($page, $_POST['users']); - if($validSubmission === TRUE) { + if($validSubmission === TRUE) { $obj = new __setupDefaultValues(); store_setup_data(3, $obj->go(), 'text'); $obj->finish($page); @@ -347,7 +347,7 @@ 4 => 'General', 5 => 'Project', 6 => 'Helpdesk', - 7 => 'Todo', + 7 => 'Task', 8 => 'Tags', 9 => 'Estimates', 10 => 'Navigation', @@ -395,12 +395,12 @@ 7 => array(2, 6, 'Helpdesk: Information'), 8 => array(1, 6, 'Helpdesk: ERROR'), 9 => array(6, 6, 'Helpdesk: Report'), - 10 => array(3, 7, 'Todo: created record'), - 11 => array(5, 7, 'Todo: deleted record'), - 12 => array(4, 7, 'Todo: updated record'), + 10 => array(3, 7, 'Task: created record'), + 11 => array(5, 7, 'Task: deleted record'), + 12 => array(4, 7, 'Task: updated record'), 13 => array(1, 1, 'Database Error'), 14 => array(6, 5, 'Project: Activity Report'), - 15 => array(6, 7, 'Todo: Activity Report'), + 15 => array(6, 7, 'Task: Activity Report'), 16 => array(3, 2, 'User logged-in'), 17 => array(5, 2, 'User logged-out'), 18 => array(6, 2, 'Login/Logout Report'), @@ -414,7 +414,7 @@ 26 => array(1, 9, 'Error: Estimates'), 27 => array(2, 5, 'Information: Project'), 28 => array(4, 3, 'Update: Users'), - 29 => array(1, 7, 'Error: Todo'), + 29 => array(1, 7, 'Error: Task'), 30 => array(3, 3, 'Create: Users') ); @@ -476,7 +476,7 @@ // {record_type_id} => array({name}, {module}) $recordTypes = array( 1 => array('Project', 'project'), - 2 => array('Todo', 'task'), + 2 => array('Task', 'task'), 3 => array('Helpdesk', 'helpdesk') ); @@ -822,7 +822,7 @@ 1 => array('startModule', 'helpdesk', 'Starting on Module', 'Defines which section will be loaded upon login if nothing was selected.'), 5 => array('sorting_helpdesk', 'public_id|DESC', 'Helpdesk Sorting', 'Define the type of sorting for the helpdesk page.'), 6 => array('sorting_project', 'priority|ASC', 'Project Sorting', 'Define the type of sorting for the helpdesk page.'), - 7 => array('projectDetails_taskDisplayOnlyMine', 'all', 'Project Details: Todo display', 'Define what tasks are displayed on a project\'s details page.'), + 7 => array('projectDetails_taskDisplayOnlyMine', 'all', 'Project Details: Task display', 'Define what tasks are displayed on a project\'s details page.'), 8 => array('projectDetails_showCompletedIssues', '1', 'Project Details: Display completed issues', 'Should completed issues display in the details of a project?') ); Modified: trunk/1.2/lib/taskClass.php =================================================================== --- trunk/1.2/lib/taskClass.php 2008-05-02 04:25:50 UTC (rev 884) +++ trunk/1.2/lib/taskClass.php 2008-05-02 04:45:07 UTC (rev 885) @@ -38,7 +38,7 @@ } //create the logging object. - $this->logsObj = new logsClass($this->db, 'Todo'); + $this->logsObj = new logsClass($this->db, 'Task'); }//end taskClass() //================================================================================================ Modified: trunk/1.2/templates/content/helpdesk/view.content.tmpl =================================================================== --- trunk/1.2/templates/content/helpdesk/view.content.tmpl 2008-05-02 04:25:50 UTC (rev 884) +++ trunk/1.2/templates/content/helpdesk/view.content.tmpl 2008-05-02 04:45:07 UTC (rev 885) @@ -187,7 +187,7 @@ <td style="border-bottom:solid #000 1px;" width="650" colspan="2" nowrap><code>{subject}</code></td> </tr> <tr> - <th>Todos:</th> + <th>Tasks:</th> <td> <div id="related_task">{related_task}</div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-05-02 04:25:53
|
Revision: 884 http://cs-project.svn.sourceforge.net/cs-project/?rev=884&view=rev Author: crazedsanity Date: 2008-05-01 21:25:50 -0700 (Thu, 01 May 2008) Log Message: ----------- *** Release 1.2.0-ALPHA5 *** SUMMARY OF CHANGES::: * fix issue #172 (Initial Upgrade to v1.2 Fails to Copy Config File) * upgrade to cs-content v0.10.11 (also for issue #172) * some work on issue #166 (Automatic Setup System) Modified Paths: -------------- trunk/1.2/VERSION trunk/1.2/lib/globalFunctions.php Modified: trunk/1.2/VERSION =================================================================== --- trunk/1.2/VERSION 2008-05-01 00:53:33 UTC (rev 883) +++ trunk/1.2/VERSION 2008-05-02 04:25:50 UTC (rev 884) @@ -1,4 +1,4 @@ $Id:VERSION 628 2007-11-20 16:58:45Z crazedsanity $ -VERSION: 1.2.0-ALPHA4 +VERSION: 1.2.0-ALPHA5 $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/VERSION $ Modified: trunk/1.2/lib/globalFunctions.php =================================================================== --- trunk/1.2/lib/globalFunctions.php 2008-05-01 00:53:33 UTC (rev 883) +++ trunk/1.2/lib/globalFunctions.php 2008-05-02 04:25:50 UTC (rev 884) @@ -17,7 +17,7 @@ function get_required_external_lib_versions($projectName=NULL) { //format: {className} => array({projectName} => {exactVersion}) $requirements = array( - 'contentSystem' => array('cs-content', '0.10.10'), + 'contentSystem' => array('cs-content', '0.10.11'), 'XMLParser' => array('cs-phpxml', '0.5.6'), 'arrayToPath' => array('cs-arrayToPath', '0.2.2') ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-05-01 00:53:37
|
Revision: 883 http://cs-project.svn.sourceforge.net/cs-project/?rev=883&view=rev Author: crazedsanity Date: 2008-04-30 17:53:33 -0700 (Wed, 30 Apr 2008) Log Message: ----------- Fixed issue #172 ("Initial Upgrade to v1.2 Fails to Copy Config File") /lib/config.class.php: * do_setup_redirect(): -- more debug information. * check_site_status(): -- when moving file, set some internal vars and re-read the config. -- the initial move preempts all other checks: if it runs, they don't. /includes/setup.inc: * updated message to NOT point to the settings/admin tab. Modified Paths: -------------- trunk/1.2/includes/setup.inc trunk/1.2/lib/config.class.php Modified: trunk/1.2/includes/setup.inc =================================================================== --- trunk/1.2/includes/setup.inc 2008-04-29 15:34:18 UTC (rev 882) +++ trunk/1.2/includes/setup.inc 2008-05-01 00:53:33 UTC (rev 883) @@ -26,10 +26,7 @@ //setup already complete. Stop 'em. $page->set_message_wrapper(array( 'title' => "Setup Unavailable", - 'message' => "It appears that CS-Project has already been installed. Please use " . - "the administrative section of the <a href=\"/content/settings\">Settings " . - "Tab</a> to make changes to your configuration (<i><b>NOTE:</b> you must be " . - "an admin to be able to see administrative options</i>).", + 'message' => "It appears that CS-Project has already been installed.", 'type' => "error" )); $page->conditional_header('/login.php'); Modified: trunk/1.2/lib/config.class.php =================================================================== --- trunk/1.2/lib/config.class.php 2008-04-29 15:34:18 UTC (rev 882) +++ trunk/1.2/lib/config.class.php 2008-05-01 00:53:33 UTC (rev 883) @@ -125,7 +125,8 @@ public function do_setup_redirect() { if($this->check_site_status() && $this->setupRequired) { if(!($_SERVER['SCRIPT_NAME'] == '/setup')) { - $this->gf->debug_print("script_name check=(". ($_SERVER['script_name'] != '/setup') .")", 1); + $this->gf->debug_print(__METHOD__ .": script_name check=(". ($_SERVER['script_name'] != '/setup') .")," . + " check_site_status=(". $this->check_site_status() ."), setupRequired=(". $this->setupRequired .")", 1); $goHere = '/setup'; if(strlen($_SERVER['REQUEST_URI']) > 1 && !isset($_SESSION['setup__viewed'])) { $goHere .= '?from='. urlencode($_SERVER['REQUEST_URI']); @@ -168,14 +169,22 @@ */ if(file_exists(OLD_CONFIG_FILE_LOCATION)) { //copy old file to new location... - if(!$this->fs->copy_file(OLD_CONFIG_FILE_LOCATION, CONFIG_FILE_LOCATION)) { - throw new exception(__METHOD__ .": failed to copy existing config into new location"); + $fs = new cs_fileSystemClass(dirname(__FILE__) .'/../'); + $moveRes = $fs->move_file(OLD_CONFIG_FILE_LOCATION, CONFIG_FILE_LOCATION); + if(!$moveRes) { + throw new exception(__METHOD__ .": failed to move existing config into new location (". $moveRes .")"); } - $this->fs->rm(OLD_CONFIG_FILE_LOCATION); + + //set some parameters. + $this->siteStatus = 'Old config file moved... '; + $this->setupRequired = FALSE; + $retval = TRUE; + + //set a parameter so get_config_contents() works, then read config parameters (like in __construct()). + $this->fileExists=TRUE; + $this->config = $this->get_config_contents(TRUE); } - - - if($this->setup_config_exists()) { + elseif($this->setup_config_exists()) { if($this->setup_config_exists(TRUE)) { //the currently logged-in user is actually running the setup, no worries. $this->siteStatus = 'You are running setup... please continue.'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-04-29 15:34:42
|
Revision: 882 http://cs-project.svn.sourceforge.net/cs-project/?rev=882&view=rev Author: crazedsanity Date: 2008-04-29 08:34:18 -0700 (Tue, 29 Apr 2008) Log Message: ----------- Change externals to use new layout of cs-content trunk. Property Changed: ---------------- trunk/1.2/lib/ Property changes on: trunk/1.2/lib ___________________________________________________________________ Name: svn:externals - cs-content https://cs-content.svn.sourceforge.net/svnroot/cs-content/trunk cs-phpxml https://cs-phpxml.svn.sourceforge.net/svnroot/cs-phpxml/trunk cs-arrayToPath https://cs-arraytopath.svn.sourceforge.net/svnroot/cs-arraytopath/trunk + cs-content https://cs-content.svn.sourceforge.net/svnroot/cs-content/trunk/0.10 cs-phpxml https://cs-phpxml.svn.sourceforge.net/svnroot/cs-phpxml/trunk cs-arrayToPath https://cs-arraytopath.svn.sourceforge.net/svnroot/cs-arraytopath/trunk This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-04-25 04:14:29
|
Revision: 881 http://cs-project.svn.sourceforge.net/cs-project/?rev=881&view=rev Author: crazedsanity Date: 2008-04-24 21:14:26 -0700 (Thu, 24 Apr 2008) Log Message: ----------- Update to use cs-content v0.10.10. Modified Paths: -------------- trunk/1.2/lib/globalFunctions.php Modified: trunk/1.2/lib/globalFunctions.php =================================================================== --- trunk/1.2/lib/globalFunctions.php 2008-04-25 03:56:55 UTC (rev 880) +++ trunk/1.2/lib/globalFunctions.php 2008-04-25 04:14:26 UTC (rev 881) @@ -17,7 +17,7 @@ function get_required_external_lib_versions($projectName=NULL) { //format: {className} => array({projectName} => {exactVersion}) $requirements = array( - 'contentSystem' => array('cs-content', '0.10.9'), + 'contentSystem' => array('cs-content', '0.10.10'), 'XMLParser' => array('cs-phpxml', '0.5.6'), 'arrayToPath' => array('cs-arrayToPath', '0.2.2') ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-04-25 03:56:57
|
Revision: 880 http://cs-project.svn.sourceforge.net/cs-project/?rev=880&view=rev Author: crazedsanity Date: 2008-04-24 20:56:55 -0700 (Thu, 24 Apr 2008) Log Message: ----------- Add autoconfig.xml file in docs directory: I believe it has all options needed on a per-step basis. There's no code to actually care about the file yet, but this was probably the more difficult part of getting autoconfig to work. ISSUES AFFECTED::: #166: Automatic Setup System Added Paths: ----------- trunk/1.2/docs/samples/autoconfig.xml Added: trunk/1.2/docs/samples/autoconfig.xml =================================================================== --- trunk/1.2/docs/samples/autoconfig.xml (rev 0) +++ trunk/1.2/docs/samples/autoconfig.xml 2008-04-25 03:56:55 UTC (rev 880) @@ -0,0 +1,41 @@ +<autoconfig> + <step number="1"> + <database_dbname>cs-project</database_dbname> + <database_host>localhost</database_host> + <database_port>5432</database_port> + <database_user>postgres</database_user> + <database_password /> + </step> + <step number="2" /> + <step number="3"> + <users> + <username></username> + <password></password> + <name></name> + <email></email> + <is_admin></is_admin> + </users> + <users> + <username></username> + <password></password> + <name></name> + <email></email> + <is_admin></is_admin> + </users> + </step> + <step number="4"> + <isdevsite></isdevsite> + <proj_name></proj_name> + <project_url></project_url> + <helpdesk_issue_announce_email></helpdesk_issue_announce_email> + <phpmailer_host></phpmailer_host> + <phpmailer_method>IsSMTP</phpmailer_method> + <max_time></max_time> + <max_idle></max_idle> + <config_session_name></config_session_name> + <debugprintopt>1</debugprintopt> + <debugremovehr>0</debugremovehr> + <workingonit>0</workingonit>:w + </step> + <step number="5" /> +</autoconfig> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-04-09 05:09:28
|
Revision: 879 http://cs-project.svn.sourceforge.net/cs-project/?rev=879&view=rev Author: crazedsanity Date: 2008-04-08 22:09:24 -0700 (Tue, 08 Apr 2008) Log Message: ----------- *** RELEASE 1.2.0-ALPHA4 *** * this release is potentially incompatible with installs of 1.2.0 less than ALPHA4 Modified Paths: -------------- trunk/1.2/VERSION Modified: trunk/1.2/VERSION =================================================================== --- trunk/1.2/VERSION 2008-04-09 05:08:16 UTC (rev 878) +++ trunk/1.2/VERSION 2008-04-09 05:09:24 UTC (rev 879) @@ -1,4 +1,4 @@ $Id:VERSION 628 2007-11-20 16:58:45Z crazedsanity $ -VERSION: 1.2.0-ALPHA3 +VERSION: 1.2.0-ALPHA4 $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/VERSION $ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-04-09 05:08:22
|
Revision: 878 http://cs-project.svn.sourceforge.net/cs-project/?rev=878&view=rev Author: crazedsanity Date: 2008-04-08 22:08:16 -0700 (Tue, 08 Apr 2008) Log Message: ----------- Upgrade scripts + fixes to upgrade system to allow for protected setup & such... Modified Paths: -------------- trunk/1.2/lib/config.class.php trunk/1.2/lib/site_config.php trunk/1.2/lib/upgradeClass.php trunk/1.2/upgrade/upgradeTo1.2.0-ALPHA4.php Added Paths: ----------- trunk/1.2/docs/sql/upgrades/upgradeTo1.2.0-ALPHA4.sql Copied: trunk/1.2/docs/sql/upgrades/upgradeTo1.2.0-ALPHA4.sql (from rev 877, trunk/1.2/docs/sql/upgrades/upgradeTo1.2.0-ALPHA2.sql) =================================================================== --- trunk/1.2/docs/sql/upgrades/upgradeTo1.2.0-ALPHA4.sql (rev 0) +++ trunk/1.2/docs/sql/upgrades/upgradeTo1.2.0-ALPHA4.sql 2008-04-09 05:08:16 UTC (rev 878) @@ -0,0 +1,67 @@ +-- +-- SVN INFORMATION::: +-- +-- SVN Signature::::::::: $Id$ +-- Last Committted Date:: $Date$ +-- Last Committed Path::: $HeadURL$ +-- + + + + + + +CREATE TABLE task_table ( + task_id serial NOT NULL PRIMARY KEY, + creator_contact_id integer NOT NULL REFERENCES contact_table(contact_id), + name text NOT NULL, + body text NOT NULL, + assigned_contact_id integer REFERENCES contact_table(contact_id), + created timestamp with time zone DEFAULT ('now'::text)::date NOT NULL, + updated timestamp with time zone, + deadline date, + started date, + status_id integer DEFAULT 0 NOT NULL REFERENCES status_table(status_id), + priority smallint DEFAULT 50 NOT NULL, + progress numeric DEFAULT 0 NOT NULL, + record_id integer NOT NULL REFERENCES record_table(record_id), + estimate_original numeric(10,2) DEFAULT 1 NOT NULL, + estimate_current numeric(10,2) DEFAULT 1 NOT NULL, + estimate_elapsed numeric(10,2) DEFAULT 0 NOT NULL +); + +-- Populate the table with existing todo data. + + +INSERT INTO task_table (task_id, creator_contact_id, name, body, assigned_contact_id, created, updated, deadline, started, status_id, priority, progress, record_id, estimate_original, estimate_current, estimate_elapsed) (SELECT todo_id, creator_contact_id, name, body, assigned_contact_id, created, updated, deadline, started, status_id, priority, progress, record_id, estimate_original, estimate_current, estimate_elapsed FROM todo_table); + + + + +CREATE TABLE task_comment_table ( + task_comment_id serial NOT NULL PRIMARY KEY, + task_id integer NOT NULL, + creator_contact_id integer NOT NULL REFERENCES contact_table(contact_id), + created timestamp with time zone DEFAULT now() NOT NULL, + updated timestamp with time zone, + subject text DEFAULT 'Comment'::text NOT NULL, + body text NOT NULL +); + +--Copy data into the table. +INSERT INTO task_comment_table (task_comment_id, task_id, creator_contact_id, created, updated, subject, body) (SELECT todo_comment_id, todo_id, creator_contact_id, created, updated, subject, body FROM todo_comment_table); + + + + +-- Fix foreign keys and such. +ALTER TABLE log_estimate_table RENAME todo_id TO task_id; +ALTER TABLE log_estimate_table DROP CONSTRAINT "log_estiate_table_todo_id_fkey"; +ALTER TABLE ONLY log_estimate_table ADD CONSTRAINT log_estimate_table_task_id_fkey FOREIGN KEY (task_id) REFERENCES task_table(task_id); + + + +-- GET RID OF THE OLD TABLES... +DROP TABLE todo_comment_table; +DROP TABLE todo_table; + Modified: trunk/1.2/lib/config.class.php =================================================================== --- trunk/1.2/lib/config.class.php 2008-04-09 03:57:22 UTC (rev 877) +++ trunk/1.2/lib/config.class.php 2008-04-09 05:08:16 UTC (rev 878) @@ -22,6 +22,9 @@ if(!is_null($fileName) && strlen($fileName)) { $this->fileName = $fileName; } + else { + $this->fileName = CONFIG_FILE_LOCATION; + } if(!file_exists($this->fileName)) { $this->fileExists = FALSE; Modified: trunk/1.2/lib/site_config.php =================================================================== --- trunk/1.2/lib/site_config.php 2008-04-09 03:57:22 UTC (rev 877) +++ trunk/1.2/lib/site_config.php 2008-04-09 05:08:16 UTC (rev 878) @@ -86,6 +86,17 @@ $configObj->do_setup_redirect(); } else { + //don't panic: we're going to check for upgrades, but this doesn't + // necessarily mean anything will ACTUALLY be upgraded. + $configObj->get_config_contents(NULL,TRUE,FALSE); + $upgrade = new upgrade; + if($upgrade->upgrade_in_progress()) { + throw new exception("Upgrade in progress... reload the page after a few minutes and it should be complete. :) "); + } + else { + $upgrade->check_versions(); + } + #read_config_file(TRUE); $configObj->get_config_contents(NULL,TRUE,TRUE); } } Modified: trunk/1.2/lib/upgradeClass.php =================================================================== --- trunk/1.2/lib/upgradeClass.php 2008-04-09 03:57:22 UTC (rev 877) +++ trunk/1.2/lib/upgradeClass.php 2008-04-09 05:08:16 UTC (rev 878) @@ -791,7 +791,7 @@ } } - $this->gfObj->debug_print(__METHOD__ .": ('". $version ."', '". $checkIfHigher ."') retval=(". $retval .")"); + $this->gfObj->debug_print(__METHOD__ .": ('". $version ."', '". $checkIfHigher ."') retval=(". $retval .")", 1); return($retval); Modified: trunk/1.2/upgrade/upgradeTo1.2.0-ALPHA4.php =================================================================== --- trunk/1.2/upgrade/upgradeTo1.2.0-ALPHA4.php 2008-04-09 03:57:22 UTC (rev 877) +++ trunk/1.2/upgrade/upgradeTo1.2.0-ALPHA4.php 2008-04-09 05:08:16 UTC (rev 878) @@ -48,6 +48,16 @@ $details = "Executed SQL file, '". $this->lastSQLFile ."'. Encoded contents::: ". base64_encode($this->fsObj->read($this->lastSQLFile)); $this->logsObj->log_by_class($details, 'system'); + + + + $this->gfObj->debug_print(__METHOD__ .": running SQL file..."); + $this->run_sql_file(dirname(__FILE__) .'/../docs/sql/upgrades/upgradeTo1.2.0-ALPHA4.sql'); + + $details = "Executed SQL file, '". $this->lastSQLFile ."'. Encoded contents::: ". + base64_encode($this->fsObj->read($this->lastSQLFile)); + $this->logsObj->log_by_class($details, 'system'); + }//end run_schema_changes() //========================================================================= This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-04-09 03:57:23
|
Revision: 877 http://cs-project.svn.sourceforge.net/cs-project/?rev=877&view=rev Author: crazedsanity Date: 2008-04-08 20:57:22 -0700 (Tue, 08 Apr 2008) Log Message: ----------- More renaming of "todo" to "task" (issue #151) Modified Paths: -------------- trunk/1.2/lib/helpdeskClass.php trunk/1.2/lib/site_config.php trunk/1.2/templates/content/helpdesk/view.content.tmpl trunk/1.2/templates/content/project/view/index.content.tmpl Added Paths: ----------- trunk/1.2/templates/content/related_task.shared.tmpl Removed Paths: ------------- trunk/1.2/templates/content/related_todo.shared.tmpl Modified: trunk/1.2/lib/helpdeskClass.php =================================================================== --- trunk/1.2/lib/helpdeskClass.php 2008-04-09 03:56:56 UTC (rev 876) +++ trunk/1.2/lib/helpdeskClass.php 2008-04-09 03:57:22 UTC (rev 877) @@ -457,38 +457,38 @@ //========================================================================= - function get_todos($helpdeskId) { + function get_tasks($helpdeskId) { $retval = 0; $prefObj = new pref($this->db, $_SESSION['uid']); - $todoDisplayPref = $prefObj->get_pref_value_by_name('projectDetails_todoDisplayOnlyMine'); + $taskDisplayPref = $prefObj->get_pref_value_by_name('projectDetails_taskDisplayOnlyMine'); - $todoObj = new todoClass($this->db); + $taskObj = new taskClass($this->db); - //attempt to get a list of the todos... + //attempt to get a list of the tasks... //TODO: change this reference to "publicId" instead of "projectId" - $todoObj->projectId = $helpdeskId; + $taskObj->projectId = $helpdeskId; $critArr = array("record_id"=>$this->get_parent_from_ancestry($this->get_ancestry($helpdeskId,TRUE),0)); $contactCrit = NULL; - if($todoDisplayPref != 'all') { - if($todoDisplayPref == 'mine') { + if($taskDisplayPref != 'all') { + if($taskDisplayPref == 'mine') { $contactCrit = array( 't.creator_contact_id' => $_SESSION['contact_id'], 't.assigned_contact_id' => $_SESSION['contact_id'] ); } - elseif($todoDisplayPref == 'assigned') { + elseif($taskDisplayPref == 'assigned') { $contactCrit = array( 't.assigned_contact_id' => $_SESSION['contact_id'] ); } } - $retval = $todoObj->get_todos($critArr, NULL, $contactCrit); + $retval = $taskObj->get_tasks($critArr, NULL, $contactCrit); return($retval); - }//end get_todos() + }//end get_tasks() //========================================================================= Modified: trunk/1.2/lib/site_config.php =================================================================== --- trunk/1.2/lib/site_config.php 2008-04-09 03:56:56 UTC (rev 876) +++ trunk/1.2/lib/site_config.php 2008-04-09 03:57:22 UTC (rev 877) @@ -127,7 +127,7 @@ define('SEQ_HELPDESK', 'special__helpdesk_public_id_seq'); define('SEQ_PROJECT', 'special__project_public_id_seq'); define('SEQ_MAIN', 'record_table_record_id_seq'); -define('TABLE_TODOCOMMENT', 'todo_comment_table'); +define('TABLE_TODOCOMMENT', 'task_comment_table'); define('FORMAT_WORDWRAP', 90); //========================================================================= Modified: trunk/1.2/templates/content/helpdesk/view.content.tmpl =================================================================== --- trunk/1.2/templates/content/helpdesk/view.content.tmpl 2008-04-09 03:56:56 UTC (rev 876) +++ trunk/1.2/templates/content/helpdesk/view.content.tmpl 2008-04-09 03:57:22 UTC (rev 877) @@ -190,7 +190,7 @@ <th>Todos:</th> <td> - <div id="related_todo">{related_todo}</div> + <div id="related_task">{related_task}</div> </td> </tr> <tr> Modified: trunk/1.2/templates/content/project/view/index.content.tmpl =================================================================== --- trunk/1.2/templates/content/project/view/index.content.tmpl 2008-04-09 03:56:56 UTC (rev 876) +++ trunk/1.2/templates/content/project/view/index.content.tmpl 2008-04-09 03:57:22 UTC (rev 877) @@ -119,7 +119,7 @@ </tr> <tr> <td width="50%"> - <div id="related_todo" width="100%">{related_todo}</div> + <div id="related_task" width="100%">{related_task}</div> <div id="related_note" style="padding-top:1em;">{related_note}</div> </td> Copied: trunk/1.2/templates/content/related_task.shared.tmpl (from rev 875, trunk/1.2/templates/content/related_todo.shared.tmpl) =================================================================== --- trunk/1.2/templates/content/related_task.shared.tmpl (rev 0) +++ trunk/1.2/templates/content/related_task.shared.tmpl 2008-04-09 03:57:22 UTC (rev 877) @@ -0,0 +1,39 @@ +<table cellpadding="2" cellspacing="0" border="1"> +<tr> + <td colspan="8"> + <b>Related Tasks: </b> + (<a href='/content/task/create?parentPublicId={public_id}&module={module}' target=_top>Create</a>): + <a href="/help/task" target="_blank"> + <img src="/images/icon-help.png" border="0"></a> +<!-- BEGIN taskPrefWarning --> + <BR><font color="red"><b>Warning:</b></font> Not all issues will be displayed, due to your <a href="/content/settings">preferences</a>. +<!-- END taskPrefWarning --> + </td> +</tr> +<tr> + <th>Pri</th> + <th>Creator</th> + <th>Assigned</th> + <th>%</th> + <th>Status</th> + <th>Title</th> + <th>Deadline</th> + <th>Hours Left</th> +</tr> + +<!-- BEGIN related_task_row --> +<tr style="background-color: %%bgColor%%;" onmouseover="this.style.backgroundColor = '#ffffff'" + onmouseout="this.style.backgroundColor = '%%bgColor2%%'" onclick="location.href = '/content/task/view?ID=%%id%%'"> + <td><font style="font-weight:%%font_weight%%;">%%priority%%</font></td> + <td><font style="font-weight:%%font_weight%%;">%%creator%%</font></td> + <td><font style="font-weight:%%font_weight%%;">%%assigned_user%%</font></td> + <td align="right"><font style="font-weight:%%font_weight%%;">%%progress%%%</font></td> + <td nowrap align="center">(%%status_text%%)</td> + <td><a href="/content/task/view?ID=%%id%%" target="_top" style="font-weight:%%font_weight%%;"> + %%name%%</a></td> + <td>%%deadline%%</td> + <td><b>%%hours_remaining%%</b> (%%estimate_current%%) </td> + +</tr> +<!-- END related_task_row --> +</table> \ No newline at end of file Deleted: trunk/1.2/templates/content/related_todo.shared.tmpl =================================================================== --- trunk/1.2/templates/content/related_todo.shared.tmpl 2008-04-09 03:56:56 UTC (rev 876) +++ trunk/1.2/templates/content/related_todo.shared.tmpl 2008-04-09 03:57:22 UTC (rev 877) @@ -1,39 +0,0 @@ -<table cellpadding="2" cellspacing="0" border="1"> -<tr> - <td colspan="8"> - <b>Related Tasks: </b> - (<a href='/content/todo/create?parentPublicId={public_id}&module={module}' target=_top>Create</a>): - <a href="/help/task" target="_blank"> - <img src="/images/icon-help.png" border="0"></a> -<!-- BEGIN todoPrefWarning --> - <BR><font color="red"><b>Warning:</b></font> Not all issues will be displayed, due to your <a href="/content/settings">preferences</a>. -<!-- END todoPrefWarning --> - </td> -</tr> -<tr> - <th>Pri</th> - <th>Creator</th> - <th>Assigned</th> - <th>%</th> - <th>Status</th> - <th>Title</th> - <th>Deadline</th> - <th>Hours Left</th> -</tr> - -<!-- BEGIN related_todo_row --> -<tr style="background-color: %%bgColor%%;" onmouseover="this.style.backgroundColor = '#ffffff'" - onmouseout="this.style.backgroundColor = '%%bgColor2%%'" onclick="location.href = '/content/todo/view?ID=%%id%%'"> - <td><font style="font-weight:%%font_weight%%;">%%priority%%</font></td> - <td><font style="font-weight:%%font_weight%%;">%%creator%%</font></td> - <td><font style="font-weight:%%font_weight%%;">%%assigned_user%%</font></td> - <td align="right"><font style="font-weight:%%font_weight%%;">%%progress%%%</font></td> - <td nowrap align="center">(%%status_text%%)</td> - <td><a href="/content/todo/view?ID=%%id%%" target="_top" style="font-weight:%%font_weight%%;"> - %%name%%</a></td> - <td>%%deadline%%</td> - <td><b>%%hours_remaining%%</b> (%%estimate_current%%) </td> - -</tr> -<!-- END related_todo_row --> -</table> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-04-09 03:56:58
|
Revision: 876 http://cs-project.svn.sourceforge.net/cs-project/?rev=876&view=rev Author: crazedsanity Date: 2008-04-08 20:56:56 -0700 (Tue, 08 Apr 2008) Log Message: ----------- More renaming of "todo" to "task" (issue #151) Added Paths: ----------- trunk/1.2/includes/content/task.inc Removed Paths: ------------- trunk/1.2/includes/content/todo.inc Copied: trunk/1.2/includes/content/task.inc (from rev 875, trunk/1.2/includes/content/todo.inc) =================================================================== --- trunk/1.2/includes/content/task.inc (rev 0) +++ trunk/1.2/includes/content/task.inc 2008-04-09 03:56:56 UTC (rev 876) @@ -0,0 +1,282 @@ +<?php +/* + * SVN INFORMATION::: + * ------------------ + * Last Author: $Author:crazedsanity $ + * Current Revision: $Revision:637 $ + * Repository Location: $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/includes/content/task.inc $ + * Last Updated: $Date:2007-11-20 11:04:33 -0600 (Tue, 20 Nov 2007) $ + */ + +if($_POST) { + //okay, now do the requested action. + $action = strtolower($_POST['action']); + $taskId = $_POST['task_id']; + if($action == 're-open') { + //re-open the item. + $updateArr = array( + "status_id" => 6, + "progress" => 0 + ); + $retval = $proj->taskObj->update_task($taskId, $updateArr); + + $commentData = 'Re-opened.'; + if(strlen($_POST['comment'])) { + $commentData = $_POST['comment']; + } + $proj->taskObj->add_comment($taskId, 'Re-opened.', 'Re-open [auto-generated]'); + } + elseif($action == "undertake") { + $updateArr = array( + "status_id" => 2, + "assigned_contact_id" => $_SESSION['contact_id'] + ); + $retval = $proj->taskObj->update_task($taskId, $updateArr); + } + elseif($action == "create") { + unset($_POST['updates']['add_elapsed']); + $retval = $proj->taskObj->create_task($_POST['updates']); + $taskId = $retval; + } + elseif($action == "comment") { + $retval = $proj->taskObj->add_comment($taskId, $_POST['comment']); + } + elseif($action == "modify") { + $currentData = $proj->taskObj->get_task($taskId); + + //reset status if needs-be. + if($_POST['updates']['progress'] >= 100 || $_POST['done']) { + //it's at 100%: end it! + $_POST['updates']['status_id'] = 4; + $_POST['updates']['progress'] = 100; + + //comment on it, so it is known who closed it. + $commentData = 'Completed.'; + if(strlen($_POST['comment'])) { + //don't + $commentData = $_POST['comment']; + } + $proj->taskObj->add_comment($taskId, 'Completed.', 'Completed [auto-generated]'); + } + elseif(strlen($_POST['comment'])) { + //they passed a comment. + $proj->taskObj->add_comment($taskId, $_POST['comment']); + } + + $retval = $proj->taskObj->update_task($taskId, $_POST['updates']); + } + else { + #$retval = $proj->taskObj->update_task($taskId, $_POST['updates']); + $retval = 0; + } + + if($action == "create" && $retval > 0) { + set_message_wrapper(array( + "title" => "Creation Successful", + "message" => "Todo #$retval was created successfully.", + "type" => "notice" + )); + } + elseif($retval == 1) { + set_message_wrapper(array( + "title" => "Update Successful", + "message" => "Todo was updated successfully.", + "type" => "notice" + )); + } + else { + set_message_wrapper(array( + "title" => "Update FAILED!", + "message" => "Something happened, and the sh*t hit the fan. Sorry.<BR>\n" . + "LAST ERROR: ". $proj->taskObj->lastError ."<BR>\n" . + "RESULT RETURNED: [$retval]", + "type" => "error" + )); + } + + //now redirect. + $url = "/content/task/view?ID=$taskId&updateResult=$retval"; + conditional_header($url); + exit; +} +else { + $action = $page->ftsSections[2]; + $taskId = $_GET['ID']; + if($action == "create") { + + //sanity check: need to link it to an actual record. + if(!isset($_GET['parentPublicId']) || !is_numeric($_GET['parentPublicId'])) { + throw new exception("Unable to create task without specifying a parent!!!"); + } + else { + //get the details. + if($_GET['module'] == 'helpdesk') { + $projectDetails = $proj->helpdeskObj->get_record($_GET['parentPublicId']); + } + else { + $projectDetails = $proj->get_details($_GET['parentPublicId']); + } + $page->add_template_var("record_id", $projectDetails['record_id']); + } + + //update the title. + create_page_title($page, array('title' => "Create New Todo")); + + //show the proper drop-downs. + $page->add_template_var("user_assign_list", $proj->create_user_option_list()); + #$page->add_template_var("select_project_list", $proj->create_project_option_list($_GET['projectId'], TRUE, TRUE)); + $page->add_template_var("select_priority_list", create_priority_option_list(9,9,0)); + + //automatically fill the begin date & deadline. + $page->add_template_var("started", date("Y-m-d")); + $page->add_template_var("deadline", date('Y-m-d', strtotime('1 month'))); + + $doNotRipRows = array("assign_list", "action_buttons", "display_modifiable", "input_orig_estimate"); + $page->add_template_var("modify_or_create_button", "Create"); + $page->set_all_block_rows("content", $doNotRipRows); + + } + elseif(is_numeric($taskId)) { + + if($action == "view") { + + $taskDetails = $proj->taskObj->get_task($taskId); + + //set the page's title. + create_page_title($page, array('title' => "Todo #". $taskId .": \"". $taskDetails['name'] ."\"")); + + + //format the body, so long sentences fit properly. + $taskDetails['body'] = wordwrap($taskDetails['body'], FORMAT_WORDWRAP); + $taskDetails['body'] = cleanString($taskDetails['body'], 'htmlentity_plus_brackets'); + + $commentsArray = $taskDetails['comments']; + unset($taskDetails['comments']); + + foreach($taskDetails as $field=>$value) { + $page->add_template_var($field, $value); + } + + //TODO: only give ability to update if they're the creator or if it's been assigned to them. + + //create the list of users. + $page->add_template_var("user_assign_list", $proj->create_user_option_list($taskDetails['assigned_contact_id'])); + + //should really check based off uid... + $page->add_template_var("note_readonly", "readonly"); + if(in_array($taskDetails['status_id'], $GLOBALS['STATUS_NOTENDED'])) { + if($taskDetails['assigned_contact_id'] == "" || $taskDetails['assigned_contact_id'] == $_SESSION['contact_id']) { + if($taskDetails['status_id'] == 0 || $taskDetails['status_id'] == 1) { + //they're assigned, but haven't taken it yet. + $doNotRipRows[] = "undertake_button"; + $doNotRipRows[] = "readonly_started"; + $doNotRipRows[] = "readonly_deadline"; + $doNotRipRows[] = "readonly_curr_estimate"; + $doNotRipRows[] = "readonly_priority"; + $doNotRipRows[] = "assigned_user_text"; + } + else { + //they're assigned & have taken control of it. + $doNotRipRows[] = "modifiable_started"; + $doNotRipRows[] = "modifiable_deadline"; + $doNotRipRows[] = "assign_list"; + $doNotRipRows[] = "modifiable_curr_estimate"; + $doNotRipRows[] = "modifiable_priority"; + $doNotRipRows[] = "edit_title_link"; + } + } + else { + $doNotRipRows[] = "undertake_button"; + $doNotRipRows[] = "assign_list"; + $doNotRipRows[] = "readonly_started"; + $doNotRipRows[] = "readonly_deadline"; + $doNotRipRows[] = "readonly_curr_estimate"; + $doNotRipRows[] = "readonly_priority"; + } + + //It's either "Pending" (1) or "Running/Accepted" (2)... + $displaySection = "modifiable"; + $doNotRipRows[] = 'done_box'; + $doNotRipRows[] = 'addComment'; + $doNotRipRows[] = "action_buttons"; + $doNotRipRows[] = 'addElapsed'; + + + } + else { + //probably "Ended/Solved" (4). + $displaySection = "readonly"; + $doNotRipRows[] = "reopen_button"; + } + + $doNotRipRows[] = "progress_text"; + //add the project list. + #$page->add_template_var("select_project_list", $proj->create_project_option_list($taskDetails['record_id'], TRUE)); + + //create the priority list. + $page->add_template_var("select_priority_list", create_priority_option_list($taskDetails['priority'],9,0)); + + $doNotRipRows[] = "from_data"; + $doNotRipRows[] = "remarks_and_comments_data"; + $doNotRipRows[] = "status_data"; + $doNotRipRows[] = "progress_data"; + $doNotRipRows[] = "comment_button"; + $doNotRipRows[] = "display_". $displaySection; + $doNotRipRows[] = "input_curr_estimate"; + $page->add_template_var("modify_or_create_button", "Modify"); + $page->set_all_block_rows("content", $doNotRipRows); + + //Build the comments... + if(is_array($commentsArray) && count($commentsArray)) { + $useThis = $commentsArray; + $baseRow = $page->templateRows['previousComments']; + foreach($useThis as $index=>$data) { + $data['body'] = cleanstring($data['body'], "htmlentity_plus_brackets"); + $data['body'] = wordwrap($data['body'], FORMAT_WORDWRAP); + $myRow .= mini_parser($baseRow, $data, '%%', '%%'); + } + $page->add_template_var('previousComments', $myRow); + } + + if(in_array($taskDetails['status_id'], $GLOBALS['STATUS_NOTENDED'])) { + //show hours logged. + $hoursLoggedLimit = 5; + $page->add_template_var('hoursLoggedLimit', $hoursLoggedLimit); + $hoursLogged = $proj->taskObj->get_hours_logged($taskId, NULL, $hoursLoggedLimit); + $baseRow = $page->templateRows["logEstimateRecord_row"]; + if(is_array($hoursLogged)) { + $myRow = ""; + foreach($hoursLogged as $garbage=>$repArr) { + $rowClass = swapValue($rowClass, '#D5D5D5', '#C2C2C2'); + $repArr['class'] = $rowClass; + $myRow .= mini_parser($baseRow, $repArr, '%%', '%%'); + } + $page->add_template_var("logEstimateRecord_row", $myRow); + } + } + + } + } + else { + //list everything... + $taskArr = $proj->taskObj->get_tasks(array("gruppe"=>$_SESSION['user_group']), $currentSortArr); + $page->set_all_block_rows("content"); + + $baseRow = $page->templateRows['task_row']; + if(is_array($taskArr)) { + foreach($taskArr as $taskId => $subArr) { + $repArr = $subArr; + swapValue($bgColor, "rgb(213, 213, 213)", "rgb(194, 194, 194)"); + swapValue($bgColor2, "#d5d5d5", "#c2c2c2"); + + $repArr['bgColor'] = $bgColor; + $repArr['bgColor2']= $bgColor2; + $finalRow .= mini_parser($baseRow, $repArr, "%%", "%%"); + } + $page->add_template_var("task_row", $finalRow); + } + } +} + + +?> Deleted: trunk/1.2/includes/content/todo.inc =================================================================== --- trunk/1.2/includes/content/todo.inc 2008-04-09 03:12:54 UTC (rev 875) +++ trunk/1.2/includes/content/todo.inc 2008-04-09 03:56:56 UTC (rev 876) @@ -1,282 +0,0 @@ -<?php -/* - * SVN INFORMATION::: - * ------------------ - * Last Author: $Author:crazedsanity $ - * Current Revision: $Revision:637 $ - * Repository Location: $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/includes/content/todo.inc $ - * Last Updated: $Date:2007-11-20 11:04:33 -0600 (Tue, 20 Nov 2007) $ - */ - -if($_POST) { - //okay, now do the requested action. - $action = strtolower($_POST['action']); - $todoId = $_POST['todo_id']; - if($action == 're-open') { - //re-open the item. - $updateArr = array( - "status_id" => 6, - "progress" => 0 - ); - $retval = $proj->todoObj->update_todo($todoId, $updateArr); - - $commentData = 'Re-opened.'; - if(strlen($_POST['comment'])) { - $commentData = $_POST['comment']; - } - $proj->todoObj->add_comment($todoId, 'Re-opened.', 'Re-open [auto-generated]'); - } - elseif($action == "undertake") { - $updateArr = array( - "status_id" => 2, - "assigned_contact_id" => $_SESSION['contact_id'] - ); - $retval = $proj->todoObj->update_todo($todoId, $updateArr); - } - elseif($action == "create") { - unset($_POST['updates']['add_elapsed']); - $retval = $proj->todoObj->create_todo($_POST['updates']); - $todoId = $retval; - } - elseif($action == "comment") { - $retval = $proj->todoObj->add_comment($todoId, $_POST['comment']); - } - elseif($action == "modify") { - $currentData = $proj->todoObj->get_todo($todoId); - - //reset status if needs-be. - if($_POST['updates']['progress'] >= 100 || $_POST['done']) { - //it's at 100%: end it! - $_POST['updates']['status_id'] = 4; - $_POST['updates']['progress'] = 100; - - //comment on it, so it is known who closed it. - $commentData = 'Completed.'; - if(strlen($_POST['comment'])) { - //don't - $commentData = $_POST['comment']; - } - $proj->todoObj->add_comment($todoId, 'Completed.', 'Completed [auto-generated]'); - } - elseif(strlen($_POST['comment'])) { - //they passed a comment. - $proj->todoObj->add_comment($todoId, $_POST['comment']); - } - - $retval = $proj->todoObj->update_todo($todoId, $_POST['updates']); - } - else { - #$retval = $proj->todoObj->update_todo($todoId, $_POST['updates']); - $retval = 0; - } - - if($action == "create" && $retval > 0) { - set_message_wrapper(array( - "title" => "Creation Successful", - "message" => "Todo #$retval was created successfully.", - "type" => "notice" - )); - } - elseif($retval == 1) { - set_message_wrapper(array( - "title" => "Update Successful", - "message" => "Todo was updated successfully.", - "type" => "notice" - )); - } - else { - set_message_wrapper(array( - "title" => "Update FAILED!", - "message" => "Something happened, and the sh*t hit the fan. Sorry.<BR>\n" . - "LAST ERROR: ". $proj->todoObj->lastError ."<BR>\n" . - "RESULT RETURNED: [$retval]", - "type" => "error" - )); - } - - //now redirect. - $url = "/content/todo/view?ID=$todoId&updateResult=$retval"; - conditional_header($url); - exit; -} -else { - $action = $page->ftsSections[2]; - $todoId = $_GET['ID']; - if($action == "create") { - - //sanity check: need to link it to an actual record. - if(!isset($_GET['parentPublicId']) || !is_numeric($_GET['parentPublicId'])) { - throw new exception("Unable to create todo without specifying a parent!!!"); - } - else { - //get the details. - if($_GET['module'] == 'helpdesk') { - $projectDetails = $proj->helpdeskObj->get_record($_GET['parentPublicId']); - } - else { - $projectDetails = $proj->get_details($_GET['parentPublicId']); - } - $page->add_template_var("record_id", $projectDetails['record_id']); - } - - //update the title. - create_page_title($page, array('title' => "Create New Todo")); - - //show the proper drop-downs. - $page->add_template_var("user_assign_list", $proj->create_user_option_list()); - #$page->add_template_var("select_project_list", $proj->create_project_option_list($_GET['projectId'], TRUE, TRUE)); - $page->add_template_var("select_priority_list", create_priority_option_list(9,9,0)); - - //automatically fill the begin date & deadline. - $page->add_template_var("started", date("Y-m-d")); - $page->add_template_var("deadline", date('Y-m-d', strtotime('1 month'))); - - $doNotRipRows = array("assign_list", "action_buttons", "display_modifiable", "input_orig_estimate"); - $page->add_template_var("modify_or_create_button", "Create"); - $page->set_all_block_rows("content", $doNotRipRows); - - } - elseif(is_numeric($todoId)) { - - if($action == "view") { - - $todoDetails = $proj->todoObj->get_todo($todoId); - - //set the page's title. - create_page_title($page, array('title' => "Todo #". $todoId .": \"". $todoDetails['name'] ."\"")); - - - //format the body, so long sentences fit properly. - $todoDetails['body'] = wordwrap($todoDetails['body'], FORMAT_WORDWRAP); - $todoDetails['body'] = cleanString($todoDetails['body'], 'htmlentity_plus_brackets'); - - $commentsArray = $todoDetails['comments']; - unset($todoDetails['comments']); - - foreach($todoDetails as $field=>$value) { - $page->add_template_var($field, $value); - } - - //TODO: only give ability to update if they're the creator or if it's been assigned to them. - - //create the list of users. - $page->add_template_var("user_assign_list", $proj->create_user_option_list($todoDetails['assigned_contact_id'])); - - //should really check based off uid... - $page->add_template_var("note_readonly", "readonly"); - if(in_array($todoDetails['status_id'], $GLOBALS['STATUS_NOTENDED'])) { - if($todoDetails['assigned_contact_id'] == "" || $todoDetails['assigned_contact_id'] == $_SESSION['contact_id']) { - if($todoDetails['status_id'] == 0 || $todoDetails['status_id'] == 1) { - //they're assigned, but haven't taken it yet. - $doNotRipRows[] = "undertake_button"; - $doNotRipRows[] = "readonly_started"; - $doNotRipRows[] = "readonly_deadline"; - $doNotRipRows[] = "readonly_curr_estimate"; - $doNotRipRows[] = "readonly_priority"; - $doNotRipRows[] = "assigned_user_text"; - } - else { - //they're assigned & have taken control of it. - $doNotRipRows[] = "modifiable_started"; - $doNotRipRows[] = "modifiable_deadline"; - $doNotRipRows[] = "assign_list"; - $doNotRipRows[] = "modifiable_curr_estimate"; - $doNotRipRows[] = "modifiable_priority"; - $doNotRipRows[] = "edit_title_link"; - } - } - else { - $doNotRipRows[] = "undertake_button"; - $doNotRipRows[] = "assign_list"; - $doNotRipRows[] = "readonly_started"; - $doNotRipRows[] = "readonly_deadline"; - $doNotRipRows[] = "readonly_curr_estimate"; - $doNotRipRows[] = "readonly_priority"; - } - - //It's either "Pending" (1) or "Running/Accepted" (2)... - $displaySection = "modifiable"; - $doNotRipRows[] = 'done_box'; - $doNotRipRows[] = 'addComment'; - $doNotRipRows[] = "action_buttons"; - $doNotRipRows[] = 'addElapsed'; - - - } - else { - //probably "Ended/Solved" (4). - $displaySection = "readonly"; - $doNotRipRows[] = "reopen_button"; - } - - $doNotRipRows[] = "progress_text"; - //add the project list. - #$page->add_template_var("select_project_list", $proj->create_project_option_list($todoDetails['record_id'], TRUE)); - - //create the priority list. - $page->add_template_var("select_priority_list", create_priority_option_list($todoDetails['priority'],9,0)); - - $doNotRipRows[] = "from_data"; - $doNotRipRows[] = "remarks_and_comments_data"; - $doNotRipRows[] = "status_data"; - $doNotRipRows[] = "progress_data"; - $doNotRipRows[] = "comment_button"; - $doNotRipRows[] = "display_". $displaySection; - $doNotRipRows[] = "input_curr_estimate"; - $page->add_template_var("modify_or_create_button", "Modify"); - $page->set_all_block_rows("content", $doNotRipRows); - - //Build the comments... - if(is_array($commentsArray) && count($commentsArray)) { - $useThis = $commentsArray; - $baseRow = $page->templateRows['previousComments']; - foreach($useThis as $index=>$data) { - $data['body'] = cleanstring($data['body'], "htmlentity_plus_brackets"); - $data['body'] = wordwrap($data['body'], FORMAT_WORDWRAP); - $myRow .= mini_parser($baseRow, $data, '%%', '%%'); - } - $page->add_template_var('previousComments', $myRow); - } - - if(in_array($todoDetails['status_id'], $GLOBALS['STATUS_NOTENDED'])) { - //show hours logged. - $hoursLoggedLimit = 5; - $page->add_template_var('hoursLoggedLimit', $hoursLoggedLimit); - $hoursLogged = $proj->todoObj->get_hours_logged($todoId, NULL, $hoursLoggedLimit); - $baseRow = $page->templateRows["logEstimateRecord_row"]; - if(is_array($hoursLogged)) { - $myRow = ""; - foreach($hoursLogged as $garbage=>$repArr) { - $rowClass = swapValue($rowClass, '#D5D5D5', '#C2C2C2'); - $repArr['class'] = $rowClass; - $myRow .= mini_parser($baseRow, $repArr, '%%', '%%'); - } - $page->add_template_var("logEstimateRecord_row", $myRow); - } - } - - } - } - else { - //list everything... - $todoArr = $proj->todoObj->get_todos(array("gruppe"=>$_SESSION['user_group']), $currentSortArr); - $page->set_all_block_rows("content"); - - $baseRow = $page->templateRows['todo_row']; - if(is_array($todoArr)) { - foreach($todoArr as $todoId => $subArr) { - $repArr = $subArr; - swapValue($bgColor, "rgb(213, 213, 213)", "rgb(194, 194, 194)"); - swapValue($bgColor2, "#d5d5d5", "#c2c2c2"); - - $repArr['bgColor'] = $bgColor; - $repArr['bgColor2']= $bgColor2; - $finalRow .= mini_parser($baseRow, $repArr, "%%", "%%"); - } - $page->add_template_var("todo_row", $finalRow); - } - } -} - - -?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-04-09 03:13:02
|
Revision: 875 http://cs-project.svn.sourceforge.net/cs-project/?rev=875&view=rev Author: crazedsanity Date: 2008-04-08 20:12:54 -0700 (Tue, 08 Apr 2008) Log Message: ----------- More renaming of "todo" to "task" (issue #151)... forgot to commit last time. Added Paths: ----------- trunk/1.2/lib/taskClass.php Copied: trunk/1.2/lib/taskClass.php (from rev 870, trunk/1.2/lib/todoClass.php) =================================================================== --- trunk/1.2/lib/taskClass.php (rev 0) +++ trunk/1.2/lib/taskClass.php 2008-04-09 03:12:54 UTC (rev 875) @@ -0,0 +1,652 @@ +<?php +/* + * SVN INFORMATION::: + * ------------------ + * SVN Signature::::::: $Id$ + * Last Author::::::::: $Author$ + * Current Revision:::: $Revision$ + * Repository Location: $HeadURL$ + * Last Updated:::::::: $Date$ + */ + +class taskClass { + + var $db = NULL; + var $projectId = NULL; + var $taskId = NULL; + var $lastError = NULL; + private $recordTypeId; + + /** Object for logging stuff */ + private $logsObj; + + + //================================================================================================ + /** + * The constructor. Duh. + */ + function taskClass(&$db,$projectId=NULL,$taskId=NULL) { + + if(!is_object($db)) { + throw new exception(__METHOD__ .": invalid database handle!"); + } + $this->db = $db; + + //not *REQUIRED*, but useful. + if(is_numeric($projectId) && $projectId > 0) { + $this->projectId = $projectId; + } + + //create the logging object. + $this->logsObj = new logsClass($this->db, 'Todo'); + }//end taskClass() + //================================================================================================ + + + + //================================================================================================ + /** + * Extensible method to grab a list of task's based upon the given criteria. + * + * @param $critArr <array> criteria to feed to string_from_array(). + * @param $primaryOrder <array> field=>asc/desc sort options. + * + * @return 0 FAIL: unable to retrieve the list. + * @return <array> PASS: list of task's, keyed off their id. + */ + function get_tasks(array $critArr, $primaryOrder=NULL, array $contactCrit=NULL) { + + if(is_array($primaryOrder)) { + $arrayKeysArr = array_keys($primaryOrder); + $arrayValsArr = array_values($primaryOrder); + + $orderBy = "t.". $arrayKeysArr[0] ." ". $arrayValsArr[0]; + } + + if(!preg_match('/task_id/', $orderBy) || (!strlen($orderBy))) { + if(!preg_match('/status/', $orderBy)) { + $orderBy = create_list($orderBy, 'status_id'); + } + if(!preg_match('/priority/', $orderBy)) { + $orderBy = create_list($orderBy, 'priority ASC'); + } + if(!preg_match('/name/', $orderBy)) { + $orderBy = create_list($orderBy, "name"); + } + } + + //TODO: change the database to have "project" or "projekt" or "projekte" or "project_id" be the column that indicates the project it's attached to. + //if we've got a projectId set, be sure to use it. + if(!is_array($critArr)) { + $details = __METHOD__ .": no criteria"; + $this->logsObj->log_dberror($details); + throw new exception($details); + } + + //now, fix the index names if the field exists in both tables... + $duplicateColumnsArr = array("record_id", "name", "contact_id", "progress"); + + foreach($critArr as $field=>$value) { + if(in_array($field, $duplicateColumnsArr)) { + // + $newKey = "t.". $field; + $critArr[$newKey] = $value; + unset($critArr[$field]); + } + } + + + $criteria = string_from_array($critArr, "select"); "where ". $criteria; + if(is_array($contactCrit)) { + $criteria .= ' AND ('. string_from_array($contactCrit, 'url', ' OR ') .')'; + } + + $query = "SELECT " . + "t.*, u.username AS creator, au.username AS assigned_user, estimate_original, " . + "estimate_current, estimate_elapsed, (estimate_current - estimate_elapsed) as hours_remaining, " . + "stat.name as status_text, rec.name AS record_name, t.record_id, rec.public_id " . + "FROM task_table AS t " . + "INNER JOIN user_table AS u ON (u.contact_id=t.creator_contact_id) " . + "INNER JOIN status_table AS stat ON (t.status_id=stat.status_id) " . + "LEFT OUTER JOIN record_table AS rec ON (rec.record_id=t.record_id AND rec.is_helpdesk_issue IS FALSE) " . + "LEFT OUTER JOIN user_table AS au ON (t.assigned_contact_id=au.contact_id) " . + "WHERE ". $criteria ." ORDER BY ". $orderBy; + + $this->db->exec($query); + $numrows = $this->db->numRows(); + $dberror = $this->db->errorMsg(); + + if($dberror || $numrows < 1) { + //something bad happened, or no rows. + if($dberror) { + //log the problem. + $this->logsObj->log_dberror(__METHOD__ .": dberror encountered::: $dberror\n$query"); + } + $retval = 0; + } + else { + //good data. + $retval = $this->db->farray_fieldnames("task_id",NULL,0); + + //set a list of fields that need to be rounded. + $precisionRound = array('hours_remaining', 'work_days_remaining', 'original_hours', 'estimate_current'); + + //format some of the fields... + foreach($retval as $id=>$subData) { + //if, for some reason, the title got into the database with + // bad characters, this will ensure they're parse properly. + $retval[$id]['name'] = cleanString($subData['name'], "htmlentity"); + + $retval[$id]['submit_date'] = parse_date_string($subData['submit_date'],TRUE); + + //round-out some numbers. + foreach($precisionRound as $roundThisField) { + $number = $retval[$id][$roundThisField]; + $retval[$id][$roundThisField] = number_format($number,2); + } + + //retrieve any comments. + $retval[$id]['comments'] = $this->get_comments($id); + } + } + + return($retval); + + }//end get_tasks() + //================================================================================================ + + + //================================================================================================ + /** + * A wrapper for get_tasks() to retrieve a single task's info. + * + * @param $taskId <int> id of the task to retrieve. + * + * @return <SPECIAL: returns the requested record using get_tasks()> + */ + function get_task($taskId=NULL) { + if(!is_numeric($taskId)) { + $retval = 0; + } + else { + + $retval = $this->get_tasks(array("task_id"=>$taskId)); + $retval = $retval[$taskId]; + } + + return($retval); + }//end get_task() + //================================================================================================ + + + //================================================================================================ + /** + * Updates a single task record with the specified data. + * + * @param $taskId <int> + * @param $updatesArr <array> + * + * @return 0 FAIL: unable to update. + * @return 1 PASS: update successful. + */ + function update_task($taskId, $updatesArr) { + + //define a list of updateable fields, and how they should be cleaned. + $cleanFieldsArr = array( + "name" => "sql", + "body" => "sql", + "assigned_contact_id" => "numeric", + "record_id" => "numeric", + "started" => "sql", + "deadline" => "sql", + "status_id" => "numeric", + "priority" => "numeric", + "progress" => "numeric", + #"estimate_original" => "numeric", + "estimate_current" => "numeric", + "estimate_elapsed" => "sql" + ); + + + //do some automatic updates. + $updatesArr = $this->check_for_auto_updates($taskId, $updatesArr); + + if(is_numeric($updatesArr['add_elapsed'])) { + //they're adding time to elapsed. + $this->add_elapsed($taskId, $updatesArr['add_elapsed'], $this->logsObj->defaultUid); + } + + //get the old data for logging & such. + $oldData = $this->get_task($taskId); + + $sqlArr = array(); + foreach($updatesArr as $field=>$value) { + if(isset($cleanFieldsArr[$field]) && !is_numeric($value) && $value == '') { + $sqlArr[$field] = "NULL"; + } + elseif(isset($cleanFieldsArr[$field])) { + $sqlArr[$field] = $value; + } + } + + //create the update statement. + $updateStr = string_from_array($sqlArr, "update", NULL, $cleanFieldsArr); + $sql = "UPDATE task_table SET $updateStr WHERE task_id=$taskId"; + + $numrows = $this->db->exec($sql); + $this->lastError = $this->db->errorMsg(); + + if($this->lastError || $numrows != 1) { + //bad things... + if($this->lastError) { + $this->logsObj->log_dberror(__METHOD__ .": database error::: ". $this->lastError); + } + $retval = 0; + } + else { + $retval = $numrows; + + //log the changes. + $doNotLog = array('ext', 'comments'); + $changesCount = 0; + $details = "Updated fields::: "; + + //define an array of realFieldname => whatTheCodeCallsTheField + $translationArr = array( + 'anfang' => 'begin_date', + 'datum' => 'submit_date' + ); + foreach($updatesArr as $field=>$newValue) { + if(isset($translationArr[$field])) { + //translate it into the fields that get_tasks() uses (see it's query) + $field = $translationArr[$field]; + } + if((!in_array($field, $doNotLog)) && ($newValue != $oldData[$field])) { + //create the details. + $thisDetail = $field .": [". $oldData[$field] ."] => [". $newValue ."]"; + $details = create_list($details, $thisDetail, "\n"); + $changesCount++; + } + } + + if($changesCount > 0) { + //log it! + $this->logsObj->log_by_class($details, 'update', NULL, $this->recordTypeId, $taskId); + } + } + return($retval); + + }//end update_task() + //================================================================================================ + + + + //================================================================================================ + /** + * Adds a comment to the existing comments for a task. It's fun. + * + * @param $taskId <int> id of task that will be updated. + * @param $comment <str> comment to add. + * + * @return -1 FAIL: comment too short. + * @return <special see output of update_task()> + */ + function add_comment($taskId, $comment, $subject=NULL) { + $retval = NULL; + if(strlen($comment) >1 && is_numeric($taskId)) { + $taskData = $this->get_task($taskId); + if(is_array($taskData)) { + //we're still good: setup the array of inserted information. + if(is_null($subject) || !strlen($subject)) { + $subject = 'Comment'; + } + $sqlArr = array( + 'task_id' => $taskId, + 'creator_contact_id' => $_SESSION['contact_id'], + 'subject' => $subject, + 'body' => $comment, + ); + $cleanStringArr = array( + 'creator_contact_id' => 'numeric', + 'subject' => 'sql', + 'body' => 'sql' + ); + + //now run the insert. + $sql = 'INSERT INTO '. TABLE_TODOCOMMENT .' '. string_from_array($sqlArr, 'insert', NULL, $cleanStringArr); + + $numrows = $this->db->exec($sql); + $dberror = $this->db->errorMsg(); + + if(strlen($dberror) || $numrows != 1) { + //log it. + $this->logsObj->log_dberror("Unable to insert comment: numrows=($numrows), dberror::: ". $dberror); + } + else { + $retval = 1; + } + } + else { + throw new exception("Invalid task (couldn't find record)"); + } + } + else { + throw new exception("Comment too short, or invalid taskId."); + } + + return($retval); + }//end add_comment() + //================================================================================================ + + + + //================================================================================================ + /** The work to insert a task into the task table. + * + * @param $dataArr <array> field=>value data to insert. + * + * return -1 FAIL: insert seemed to work, but couldn't get note_id. + * @return 0 FAIL: unable to insert data. + * @return <n> (hopefully) PASS: <n> is the note_id we just inserted. + */ + function create_task($dataArr) { + //define the fields that can actually be SPECIFIED by $dataArr: + $reqFieldsArr = array( + "name" => "sql", + "body" => "sql", + "record_id" => "numeric", + "started" => "sql", + "estimate_original" => "decimal" + ); + + //make sure we've got a valid array. + $matchingFieldsCount = count(array_intersect(array_keys($dataArr), array_keys($reqFieldsArr))); + $requiredFieldsCount = count($reqFieldsArr); + if(!is_array($dataArr) || (is_array($dataArr) && count($dataArr) < 1) || $matchingFieldsCount != $requiredFieldsCount) { + $this->lastError = "Precheck failed. Check what was entered and try again. [fields: $matchingFieldsCount/$requiredFieldsCount]"; + $this->logsObj->log_by_class(__METHOD__ .": ". $this->lastError); + return(0); + } + + //make the body non-null. + if(!strlen($dataArr['body'])) { + $dataArr['body'] = '(N/A)'; + } + + $addFieldsArr = array( + "creator_contact_id" => $_SESSION['contact_id'], + "created" => "NOW()", + "estimate_current" => $dataArr['estimate_original'] + ); + + //okay, clean-up our given data... + $cleanStringArr = array_merge($addFieldsArr, $reqFieldsArr); + foreach($dataArr as $field=>$value) { + $cleanStringArg = $reqFieldsArr[$field]; + if(!$cleanStringArg) { + $cleanStringArr[$field] = "sql"; + } + + $insertArr[$field] = $value; + } + + //merge it with the fields we manually set.. + $insertArr = array_merge($insertArr, $addFieldsArr); + + //make it into an insert statement... + $insertStr = string_from_array($insertArr, "insert", NULL, $cleanStringArr, FALSE, TRUE); + $sql = "INSERT INTO task_table $insertStr"; + + $numrows = $this->db->exec($sql); + $this->lastError = $this->db->errorMsg(); + + //determine what to do next... + if($this->lastError || $numrows != 1) { + $this->logsObj->log_dberror(__METHOD__ .": invalid numrows ($numrows) or dberror::: ". $this->lastError); + $retval = 0; + } + else { + //got good data... get the note_id. + $numrows = $this->db->exec("SELECT currval('task_table_task_id_seq')"); + $this->lastError = $this->db->errorMsg(); + + //make sure we're still okay. + if($this->lastError || $numrows != 1) { + $this->logsObj->log_dberror(__METHOD__ .": invalid numrows($numrows) or dberror::: ". $this->lastError); + $retval = -1; + } + else { + $tmp = $this->db->farray(); + $retval = $tmp[0]; + $this->logsObj->log_by_class("Created new task [task_id=". $retval ."]", 'create'); + } + } + + return($retval); + + }//end create_task() + //================================================================================================ + + + + //================================================================================================ + private function check_for_auto_updates($taskId, $updatesArr) { + //get info about the task, so we know what to do... + $taskData = $this->get_task($taskId); + + //set variable for elapsed for later checking. + $myElapsed = $taskData['estimate_elapsed']; + if(is_numeric($updatesArr['add_elapsed'])) { + //update the internal variable (the updates array will be changed later). + $myElapsed = $this->get_sum_of_elapsed($taskId, $updatesArr['add_elapsed']); + + //check if the "estimate_elapsed" field contains more hours than were logged... + if(($taskData['estimate_elapsed'] + $updatesArr['add_elapsed']) != $myElapsed) { + //automatically update it. + $offBy = (($taskData['estimate_elapsed'] + $updatesArr['add_elapsed']) - $myElapsed); + $this->add_elapsed($taskId, $offBy, $this->logsObj->defaultUid, 'Automatic adjustment'); + $myElapsed = $this->get_sum_of_elapsed($taskId, $updatesArr['add_elapsed']); + } + + $updatesArr['estimate_elapsed'] = $myElapsed; + } + elseif(!is_numeric($taskData['estimate_elapsed'])) { + $myElapsed = 0; + $updatesArr['estimate_elapsed'] = 0; + } + + //set local variable for current estimate for later checking. + $myCurrEstimate = $taskData['estimate_current']; + if(is_numeric($updatesArr['estimate_current']) && $updatesArr['estimate_current'] > 0) { + $myCurrEstimate = $updatesArr['estimate_current']; + } + else { + unset($updatesArr['estimate_current']); + } + + + //if they're updating elapsed time, make sure estimate_current is... sane. + if(($myElapsed) && ($myCurrEstimate < $myElapsed)) { + //more time has elapsed than in the estimate? update the estimate to match. + $updatesArr['estimate_current'] = $myElapsed; + $myCurrEstimate = $myElapsed; + } + + //are they ENDING the task? + if($updatesArr['status_id'] == 4 || $updatesArr['progress'] >= 100) { + //set it to 100% complete. + $updatesArr['progress'] = 100; + + //set it as ended. + $updatesArr['status_id'] = 4; + + //make "elapsed" match "estimate_current" + $updatesArr['elapsed'] = $myCurrEstimate; + } + //is it set to "accepted"? + elseif($updatesArr['status_id'] == 2) { + //set it as 0% complete. + $updatesArr['progress'] = 0; + } + else { + //not ended, not re-opened: set the progress properly. + $updatesArr['progress'] = (($myElapsed / $myCurrEstimate) * 100); + } + + if(isset($updatesArr['assigned_contact_id']) && !is_numeric($updatesArr['assigned_contact_id'])) { + $updatesArr['assigned_contact_id'] = "NULL"; + } + + return($updatesArr); + }//end check_for_auto_updates() + //================================================================================================ + + + + //================================================================================================ + private function get_comments($taskId) { + $sql = "SELECT tc.task_comment_id, tc.subject, tc.body, (c.fname || ' ' || c.lname) as creator, " . + "tc.created, tc.updated FROM task_comment_table AS tc INNER JOIN contact_table AS c ON " . + "(c.contact_id=tc.creator_contact_id) WHERE task_id=". $taskId ." ORDER BY task_comment_id ASC"; + $numrows = $this->db->exec($sql); + $this->lastError = $this->db->errorMsg(); + + $retval = array(); + if(strlen($this->lastError) || $numrows < 1) { + if(strlen($this->dberror)) { + $this->logsObj->log_dberror(__METHOD__ .": ". $this->lastError); + } + } + else { + $retval = $this->db->farray_fieldnames('task_comment_id', NULL, 0); + } + + return($retval); + }//end get_comments() + //================================================================================================ + + + + //========================================================================= + /** + * Logs the added "elapsed" info for the given task_id. + */ + public function add_elapsed($taskId, $addElapsed, $uid, $systemNote=NULL) + { + $retval = 0; + if(is_numeric($addElapsed)) { + //log the item into our log_estimate_table. + $sqlArr = array( + 'uid' => $uid, + 'task_id' => $taskId, + 'add_elapsed' => $addElapsed + ); + + if(!is_null($systemNote) && strlen($systemNote)) { + $sqlArr['system_note'] = $systemNote; + } + + //create the SQL. + $sql = "INSERT INTO log_estimate_table ". string_from_array($sqlArr, 'insert'); + + //now run it. + $numrows = $this->db->exec($sql); + $this->lastError = $this->db->errorMsg(); + + + if(strlen($this->lastError) || $numrows !== 1) { + //got a database error, or nothing was inserted... + $details = __METHOD__ .": unable to insert (". $numrows .") or database error:::\n". $this->lastError; + $this->logsObj->log_dberror($details); + } + else { + //we're doing great! + $retval = $numrows; + + //now update the task's estimate_elapsed field. + #$newElapsed = $this->get_sum_of_elapsed($taskId); + } + } + + return($retval); + }//end add_elapsed() + //========================================================================= + + + + //========================================================================= + private function get_sum_of_elapsed($taskId, $addThis=NULL) { + $retval = 0; + + $sql = "SELECT sum(add_elapsed) FROM log_estimate_table WHERE task_id=". $taskId; + $numrows = $this->db->exec($sql); + $this->lastError = $this->db->errorMsg(); + + if(strlen($this->lastError) || $numrows != 1) { + if(strlen($this->lastError)) { + $details = __METHOD__ .": encountered error while trying to retrieve new sum of estimate_elapsed::: ". $this->lastError; + $this->logsObj->log_dberror($details); + } + $retval = 0; + } + else { + //retrieve our new sum of elapsed. + $tmp = $this->db->farray(); + $retval = 0; + if(is_numeric($tmp[0])) { + $retval = $tmp[0]; + } + + if(!is_null($addThis) && is_numeric($addThis)) { + $orig = $retval; + $retval = ($retval + $addThis); + } + } + + return($retval); + }//end get_sum_of_elapsed() + //========================================================================= + + + + //========================================================================= + public function get_hours_logged($taskId, $uid=NULL, $limit=NULL) { + //retrieve data from log_estimate_table WHERE record_id=$taskId... sort by creation... limit? + $criteria = array( + 'task_id' => $taskId + ); + if(!is_null($uid) && is_numeric($uid)) { + $criteria['uid'] = $uid; + } + $sql = "SELECT le.*, u.username FROM log_estimate_table AS le INNER JOIN " . + "user_table AS u USING (uid) WHERE ". string_from_array($criteria, 'select'); + if(is_numeric($limit) && $limit > 0) { + $sql .= " LIMIT ". $limit; + } + + $numrows = $this->db->exec($sql); + $this->lastError = $this->db->errorMsg(); + + + if($numrows < 1 || strlen($this->lastError)) { + if(strlen($this->lastError)) { + $details = __METHOD__ .": ". $this->lastError; + $this->logsObj->log_dberror($details); + } + $retval = NULL; + } + else { + $retval = $this->db->farray_fieldnames('log_estimate_id', NULL, 0); + foreach($retval as $id=>$array) { + $tmp = explode(".", $array['creation']); + $retval[$id]['creation'] = $tmp[0]; + } + } + + return($retval); + + }//end get_hours_logged() + //========================================================================= + +}//end taskClass{} +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-04-09 03:12:05
|
Revision: 874 http://cs-project.svn.sourceforge.net/cs-project/?rev=874&view=rev Author: crazedsanity Date: 2008-04-08 20:12:02 -0700 (Tue, 08 Apr 2008) Log Message: ----------- More renaming of "todo" to "task" (issue #151) Modified Paths: -------------- trunk/1.2/lib/globalFunctions.php trunk/1.2/lib/projectClass.php Removed Paths: ------------- trunk/1.2/lib/todoClass.php Modified: trunk/1.2/lib/globalFunctions.php =================================================================== --- trunk/1.2/lib/globalFunctions.php 2008-04-09 03:11:47 UTC (rev 873) +++ trunk/1.2/lib/globalFunctions.php 2008-04-09 03:12:02 UTC (rev 874) @@ -787,7 +787,7 @@ //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ case "url":{ - //an array like "array('module'='todo','action'='view','ID'=164)" to "module=todo&action=view&ID=164" + //an array like "array('module'='task','action'='view','ID'=164)" to "module=task&action=view&ID=164" if(!$separator) { $separator = "&"; } Modified: trunk/1.2/lib/projectClass.php =================================================================== --- trunk/1.2/lib/projectClass.php 2008-04-09 03:11:47 UTC (rev 873) +++ trunk/1.2/lib/projectClass.php 2008-04-09 03:12:02 UTC (rev 874) @@ -42,7 +42,7 @@ //now create all those internal objects. $this->noteObj = new noteClass($this->db); - $this->todoObj = new todoClass($this->db); + $this->taskObj = new taskClass($this->db); $this->helpdeskObj = new helpdeskClass($this->db); $this->tagObj = new tagClass($this->db); $this->logsObj = new logsClass($this->db, "Project"); @@ -123,7 +123,7 @@ * Returns all details about a given project ID. * * @param $projectId (int) ID to lookup information for. - * @param $getRelated (bool) whether the related notes/todos/issues + * @param $getRelated (bool) whether the related notes/tasks/issues * should be retrieved or not. * * @return <array> PASS: contains all data relevant to given id. @@ -161,7 +161,7 @@ $this->internalRecordId = $retval['record_id']; if($getRelated) { $retval['related'] = array( - "todo" => $this->get_todos(), + "task" => $this->get_tasks(), "note" => $this->get_notes(), "issue" => $this->get_issues() ); @@ -264,34 +264,34 @@ //========================================================================= - function get_todos() { + function get_tasks() { $retval = 0; - //attempt to get a list of the todos... - $this->todoObj->projectId = $this->projectId; + //attempt to get a list of the tasks... + $this->taskObj->projectId = $this->projectId; - $todoDisplayPref = $this->prefObj->get_pref_value_by_name('projectDetails_todoDisplayOnlyMine'); + $taskDisplayPref = $this->prefObj->get_pref_value_by_name('projectDetails_taskDisplayOnlyMine'); $critArr = array("record_id"=>$this->internalRecordId); $contactCrit = NULL; - if($todoDisplayPref != 'all') { - if($todoDisplayPref == 'mine') { + if($taskDisplayPref != 'all') { + if($taskDisplayPref == 'mine') { $contactCrit = array( 't.creator_contact_id' => $_SESSION['contact_id'], 't.assigned_contact_id' => $_SESSION['contact_id'] ); } - elseif($todoDisplayPref == 'assigned') { + elseif($taskDisplayPref == 'assigned') { $contactCrit = array( 't.assigned_contact_id' => $_SESSION['contact_id'] ); } } - $retval = $this->todoObj->get_todos($critArr, NULL, $contactCrit); + $retval = $this->taskObj->get_tasks($critArr, NULL, $contactCrit); return($retval); - }//end get_todos() + }//end get_tasks() //========================================================================= Deleted: trunk/1.2/lib/todoClass.php =================================================================== --- trunk/1.2/lib/todoClass.php 2008-04-09 03:11:47 UTC (rev 873) +++ trunk/1.2/lib/todoClass.php 2008-04-09 03:12:02 UTC (rev 874) @@ -1,652 +0,0 @@ -<?php -/* - * SVN INFORMATION::: - * ------------------ - * SVN Signature::::::: $Id$ - * Last Author::::::::: $Author$ - * Current Revision:::: $Revision$ - * Repository Location: $HeadURL$ - * Last Updated:::::::: $Date$ - */ - -class todoClass { - - var $db = NULL; - var $projectId = NULL; - var $todoId = NULL; - var $lastError = NULL; - private $recordTypeId; - - /** Object for logging stuff */ - private $logsObj; - - - //================================================================================================ - /** - * The constructor. Duh. - */ - function todoClass(&$db,$projectId=NULL,$todoId=NULL) { - - if(!is_object($db)) { - throw new exception(__METHOD__ .": invalid database handle!"); - } - $this->db = $db; - - //not *REQUIRED*, but useful. - if(is_numeric($projectId) && $projectId > 0) { - $this->projectId = $projectId; - } - - //create the logging object. - $this->logsObj = new logsClass($this->db, 'Todo'); - }//end todoClass() - //================================================================================================ - - - - //================================================================================================ - /** - * Extensible method to grab a list of todo's based upon the given criteria. - * - * @param $critArr <array> criteria to feed to string_from_array(). - * @param $primaryOrder <array> field=>asc/desc sort options. - * - * @return 0 FAIL: unable to retrieve the list. - * @return <array> PASS: list of todo's, keyed off their id. - */ - function get_todos(array $critArr, $primaryOrder=NULL, array $contactCrit=NULL) { - - if(is_array($primaryOrder)) { - $arrayKeysArr = array_keys($primaryOrder); - $arrayValsArr = array_values($primaryOrder); - - $orderBy = "t.". $arrayKeysArr[0] ." ". $arrayValsArr[0]; - } - - if(!preg_match('/todo_id/', $orderBy) || (!strlen($orderBy))) { - if(!preg_match('/status/', $orderBy)) { - $orderBy = create_list($orderBy, 'status_id'); - } - if(!preg_match('/priority/', $orderBy)) { - $orderBy = create_list($orderBy, 'priority ASC'); - } - if(!preg_match('/name/', $orderBy)) { - $orderBy = create_list($orderBy, "name"); - } - } - - //TODO: change the database to have "project" or "projekt" or "projekte" or "project_id" be the column that indicates the project it's attached to. - //if we've got a projectId set, be sure to use it. - if(!is_array($critArr)) { - $details = __METHOD__ .": no criteria"; - $this->logsObj->log_dberror($details); - throw new exception($details); - } - - //now, fix the index names if the field exists in both tables... - $duplicateColumnsArr = array("record_id", "name", "contact_id", "progress"); - - foreach($critArr as $field=>$value) { - if(in_array($field, $duplicateColumnsArr)) { - // - $newKey = "t.". $field; - $critArr[$newKey] = $value; - unset($critArr[$field]); - } - } - - - $criteria = string_from_array($critArr, "select"); "where ". $criteria; - if(is_array($contactCrit)) { - $criteria .= ' AND ('. string_from_array($contactCrit, 'url', ' OR ') .')'; - } - - $query = "SELECT " . - "t.*, u.username AS creator, au.username AS assigned_user, estimate_original, " . - "estimate_current, estimate_elapsed, (estimate_current - estimate_elapsed) as hours_remaining, " . - "stat.name as status_text, rec.name AS record_name, t.record_id, rec.public_id " . - "FROM todo_table AS t " . - "INNER JOIN user_table AS u ON (u.contact_id=t.creator_contact_id) " . - "INNER JOIN status_table AS stat ON (t.status_id=stat.status_id) " . - "LEFT OUTER JOIN record_table AS rec ON (rec.record_id=t.record_id AND rec.is_helpdesk_issue IS FALSE) " . - "LEFT OUTER JOIN user_table AS au ON (t.assigned_contact_id=au.contact_id) " . - "WHERE ". $criteria ." ORDER BY ". $orderBy; - - $this->db->exec($query); - $numrows = $this->db->numRows(); - $dberror = $this->db->errorMsg(); - - if($dberror || $numrows < 1) { - //something bad happened, or no rows. - if($dberror) { - //log the problem. - $this->logsObj->log_dberror(__METHOD__ .": dberror encountered::: $dberror\n$query"); - } - $retval = 0; - } - else { - //good data. - $retval = $this->db->farray_fieldnames("todo_id",NULL,0); - - //set a list of fields that need to be rounded. - $precisionRound = array('hours_remaining', 'work_days_remaining', 'original_hours', 'estimate_current'); - - //format some of the fields... - foreach($retval as $id=>$subData) { - //if, for some reason, the title got into the database with - // bad characters, this will ensure they're parse properly. - $retval[$id]['name'] = cleanString($subData['name'], "htmlentity"); - - $retval[$id]['submit_date'] = parse_date_string($subData['submit_date'],TRUE); - - //round-out some numbers. - foreach($precisionRound as $roundThisField) { - $number = $retval[$id][$roundThisField]; - $retval[$id][$roundThisField] = number_format($number,2); - } - - //retrieve any comments. - $retval[$id]['comments'] = $this->get_comments($id); - } - } - - return($retval); - - }//end get_todos() - //================================================================================================ - - - //================================================================================================ - /** - * A wrapper for get_todos() to retrieve a single todo's info. - * - * @param $todoId <int> id of the todo to retrieve. - * - * @return <SPECIAL: returns the requested record using get_todos()> - */ - function get_todo($todoId=NULL) { - if(!is_numeric($todoId)) { - $retval = 0; - } - else { - - $retval = $this->get_todos(array("todo_id"=>$todoId)); - $retval = $retval[$todoId]; - } - - return($retval); - }//end get_todo() - //================================================================================================ - - - //================================================================================================ - /** - * Updates a single todo record with the specified data. - * - * @param $todoId <int> - * @param $updatesArr <array> - * - * @return 0 FAIL: unable to update. - * @return 1 PASS: update successful. - */ - function update_todo($todoId, $updatesArr) { - - //define a list of updateable fields, and how they should be cleaned. - $cleanFieldsArr = array( - "name" => "sql", - "body" => "sql", - "assigned_contact_id" => "numeric", - "record_id" => "numeric", - "started" => "sql", - "deadline" => "sql", - "status_id" => "numeric", - "priority" => "numeric", - "progress" => "numeric", - #"estimate_original" => "numeric", - "estimate_current" => "numeric", - "estimate_elapsed" => "sql" - ); - - - //do some automatic updates. - $updatesArr = $this->check_for_auto_updates($todoId, $updatesArr); - - if(is_numeric($updatesArr['add_elapsed'])) { - //they're adding time to elapsed. - $this->add_elapsed($todoId, $updatesArr['add_elapsed'], $this->logsObj->defaultUid); - } - - //get the old data for logging & such. - $oldData = $this->get_todo($todoId); - - $sqlArr = array(); - foreach($updatesArr as $field=>$value) { - if(isset($cleanFieldsArr[$field]) && !is_numeric($value) && $value == '') { - $sqlArr[$field] = "NULL"; - } - elseif(isset($cleanFieldsArr[$field])) { - $sqlArr[$field] = $value; - } - } - - //create the update statement. - $updateStr = string_from_array($sqlArr, "update", NULL, $cleanFieldsArr); - $sql = "UPDATE todo_table SET $updateStr WHERE todo_id=$todoId"; - - $numrows = $this->db->exec($sql); - $this->lastError = $this->db->errorMsg(); - - if($this->lastError || $numrows != 1) { - //bad things... - if($this->lastError) { - $this->logsObj->log_dberror(__METHOD__ .": database error::: ". $this->lastError); - } - $retval = 0; - } - else { - $retval = $numrows; - - //log the changes. - $doNotLog = array('ext', 'comments'); - $changesCount = 0; - $details = "Updated fields::: "; - - //define an array of realFieldname => whatTheCodeCallsTheField - $translationArr = array( - 'anfang' => 'begin_date', - 'datum' => 'submit_date' - ); - foreach($updatesArr as $field=>$newValue) { - if(isset($translationArr[$field])) { - //translate it into the fields that get_todos() uses (see it's query) - $field = $translationArr[$field]; - } - if((!in_array($field, $doNotLog)) && ($newValue != $oldData[$field])) { - //create the details. - $thisDetail = $field .": [". $oldData[$field] ."] => [". $newValue ."]"; - $details = create_list($details, $thisDetail, "\n"); - $changesCount++; - } - } - - if($changesCount > 0) { - //log it! - $this->logsObj->log_by_class($details, 'update', NULL, $this->recordTypeId, $todoId); - } - } - return($retval); - - }//end update_todo() - //================================================================================================ - - - - //================================================================================================ - /** - * Adds a comment to the existing comments for a todo. It's fun. - * - * @param $todoId <int> id of todo that will be updated. - * @param $comment <str> comment to add. - * - * @return -1 FAIL: comment too short. - * @return <special see output of update_todo()> - */ - function add_comment($todoId, $comment, $subject=NULL) { - $retval = NULL; - if(strlen($comment) >1 && is_numeric($todoId)) { - $todoData = $this->get_todo($todoId); - if(is_array($todoData)) { - //we're still good: setup the array of inserted information. - if(is_null($subject) || !strlen($subject)) { - $subject = 'Comment'; - } - $sqlArr = array( - 'todo_id' => $todoId, - 'creator_contact_id' => $_SESSION['contact_id'], - 'subject' => $subject, - 'body' => $comment, - ); - $cleanStringArr = array( - 'creator_contact_id' => 'numeric', - 'subject' => 'sql', - 'body' => 'sql' - ); - - //now run the insert. - $sql = 'INSERT INTO '. TABLE_TODOCOMMENT .' '. string_from_array($sqlArr, 'insert', NULL, $cleanStringArr); - - $numrows = $this->db->exec($sql); - $dberror = $this->db->errorMsg(); - - if(strlen($dberror) || $numrows != 1) { - //log it. - $this->logsObj->log_dberror("Unable to insert comment: numrows=($numrows), dberror::: ". $dberror); - } - else { - $retval = 1; - } - } - else { - throw new exception("Invalid todo (couldn't find record)"); - } - } - else { - throw new exception("Comment too short, or invalid todoId."); - } - - return($retval); - }//end add_comment() - //================================================================================================ - - - - //================================================================================================ - /** The work to insert a todo into the todo table. - * - * @param $dataArr <array> field=>value data to insert. - * - * return -1 FAIL: insert seemed to work, but couldn't get note_id. - * @return 0 FAIL: unable to insert data. - * @return <n> (hopefully) PASS: <n> is the note_id we just inserted. - */ - function create_todo($dataArr) { - //define the fields that can actually be SPECIFIED by $dataArr: - $reqFieldsArr = array( - "name" => "sql", - "body" => "sql", - "record_id" => "numeric", - "started" => "sql", - "estimate_original" => "decimal" - ); - - //make sure we've got a valid array. - $matchingFieldsCount = count(array_intersect(array_keys($dataArr), array_keys($reqFieldsArr))); - $requiredFieldsCount = count($reqFieldsArr); - if(!is_array($dataArr) || (is_array($dataArr) && count($dataArr) < 1) || $matchingFieldsCount != $requiredFieldsCount) { - $this->lastError = "Precheck failed. Check what was entered and try again. [fields: $matchingFieldsCount/$requiredFieldsCount]"; - $this->logsObj->log_by_class(__METHOD__ .": ". $this->lastError); - return(0); - } - - //make the body non-null. - if(!strlen($dataArr['body'])) { - $dataArr['body'] = '(N/A)'; - } - - $addFieldsArr = array( - "creator_contact_id" => $_SESSION['contact_id'], - "created" => "NOW()", - "estimate_current" => $dataArr['estimate_original'] - ); - - //okay, clean-up our given data... - $cleanStringArr = array_merge($addFieldsArr, $reqFieldsArr); - foreach($dataArr as $field=>$value) { - $cleanStringArg = $reqFieldsArr[$field]; - if(!$cleanStringArg) { - $cleanStringArr[$field] = "sql"; - } - - $insertArr[$field] = $value; - } - - //merge it with the fields we manually set.. - $insertArr = array_merge($insertArr, $addFieldsArr); - - //make it into an insert statement... - $insertStr = string_from_array($insertArr, "insert", NULL, $cleanStringArr, FALSE, TRUE); - $sql = "INSERT INTO todo_table $insertStr"; - - $numrows = $this->db->exec($sql); - $this->lastError = $this->db->errorMsg(); - - //determine what to do next... - if($this->lastError || $numrows != 1) { - $this->logsObj->log_dberror(__METHOD__ .": invalid numrows ($numrows) or dberror::: ". $this->lastError); - $retval = 0; - } - else { - //got good data... get the note_id. - $numrows = $this->db->exec("SELECT currval('todo_table_todo_id_seq')"); - $this->lastError = $this->db->errorMsg(); - - //make sure we're still okay. - if($this->lastError || $numrows != 1) { - $this->logsObj->log_dberror(__METHOD__ .": invalid numrows($numrows) or dberror::: ". $this->lastError); - $retval = -1; - } - else { - $tmp = $this->db->farray(); - $retval = $tmp[0]; - $this->logsObj->log_by_class("Created new todo [todo_id=". $retval ."]", 'create'); - } - } - - return($retval); - - }//end create_todo() - //================================================================================================ - - - - //================================================================================================ - private function check_for_auto_updates($todoId, $updatesArr) { - //get info about the todo, so we know what to do... - $todoData = $this->get_todo($todoId); - - //set variable for elapsed for later checking. - $myElapsed = $todoData['estimate_elapsed']; - if(is_numeric($updatesArr['add_elapsed'])) { - //update the internal variable (the updates array will be changed later). - $myElapsed = $this->get_sum_of_elapsed($todoId, $updatesArr['add_elapsed']); - - //check if the "estimate_elapsed" field contains more hours than were logged... - if(($todoData['estimate_elapsed'] + $updatesArr['add_elapsed']) != $myElapsed) { - //automatically update it. - $offBy = (($todoData['estimate_elapsed'] + $updatesArr['add_elapsed']) - $myElapsed); - $this->add_elapsed($todoId, $offBy, $this->logsObj->defaultUid, 'Automatic adjustment'); - $myElapsed = $this->get_sum_of_elapsed($todoId, $updatesArr['add_elapsed']); - } - - $updatesArr['estimate_elapsed'] = $myElapsed; - } - elseif(!is_numeric($todoData['estimate_elapsed'])) { - $myElapsed = 0; - $updatesArr['estimate_elapsed'] = 0; - } - - //set local variable for current estimate for later checking. - $myCurrEstimate = $todoData['estimate_current']; - if(is_numeric($updatesArr['estimate_current']) && $updatesArr['estimate_current'] > 0) { - $myCurrEstimate = $updatesArr['estimate_current']; - } - else { - unset($updatesArr['estimate_current']); - } - - - //if they're updating elapsed time, make sure estimate_current is... sane. - if(($myElapsed) && ($myCurrEstimate < $myElapsed)) { - //more time has elapsed than in the estimate? update the estimate to match. - $updatesArr['estimate_current'] = $myElapsed; - $myCurrEstimate = $myElapsed; - } - - //are they ENDING the todo? - if($updatesArr['status_id'] == 4 || $updatesArr['progress'] >= 100) { - //set it to 100% complete. - $updatesArr['progress'] = 100; - - //set it as ended. - $updatesArr['status_id'] = 4; - - //make "elapsed" match "estimate_current" - $updatesArr['elapsed'] = $myCurrEstimate; - } - //is it set to "accepted"? - elseif($updatesArr['status_id'] == 2) { - //set it as 0% complete. - $updatesArr['progress'] = 0; - } - else { - //not ended, not re-opened: set the progress properly. - $updatesArr['progress'] = (($myElapsed / $myCurrEstimate) * 100); - } - - if(isset($updatesArr['assigned_contact_id']) && !is_numeric($updatesArr['assigned_contact_id'])) { - $updatesArr['assigned_contact_id'] = "NULL"; - } - - return($updatesArr); - }//end check_for_auto_updates() - //================================================================================================ - - - - //================================================================================================ - private function get_comments($todoId) { - $sql = "SELECT tc.todo_comment_id, tc.subject, tc.body, (c.fname || ' ' || c.lname) as creator, " . - "tc.created, tc.updated FROM todo_comment_table AS tc INNER JOIN contact_table AS c ON " . - "(c.contact_id=tc.creator_contact_id) WHERE todo_id=". $todoId ." ORDER BY todo_comment_id ASC"; - $numrows = $this->db->exec($sql); - $this->lastError = $this->db->errorMsg(); - - $retval = array(); - if(strlen($this->lastError) || $numrows < 1) { - if(strlen($this->dberror)) { - $this->logsObj->log_dberror(__METHOD__ .": ". $this->lastError); - } - } - else { - $retval = $this->db->farray_fieldnames('todo_comment_id', NULL, 0); - } - - return($retval); - }//end get_comments() - //================================================================================================ - - - - //========================================================================= - /** - * Logs the added "elapsed" info for the given todo_id. - */ - public function add_elapsed($todoId, $addElapsed, $uid, $systemNote=NULL) - { - $retval = 0; - if(is_numeric($addElapsed)) { - //log the item into our log_estimate_table. - $sqlArr = array( - 'uid' => $uid, - 'todo_id' => $todoId, - 'add_elapsed' => $addElapsed - ); - - if(!is_null($systemNote) && strlen($systemNote)) { - $sqlArr['system_note'] = $systemNote; - } - - //create the SQL. - $sql = "INSERT INTO log_estimate_table ". string_from_array($sqlArr, 'insert'); - - //now run it. - $numrows = $this->db->exec($sql); - $this->lastError = $this->db->errorMsg(); - - - if(strlen($this->lastError) || $numrows !== 1) { - //got a database error, or nothing was inserted... - $details = __METHOD__ .": unable to insert (". $numrows .") or database error:::\n". $this->lastError; - $this->logsObj->log_dberror($details); - } - else { - //we're doing great! - $retval = $numrows; - - //now update the todo's estimate_elapsed field. - #$newElapsed = $this->get_sum_of_elapsed($todoId); - } - } - - return($retval); - }//end add_elapsed() - //========================================================================= - - - - //========================================================================= - private function get_sum_of_elapsed($todoId, $addThis=NULL) { - $retval = 0; - - $sql = "SELECT sum(add_elapsed) FROM log_estimate_table WHERE todo_id=". $todoId; - $numrows = $this->db->exec($sql); - $this->lastError = $this->db->errorMsg(); - - if(strlen($this->lastError) || $numrows != 1) { - if(strlen($this->lastError)) { - $details = __METHOD__ .": encountered error while trying to retrieve new sum of estimate_elapsed::: ". $this->lastError; - $this->logsObj->log_dberror($details); - } - $retval = 0; - } - else { - //retrieve our new sum of elapsed. - $tmp = $this->db->farray(); - $retval = 0; - if(is_numeric($tmp[0])) { - $retval = $tmp[0]; - } - - if(!is_null($addThis) && is_numeric($addThis)) { - $orig = $retval; - $retval = ($retval + $addThis); - } - } - - return($retval); - }//end get_sum_of_elapsed() - //========================================================================= - - - - //========================================================================= - public function get_hours_logged($todoId, $uid=NULL, $limit=NULL) { - //retrieve data from log_estimate_table WHERE record_id=$todoId... sort by creation... limit? - $criteria = array( - 'todo_id' => $todoId - ); - if(!is_null($uid) && is_numeric($uid)) { - $criteria['uid'] = $uid; - } - $sql = "SELECT le.*, u.username FROM log_estimate_table AS le INNER JOIN " . - "user_table AS u USING (uid) WHERE ". string_from_array($criteria, 'select'); - if(is_numeric($limit) && $limit > 0) { - $sql .= " LIMIT ". $limit; - } - - $numrows = $this->db->exec($sql); - $this->lastError = $this->db->errorMsg(); - - - if($numrows < 1 || strlen($this->lastError)) { - if(strlen($this->lastError)) { - $details = __METHOD__ .": ". $this->lastError; - $this->logsObj->log_dberror($details); - } - $retval = NULL; - } - else { - $retval = $this->db->farray_fieldnames('log_estimate_id', NULL, 0); - foreach($retval as $id=>$array) { - $tmp = explode(".", $array['creation']); - $retval[$id]['creation'] = $tmp[0]; - } - } - - return($retval); - - }//end get_hours_logged() - //========================================================================= - -}//end todoClass{} -?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-04-09 03:11:49
|
Revision: 873 http://cs-project.svn.sourceforge.net/cs-project/?rev=873&view=rev Author: crazedsanity Date: 2008-04-08 20:11:47 -0700 (Tue, 08 Apr 2008) Log Message: ----------- More renaming of "todo" to "task" (issue #151) Modified Paths: -------------- trunk/1.2/includes/content/helpdesk.inc trunk/1.2/includes/content/project.inc trunk/1.2/includes/content/shared.inc trunk/1.2/includes/setup/3.inc Modified: trunk/1.2/includes/content/helpdesk.inc =================================================================== --- trunk/1.2/includes/content/helpdesk.inc 2008-04-09 03:06:56 UTC (rev 872) +++ trunk/1.2/includes/content/helpdesk.inc 2008-04-09 03:11:47 UTC (rev 873) @@ -349,10 +349,10 @@ //now, rip all block rows that don't need to be there... $page->set_all_block_rows("content", $doNotRipRows); - $todoData = $proj->helpdeskObj->get_todos($helpdeskId); - $page->set_all_block_rows('related_todo'); - if(is_array($todoData)) { - parse_related_todo($todoData); + $taskData = $proj->helpdeskObj->get_tasks($helpdeskId); + $page->set_all_block_rows('related_task'); + if(is_array($taskData)) { + parse_related_task($taskData); } Modified: trunk/1.2/includes/content/project.inc =================================================================== --- trunk/1.2/includes/content/project.inc 2008-04-09 03:06:56 UTC (rev 872) +++ trunk/1.2/includes/content/project.inc 2008-04-09 03:11:47 UTC (rev 873) @@ -232,7 +232,7 @@ create_page_title($page, array('title' => "Project #". $_GET['ID'] .": \"". $detailsArr['name'] ."\"")); $page->add_template_var("note_readonly", "readonly"); $page->set_all_block_rows("content", array("related", "new_subproject_link", "status_section", "note_show")); - $page->set_all_block_rows("related_todo"); + $page->set_all_block_rows("related_task"); $page->set_all_block_rows("related_note"); $page->set_all_block_rows("related_issue"); @@ -305,11 +305,11 @@ unset($userList,$tSelected,$userListArr, $selLeader, $leaderSelect); //pull a couple of preferences, so we can say if they're getting the whole picture or not. - $todoPref = $proj->prefObj->get_pref_value_by_name('projectDetails_todoDisplayOnlyMine'); + $taskPref = $proj->prefObj->get_pref_value_by_name('projectDetails_taskDisplayOnlyMine'); $helpdeskPref = $proj->prefObj->get_pref_value_by_name('projectDetails_showCompletedIssues'); - if($todoPref !== 'all') { - $page->add_template_var("todoPrefWarning", $page->templateRows['todoPrefWarning']); + if($taskPref !== 'all') { + $page->add_template_var("taskPrefWarning", $page->templateRows['taskPrefWarning']); } if($helpdeskPref == 0) { @@ -317,10 +317,10 @@ } //SPECIAL PROCESSING FOR TODO's... - if(is_array($detailsArr['related']['todo'])) { - parse_related_todo($detailsArr['related']['todo']); + if(is_array($detailsArr['related']['task'])) { + parse_related_task($detailsArr['related']['task']); } - unset($detailsArr['related']['todo']); + unset($detailsArr['related']['task']); //parse-in everything under "related"... foreach($detailsArr['related'] as $type => $subArr) { @@ -352,7 +352,7 @@ } $repArr['font_weight'] = 'normal'; } - elseif($type == "todo") { + elseif($type == "task") { $changeFontColor=TRUE; //Making TODO stuff look purdy. Boy. if(!preg_match('/accepted/', strtolower($arr['status_text']))) { Modified: trunk/1.2/includes/content/shared.inc =================================================================== --- trunk/1.2/includes/content/shared.inc 2008-04-09 03:06:56 UTC (rev 872) +++ trunk/1.2/includes/content/shared.inc 2008-04-09 03:11:47 UTC (rev 873) @@ -55,12 +55,12 @@ $page->add_template_var('XAJAX_HEADERS', $xajaxHeaders); }//end addAjax() -function parse_related_todo(array $parseData) { +function parse_related_task(array $parseData) { $page = $GLOBALS['objects']['page']; $bgColor = NULL; $bgColor2 = NULL; - $rowName = 'related_todo_row'; + $rowName = 'related_task_row'; $baseRow = $page->templateRows[$rowName]; foreach($parseData as $id=>$arr) { @@ -136,7 +136,7 @@ $myRow .= mini_parser($baseRow, $repArr, "%%", "%%"); } $page->add_template_var($rowName, $myRow); -}//end parse_related_todo() +}//end parse_related_task() Modified: trunk/1.2/includes/setup/3.inc =================================================================== --- trunk/1.2/includes/setup/3.inc 2008-04-09 03:06:56 UTC (rev 872) +++ trunk/1.2/includes/setup/3.inc 2008-04-09 03:11:47 UTC (rev 873) @@ -476,7 +476,7 @@ // {record_type_id} => array({name}, {module}) $recordTypes = array( 1 => array('Project', 'project'), - 2 => array('Todo', 'todo'), + 2 => array('Todo', 'task'), 3 => array('Helpdesk', 'helpdesk') ); @@ -822,7 +822,7 @@ 1 => array('startModule', 'helpdesk', 'Starting on Module', 'Defines which section will be loaded upon login if nothing was selected.'), 5 => array('sorting_helpdesk', 'public_id|DESC', 'Helpdesk Sorting', 'Define the type of sorting for the helpdesk page.'), 6 => array('sorting_project', 'priority|ASC', 'Project Sorting', 'Define the type of sorting for the helpdesk page.'), - 7 => array('projectDetails_todoDisplayOnlyMine', 'all', 'Project Details: Todo display', 'Define what todos are displayed on a project\'s details page.'), + 7 => array('projectDetails_taskDisplayOnlyMine', 'all', 'Project Details: Todo display', 'Define what tasks are displayed on a project\'s details page.'), 8 => array('projectDetails_showCompletedIssues', '1', 'Project Details: Display completed issues', 'Should completed issues display in the details of a project?') ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-04-09 03:07:02
|
Revision: 872 http://cs-project.svn.sourceforge.net/cs-project/?rev=872&view=rev Author: crazedsanity Date: 2008-04-08 20:06:56 -0700 (Tue, 08 Apr 2008) Log Message: ----------- More renaming of "todo" to "task" (issue #151) Modified Paths: -------------- trunk/1.2/docs/features.txt trunk/1.2/docs/schema/cs_project.schema.sql trunk/1.2/docs/sql/setup/02__tables.sql trunk/1.2/docs/sql/setup/03__indexes_etc.sql Modified: trunk/1.2/docs/features.txt =================================================================== --- trunk/1.2/docs/features.txt 2008-04-09 02:59:06 UTC (rev 871) +++ trunk/1.2/docs/features.txt 2008-04-09 03:06:56 UTC (rev 872) @@ -6,7 +6,7 @@ === Simplicity === This system is built on a very simple premise: Project managers manage projects. There are various types of issues associated with those projects (bugs, feature requests, etc). Each project and issue have tasks associated with them. Everyone is interested in how long things take. - CS-Project incorporates all of these principles. Projects are a broad indicator of the various pieces of a system. Large projects can be broken into smaller parts (sometimes referred to as “milestones”) to help focus efforts. New issues, including bugs and feature requests, can be added to a project to help maintain a list of all the things that are requested or have been found to be problematic. Tasks (todos) create a breakdown of things that need to be accomplished. + CS-Project incorporates all of these principles. Projects are a broad indicator of the various pieces of a system. Large projects can be broken into smaller parts (sometimes referred to as “milestones”) to help focus efforts. New issues, including bugs and feature requests, can be added to a project to help maintain a list of all the things that are requested or have been found to be problematic. Tasks create a breakdown of things that need to be accomplished. To further simplify things, CS-Project doesn't tie its users down to a specific way to use it: it can be easily used strictly as a Trouble Ticket (Help Desk) system, or just projects, or both. Modified: trunk/1.2/docs/schema/cs_project.schema.sql =================================================================== --- trunk/1.2/docs/schema/cs_project.schema.sql 2008-04-09 02:59:06 UTC (rev 871) +++ trunk/1.2/docs/schema/cs_project.schema.sql 2008-04-09 03:06:56 UTC (rev 872) @@ -899,7 +899,7 @@ log_estimate_id integer NOT NULL, creation timestamp with time zone DEFAULT now() NOT NULL, uid integer NOT NULL, - todo_id integer NOT NULL, + task_id integer NOT NULL, add_elapsed numeric(10,2) NOT NULL, system_note text ); @@ -1361,12 +1361,12 @@ -- --- Name: todo_comment_table; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- Name: task_comment_table; Type: TABLE; Schema: public; Owner: postgres; Tablespace: -- -CREATE TABLE todo_comment_table ( - todo_comment_id integer NOT NULL, - todo_id integer NOT NULL, +CREATE TABLE task_comment_table ( + task_comment_id integer NOT NULL, + task_id integer NOT NULL, creator_contact_id integer NOT NULL, created timestamp with time zone DEFAULT now() NOT NULL, updated timestamp with time zone, @@ -1375,13 +1375,13 @@ ); -ALTER TABLE public.todo_comment_table OWNER TO postgres; +ALTER TABLE public.task_comment_table OWNER TO postgres; -- --- Name: todo_comment_table_todo_comment_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: task_comment_table_task_comment_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- -CREATE SEQUENCE todo_comment_table_todo_comment_id_seq +CREATE SEQUENCE task_comment_table_task_comment_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE @@ -1389,21 +1389,21 @@ CACHE 1; -ALTER TABLE public.todo_comment_table_todo_comment_id_seq OWNER TO postgres; +ALTER TABLE public.task_comment_table_task_comment_id_seq OWNER TO postgres; -- --- Name: todo_comment_table_todo_comment_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: task_comment_table_task_comment_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- -ALTER SEQUENCE todo_comment_table_todo_comment_id_seq OWNED BY todo_comment_table.todo_comment_id; +ALTER SEQUENCE task_comment_table_task_comment_id_seq OWNED BY task_comment_table.task_comment_id; -- --- Name: todo_table; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- Name: task_table; Type: TABLE; Schema: public; Owner: postgres; Tablespace: -- -CREATE TABLE todo_table ( - todo_id integer NOT NULL, +CREATE TABLE task_table ( + task_id integer NOT NULL, creator_contact_id integer NOT NULL, name text NOT NULL, body text NOT NULL, @@ -1422,13 +1422,13 @@ ); -ALTER TABLE public.todo_table OWNER TO postgres; +ALTER TABLE public.task_table OWNER TO postgres; -- --- Name: todo_table_todo_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: task_table_task_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- -CREATE SEQUENCE todo_table_todo_id_seq +CREATE SEQUENCE task_table_task_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE @@ -1436,13 +1436,13 @@ CACHE 1; -ALTER TABLE public.todo_table_todo_id_seq OWNER TO postgres; +ALTER TABLE public.task_table_task_id_seq OWNER TO postgres; -- --- Name: todo_table_todo_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: task_table_task_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- -ALTER SEQUENCE todo_table_todo_id_seq OWNED BY todo_table.todo_id; +ALTER SEQUENCE task_table_task_id_seq OWNED BY task_table.task_id; -- @@ -1691,17 +1691,17 @@ -- --- Name: todo_comment_id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: task_comment_id; Type: DEFAULT; Schema: public; Owner: postgres -- -ALTER TABLE todo_comment_table ALTER COLUMN todo_comment_id SET DEFAULT nextval('todo_comment_table_todo_comment_id_seq'::regclass); +ALTER TABLE task_comment_table ALTER COLUMN task_comment_id SET DEFAULT nextval('task_comment_table_task_comment_id_seq'::regclass); -- --- Name: todo_id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: task_id; Type: DEFAULT; Schema: public; Owner: postgres -- -ALTER TABLE todo_table ALTER COLUMN todo_id SET DEFAULT nextval('todo_table_todo_id_seq'::regclass); +ALTER TABLE task_table ALTER COLUMN task_id SET DEFAULT nextval('task_table_task_id_seq'::regclass); -- @@ -1902,19 +1902,19 @@ -- --- Name: todo_comment_table_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- Name: task_comment_table_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- -ALTER TABLE ONLY todo_comment_table - ADD CONSTRAINT todo_comment_table_pkey PRIMARY KEY (todo_comment_id); +ALTER TABLE ONLY task_comment_table + ADD CONSTRAINT task_comment_table_pkey PRIMARY KEY (task_comment_id); -- --- Name: todo_table_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- Name: task_table_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- -ALTER TABLE ONLY todo_table - ADD CONSTRAINT todo_table_pkey PRIMARY KEY (todo_id); +ALTER TABLE ONLY task_table + ADD CONSTRAINT task_table_pkey PRIMARY KEY (task_id); -- @@ -2024,11 +2024,11 @@ -- --- Name: log_estiate_table_todo_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: log_estiate_table_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY log_estimate_table - ADD CONSTRAINT log_estiate_table_todo_id_fkey FOREIGN KEY (todo_id) REFERENCES todo_table(todo_id); + ADD CONSTRAINT log_estiate_table_task_id_fkey FOREIGN KEY (task_id) REFERENCES task_table(task_id); -- @@ -2176,51 +2176,51 @@ -- --- Name: todo_comment_table_creator_contact_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: task_comment_table_creator_contact_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- -ALTER TABLE ONLY todo_comment_table - ADD CONSTRAINT todo_comment_table_creator_contact_id_fkey FOREIGN KEY (creator_contact_id) REFERENCES contact_table(contact_id); +ALTER TABLE ONLY task_comment_table + ADD CONSTRAINT task_comment_table_creator_contact_id_fkey FOREIGN KEY (creator_contact_id) REFERENCES contact_table(contact_id); -- --- Name: todo_comment_table_todo_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: task_comment_table_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- -ALTER TABLE ONLY todo_comment_table - ADD CONSTRAINT todo_comment_table_todo_id_fkey FOREIGN KEY (todo_id) REFERENCES todo_table(todo_id); +ALTER TABLE ONLY task_comment_table + ADD CONSTRAINT task_comment_table_task_id_fkey FOREIGN KEY (task_id) REFERENCES task_table(task_id); -- --- Name: todo_table_assigned_contact_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: task_table_assigned_contact_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- -ALTER TABLE ONLY todo_table - ADD CONSTRAINT todo_table_assigned_contact_id_fkey FOREIGN KEY (assigned_contact_id) REFERENCES contact_table(contact_id); +ALTER TABLE ONLY task_table + ADD CONSTRAINT task_table_assigned_contact_id_fkey FOREIGN KEY (assigned_contact_id) REFERENCES contact_table(contact_id); -- --- Name: todo_table_creator_contact_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: task_table_creator_contact_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- -ALTER TABLE ONLY todo_table - ADD CONSTRAINT todo_table_creator_contact_id_fkey FOREIGN KEY (creator_contact_id) REFERENCES contact_table(contact_id); +ALTER TABLE ONLY task_table + ADD CONSTRAINT task_table_creator_contact_id_fkey FOREIGN KEY (creator_contact_id) REFERENCES contact_table(contact_id); -- --- Name: todo_table_record_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: task_table_record_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- -ALTER TABLE ONLY todo_table - ADD CONSTRAINT todo_table_record_id_fkey FOREIGN KEY (record_id) REFERENCES record_table(record_id); +ALTER TABLE ONLY task_table + ADD CONSTRAINT task_table_record_id_fkey FOREIGN KEY (record_id) REFERENCES record_table(record_id); -- --- Name: todo_table_status_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: task_table_status_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- -ALTER TABLE ONLY todo_table - ADD CONSTRAINT todo_table_status_id_fkey FOREIGN KEY (status_id) REFERENCES status_table(status_id); +ALTER TABLE ONLY task_table + ADD CONSTRAINT task_table_status_id_fkey FOREIGN KEY (status_id) REFERENCES status_table(status_id); -- Modified: trunk/1.2/docs/sql/setup/02__tables.sql =================================================================== --- trunk/1.2/docs/sql/setup/02__tables.sql 2008-04-09 02:59:06 UTC (rev 871) +++ trunk/1.2/docs/sql/setup/02__tables.sql 2008-04-09 03:06:56 UTC (rev 872) @@ -289,7 +289,7 @@ log_estimate_id integer NOT NULL, creation timestamp with time zone DEFAULT now() NOT NULL, uid integer NOT NULL, - todo_id integer NOT NULL, + task_id integer NOT NULL, add_elapsed numeric(10,2) NOT NULL, system_note text ); @@ -753,12 +753,12 @@ -- --- Name: todo_comment_table; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- Name: task_comment_table; Type: TABLE; Schema: public; Owner: postgres; Tablespace: -- -CREATE TABLE todo_comment_table ( - todo_comment_id integer NOT NULL, - todo_id integer NOT NULL, +CREATE TABLE task_comment_table ( + task_comment_id integer NOT NULL, + task_id integer NOT NULL, creator_contact_id integer NOT NULL, created timestamp with time zone DEFAULT now() NOT NULL, updated timestamp with time zone, @@ -767,13 +767,13 @@ ); -ALTER TABLE public.todo_comment_table OWNER TO postgres; +ALTER TABLE public.task_comment_table OWNER TO postgres; -- --- Name: todo_comment_table_todo_comment_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: task_comment_table_task_comment_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- -CREATE SEQUENCE todo_comment_table_todo_comment_id_seq +CREATE SEQUENCE task_comment_table_task_comment_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE @@ -781,21 +781,21 @@ CACHE 1; -ALTER TABLE public.todo_comment_table_todo_comment_id_seq OWNER TO postgres; +ALTER TABLE public.task_comment_table_task_comment_id_seq OWNER TO postgres; -- --- Name: todo_comment_table_todo_comment_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: task_comment_table_task_comment_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- -ALTER SEQUENCE todo_comment_table_todo_comment_id_seq OWNED BY todo_comment_table.todo_comment_id; +ALTER SEQUENCE task_comment_table_task_comment_id_seq OWNED BY task_comment_table.task_comment_id; -- --- Name: todo_table; Type: TABLE; Schema: public; Owner: postgres; Tablespace: +-- Name: task_table; Type: TABLE; Schema: public; Owner: postgres; Tablespace: -- -CREATE TABLE todo_table ( - todo_id integer NOT NULL, +CREATE TABLE task_table ( + task_id integer NOT NULL, creator_contact_id integer NOT NULL, name text NOT NULL, body text NOT NULL, @@ -814,13 +814,13 @@ ); -ALTER TABLE public.todo_table OWNER TO postgres; +ALTER TABLE public.task_table OWNER TO postgres; -- --- Name: todo_table_todo_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- Name: task_table_task_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres -- -CREATE SEQUENCE todo_table_todo_id_seq +CREATE SEQUENCE task_table_task_id_seq START WITH 1 INCREMENT BY 1 NO MAXVALUE @@ -828,13 +828,13 @@ CACHE 1; -ALTER TABLE public.todo_table_todo_id_seq OWNER TO postgres; +ALTER TABLE public.task_table_task_id_seq OWNER TO postgres; -- --- Name: todo_table_todo_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres +-- Name: task_table_task_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres -- -ALTER SEQUENCE todo_table_todo_id_seq OWNED BY todo_table.todo_id; +ALTER SEQUENCE task_table_task_id_seq OWNED BY task_table.task_id; -- Modified: trunk/1.2/docs/sql/setup/03__indexes_etc.sql =================================================================== --- trunk/1.2/docs/sql/setup/03__indexes_etc.sql 2008-04-09 02:59:06 UTC (rev 871) +++ trunk/1.2/docs/sql/setup/03__indexes_etc.sql 2008-04-09 03:06:56 UTC (rev 872) @@ -153,17 +153,17 @@ -- --- Name: todo_comment_id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: task_comment_id; Type: DEFAULT; Schema: public; Owner: postgres -- -ALTER TABLE todo_comment_table ALTER COLUMN todo_comment_id SET DEFAULT nextval('todo_comment_table_todo_comment_id_seq'::regclass); +ALTER TABLE task_comment_table ALTER COLUMN task_comment_id SET DEFAULT nextval('task_comment_table_task_comment_id_seq'::regclass); -- --- Name: todo_id; Type: DEFAULT; Schema: public; Owner: postgres +-- Name: task_id; Type: DEFAULT; Schema: public; Owner: postgres -- -ALTER TABLE todo_table ALTER COLUMN todo_id SET DEFAULT nextval('todo_table_todo_id_seq'::regclass); +ALTER TABLE task_table ALTER COLUMN task_id SET DEFAULT nextval('task_table_task_id_seq'::regclass); -- @@ -364,19 +364,19 @@ -- --- Name: todo_comment_table_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- Name: task_comment_table_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- -ALTER TABLE ONLY todo_comment_table - ADD CONSTRAINT todo_comment_table_pkey PRIMARY KEY (todo_comment_id); +ALTER TABLE ONLY task_comment_table + ADD CONSTRAINT task_comment_table_pkey PRIMARY KEY (task_comment_id); -- --- Name: todo_table_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: +-- Name: task_table_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres; Tablespace: -- -ALTER TABLE ONLY todo_table - ADD CONSTRAINT todo_table_pkey PRIMARY KEY (todo_id); +ALTER TABLE ONLY task_table + ADD CONSTRAINT task_table_pkey PRIMARY KEY (task_id); -- @@ -486,11 +486,11 @@ -- --- Name: log_estiate_table_todo_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: log_estiate_table_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY log_estimate_table - ADD CONSTRAINT log_estiate_table_todo_id_fkey FOREIGN KEY (todo_id) REFERENCES todo_table(todo_id); + ADD CONSTRAINT log_estiate_table_task_id_fkey FOREIGN KEY (task_id) REFERENCES task_table(task_id); -- @@ -638,51 +638,51 @@ -- --- Name: todo_comment_table_creator_contact_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: task_comment_table_creator_contact_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- -ALTER TABLE ONLY todo_comment_table - ADD CONSTRAINT todo_comment_table_creator_contact_id_fkey FOREIGN KEY (creator_contact_id) REFERENCES contact_table(contact_id); +ALTER TABLE ONLY task_comment_table + ADD CONSTRAINT task_comment_table_creator_contact_id_fkey FOREIGN KEY (creator_contact_id) REFERENCES contact_table(contact_id); -- --- Name: todo_comment_table_todo_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: task_comment_table_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- -ALTER TABLE ONLY todo_comment_table - ADD CONSTRAINT todo_comment_table_todo_id_fkey FOREIGN KEY (todo_id) REFERENCES todo_table(todo_id); +ALTER TABLE ONLY task_comment_table + ADD CONSTRAINT task_comment_table_task_id_fkey FOREIGN KEY (task_id) REFERENCES task_table(task_id); -- --- Name: todo_table_assigned_contact_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: task_table_assigned_contact_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- -ALTER TABLE ONLY todo_table - ADD CONSTRAINT todo_table_assigned_contact_id_fkey FOREIGN KEY (assigned_contact_id) REFERENCES contact_table(contact_id); +ALTER TABLE ONLY task_table + ADD CONSTRAINT task_table_assigned_contact_id_fkey FOREIGN KEY (assigned_contact_id) REFERENCES contact_table(contact_id); -- --- Name: todo_table_creator_contact_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: task_table_creator_contact_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- -ALTER TABLE ONLY todo_table - ADD CONSTRAINT todo_table_creator_contact_id_fkey FOREIGN KEY (creator_contact_id) REFERENCES contact_table(contact_id); +ALTER TABLE ONLY task_table + ADD CONSTRAINT task_table_creator_contact_id_fkey FOREIGN KEY (creator_contact_id) REFERENCES contact_table(contact_id); -- --- Name: todo_table_record_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: task_table_record_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- -ALTER TABLE ONLY todo_table - ADD CONSTRAINT todo_table_record_id_fkey FOREIGN KEY (record_id) REFERENCES record_table(record_id); +ALTER TABLE ONLY task_table + ADD CONSTRAINT task_table_record_id_fkey FOREIGN KEY (record_id) REFERENCES record_table(record_id); -- --- Name: todo_table_status_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- Name: task_table_status_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres -- -ALTER TABLE ONLY todo_table - ADD CONSTRAINT todo_table_status_id_fkey FOREIGN KEY (status_id) REFERENCES status_table(status_id); +ALTER TABLE ONLY task_table + ADD CONSTRAINT task_table_status_id_fkey FOREIGN KEY (status_id) REFERENCES status_table(status_id); -- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-04-09 02:59:11
|
Revision: 871 http://cs-project.svn.sourceforge.net/cs-project/?rev=871&view=rev Author: crazedsanity Date: 2008-04-08 19:59:06 -0700 (Tue, 08 Apr 2008) Log Message: ----------- Rename "todo" to "task" (issuue #151) Modified Paths: -------------- trunk/1.2/templates/content/task/create.content.tmpl trunk/1.2/templates/content/task/view.content.tmpl Added Paths: ----------- trunk/1.2/templates/content/task/ Removed Paths: ------------- trunk/1.2/templates/content/todo/ Copied: trunk/1.2/templates/content/task (from rev 870, trunk/1.2/templates/content/todo) Modified: trunk/1.2/templates/content/task/create.content.tmpl =================================================================== --- trunk/1.2/templates/content/todo/create.content.tmpl 2008-03-31 16:11:19 UTC (rev 870) +++ trunk/1.2/templates/content/task/create.content.tmpl 2008-04-09 02:59:06 UTC (rev 871) @@ -1,13 +1,13 @@ <!-- - * Last Author: $Author:danf $ - * Current Revision: $Revision:811 $ - * Repository Location: $HeadURL:svn://charybdis.crazedsanity.com/main/projects/cs-project/trunk/templates/content/todo/create.content.tmpl $ - * Last Updated: $Date:2007-06-18 17:49:28 -0500 (Mon, 18 Jun 2007) $ + * Last Author: $Author$ + * Current Revision: $Revision$ + * Repository Location: $HeadURL$ + * Last Updated: $Date$ --> <form method="POST" action=""> -<input type="HIDDEN" name="module" value="todo"> -<input type="HIDDEN" name="id" value="{todo_id}"> +<input type="HIDDEN" name="module" value="task"> +<input type="HIDDEN" name="id" value="{task_id}"> <table> <tbody> <tr> Modified: trunk/1.2/templates/content/task/view.content.tmpl =================================================================== --- trunk/1.2/templates/content/todo/view.content.tmpl 2008-03-31 16:11:19 UTC (rev 870) +++ trunk/1.2/templates/content/task/view.content.tmpl 2008-04-09 02:59:06 UTC (rev 871) @@ -6,8 +6,8 @@ --> <form method="POST" action=""> -<input type="HIDDEN" name="module" value="todo"> -<input type="HIDDEN" name="todo_id" value="{todo_id}"> +<input type="HIDDEN" name="module" value="task"> +<input type="HIDDEN" name="task_id" value="{task_id}"> <table> <tbody> <tr> @@ -43,7 +43,7 @@ <table border=0 cellpadding=3 cellspacing=0> <!-- BEGIN previousComments --> <tr> - <td><b>%%subject%%</b> (<i>#%%todo_comment_id%%</i>) by <i>%%creator%%</i>: %%created%%</td> + <td><b>%%subject%%</b> (<i>#%%task_comment_id%%</i>) by <i>%%creator%%</i>: %%created%%</td> </tr> <tr> <td><pre>%%body%%</pre></td> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-03-31 16:11:52
|
Revision: 870 http://cs-project.svn.sourceforge.net/cs-project/?rev=870&view=rev Author: crazedsanity Date: 2008-03-31 09:11:19 -0700 (Mon, 31 Mar 2008) Log Message: ----------- Added release checklist, updated appliance to have update when user first logs-in. Modified Paths: -------------- vmware/Ubuntu_JeOS.7z Added Paths: ----------- vmware/release_checklist.txt Modified: vmware/Ubuntu_JeOS.7z =================================================================== (Binary files differ) Added: vmware/release_checklist.txt =================================================================== --- vmware/release_checklist.txt (rev 0) +++ vmware/release_checklist.txt 2008-03-31 16:11:19 UTC (rev 870) @@ -0,0 +1,12 @@ +Steps to run prior to distributing CS-Project VMware appliance: + +1.) make sure /etc/opt/cs-project/initial_config_done is NOT present +2.) in the appliance OS as root, run: + cat /dev/zero > zero.fill;sync;sleep 1;sync;rm -f zero.fill +3.) in the HOST OS, shrink the vmdk file: + vmware-vdiskmanager.exe -k Ubuntu_JeOS-0-s001.vmdk +4.) be sure root and user password are reset. +5.) update the 7zip file: + cd vmware + 7z a Ubuntu_JeOS.7z Ubuntu_JeOS/ +6.) upload the new appliance. \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-03-31 02:22:07
|
Revision: 869 http://cs-project.svn.sourceforge.net/cs-project/?rev=869&view=rev Author: crazedsanity Date: 2008-03-30 19:21:56 -0700 (Sun, 30 Mar 2008) Log Message: ----------- *** RELEASE 1.1.5 *** Add ancestry link list to issue title (issue #146), plus remove wrapping from send_single_email() so wrapping isn't terrible. SVN COMMAND::: merge -r866:868 https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/1.1 Modified Paths: -------------- releases/1.1/VERSION releases/1.1/lib/bbCodeParser.class.php releases/1.1/lib/globalFunctions.php releases/1.1/templates/email/helpdesk-remark.tmpl Modified: releases/1.1/VERSION =================================================================== --- releases/1.1/VERSION 2008-03-31 02:19:47 UTC (rev 868) +++ releases/1.1/VERSION 2008-03-31 02:21:56 UTC (rev 869) @@ -1,4 +1,4 @@ $Id:VERSION 628 2007-11-20 16:58:45Z crazedsanity $ -VERSION: 1.1.4 +VERSION: 1.1.5 $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/VERSION $ Modified: releases/1.1/lib/bbCodeParser.class.php =================================================================== --- releases/1.1/lib/bbCodeParser.class.php 2008-03-31 02:19:47 UTC (rev 868) +++ releases/1.1/lib/bbCodeParser.class.php 2008-03-31 02:21:56 UTC (rev 869) @@ -69,8 +69,18 @@ $retval = '[helpdesk_id='. $helpdeskId .']'; if(is_numeric($helpdeskId)) { try { - $data = $this->helpdeskObj->get_record($helpdeskId); - $retval = '[<a href="http://'. PROJECT_URL .'/content/helpdesk/view?ID='. $helpdeskId .'">'. $data['name'] .'</a>]'; + $data = $this->helpdeskObj->get_record($helpdeskId); + $displayName = $data['name']; + + //add project linkage if there is any... + if($data['ancestry_level'] > 1) { + //pull the ancestry string. + $parentRecord = $this->projectObj->get_parent_record($data['ancestry']); + $x = $this->projectObj->get_ancestry_link_list($parentRecord['public_id'], TRUE, TRUE, TRUE); + $displayName = $x .' / <b>'. $displayName ."</b>"; + } + + $retval = '[<a href="http://'. PROJECT_URL .'/content/helpdesk/view?ID='. $helpdeskId .'">'. $displayName .'</a>]'; } catch(exception $e) { debug_print($e->getMessage); Modified: releases/1.1/lib/globalFunctions.php =================================================================== --- releases/1.1/lib/globalFunctions.php 2008-03-31 02:19:47 UTC (rev 868) +++ releases/1.1/lib/globalFunctions.php 2008-03-31 02:21:56 UTC (rev 869) @@ -1756,7 +1756,6 @@ $mail->ContentType = "text/html"; $mail->Subject = $subject; $mail->Body = $bbCodeParser->parseString($body); - $mail->WordWrap = 75; $logsObj = new logsClass($db, 'Email'); Modified: releases/1.1/templates/email/helpdesk-remark.tmpl =================================================================== --- releases/1.1/templates/email/helpdesk-remark.tmpl 2008-03-31 02:19:47 UTC (rev 868) +++ releases/1.1/templates/email/helpdesk-remark.tmpl 2008-03-31 02:21:56 UTC (rev 869) @@ -12,7 +12,7 @@ </tr> <tr> <th>Name of Issue:</th> - <td><pre>{name}</pre></td> + <td><pre>[helpdesk_id={public_id}]</pre></td> </tr> <tr> <th>Submitted by:</th> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-03-31 02:19:50
|
Revision: 868 http://cs-project.svn.sourceforge.net/cs-project/?rev=868&view=rev Author: crazedsanity Date: 2008-03-30 19:19:47 -0700 (Sun, 30 Mar 2008) Log Message: ----------- *** RELEASE 1.1.5 *** Add ancestry link list to issue title (issue #146), plus remove wrapping from send_single_email() so wrapping isn't terrible. Modified Paths: -------------- trunk/1.1/VERSION trunk/1.1/lib/globalFunctions.php Modified: trunk/1.1/VERSION =================================================================== --- trunk/1.1/VERSION 2008-03-31 01:58:27 UTC (rev 867) +++ trunk/1.1/VERSION 2008-03-31 02:19:47 UTC (rev 868) @@ -1,4 +1,4 @@ $Id:VERSION 628 2007-11-20 16:58:45Z crazedsanity $ -VERSION: 1.1.4 +VERSION: 1.1.5 $HeadURL:https://cs-project.svn.sourceforge.net/svnroot/cs-project/trunk/VERSION $ Modified: trunk/1.1/lib/globalFunctions.php =================================================================== --- trunk/1.1/lib/globalFunctions.php 2008-03-31 01:58:27 UTC (rev 867) +++ trunk/1.1/lib/globalFunctions.php 2008-03-31 02:19:47 UTC (rev 868) @@ -1756,7 +1756,6 @@ $mail->ContentType = "text/html"; $mail->Subject = $subject; $mail->Body = $bbCodeParser->parseString($body); - $mail->WordWrap = 75; $logsObj = new logsClass($db, 'Email'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cra...@us...> - 2008-03-31 01:58:29
|
Revision: 867 http://cs-project.svn.sourceforge.net/cs-project/?rev=867&view=rev Author: crazedsanity Date: 2008-03-30 18:58:27 -0700 (Sun, 30 Mar 2008) Log Message: ----------- Modify BBCode & email template to show issue ancestry. FIXES ISSUE::: #146: Email notice -- display ancestry /templates/email/helpdesk-remark.tmpl: -- change template var from {name} to "[helpdesk_id={public_id}]" so it can be parsed by the BBCode parser. /lib/bbCodeParser.class.php: * get_helpdesk_bbcode(): -- adds linkage to parent project if one is set. Modified Paths: -------------- trunk/1.1/lib/bbCodeParser.class.php trunk/1.1/templates/email/helpdesk-remark.tmpl Modified: trunk/1.1/lib/bbCodeParser.class.php =================================================================== --- trunk/1.1/lib/bbCodeParser.class.php 2008-03-31 01:56:53 UTC (rev 866) +++ trunk/1.1/lib/bbCodeParser.class.php 2008-03-31 01:58:27 UTC (rev 867) @@ -69,8 +69,18 @@ $retval = '[helpdesk_id='. $helpdeskId .']'; if(is_numeric($helpdeskId)) { try { - $data = $this->helpdeskObj->get_record($helpdeskId); - $retval = '[<a href="http://'. PROJECT_URL .'/content/helpdesk/view?ID='. $helpdeskId .'">'. $data['name'] .'</a>]'; + $data = $this->helpdeskObj->get_record($helpdeskId); + $displayName = $data['name']; + + //add project linkage if there is any... + if($data['ancestry_level'] > 1) { + //pull the ancestry string. + $parentRecord = $this->projectObj->get_parent_record($data['ancestry']); + $x = $this->projectObj->get_ancestry_link_list($parentRecord['public_id'], TRUE, TRUE, TRUE); + $displayName = $x .' / <b>'. $displayName ."</b>"; + } + + $retval = '[<a href="http://'. PROJECT_URL .'/content/helpdesk/view?ID='. $helpdeskId .'">'. $displayName .'</a>]'; } catch(exception $e) { debug_print($e->getMessage); Modified: trunk/1.1/templates/email/helpdesk-remark.tmpl =================================================================== --- trunk/1.1/templates/email/helpdesk-remark.tmpl 2008-03-31 01:56:53 UTC (rev 866) +++ trunk/1.1/templates/email/helpdesk-remark.tmpl 2008-03-31 01:58:27 UTC (rev 867) @@ -12,7 +12,7 @@ </tr> <tr> <th>Name of Issue:</th> - <td><pre>{name}</pre></td> + <td><pre>[helpdesk_id={public_id}]</pre></td> </tr> <tr> <th>Submitted by:</th> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |