[CS-Project-svn_notify] SF.net SVN: cs-project:[950] trunk/1.2
Brought to you by:
crazedsanity
From: <cra...@us...> - 2009-02-09 15:54:31
|
Revision: 950 http://cs-project.svn.sourceforge.net/cs-project/?rev=950&view=rev Author: crazedsanity Date: 2009-02-09 15:54:29 +0000 (Mon, 09 Feb 2009) Log Message: ----------- Fix problem where issues unable to be solved (#250) & remove unneeded code. /includes/content/helpdesk/view.inc: * removed some commented-out code that was unnecessary when solving. * removed debugging code for consolidating submit button & setting message... * removed the "action==create" section; that's a different include altogether * removed code regarding "owner" code (the block rows within the check don't even exist anymore, so it doesn't make any difference) * remove code for updating project associations (commented-out) /lib/helpdeskClass.php: * remark(): -- set $this->helpdeskId for solve(). -- only check $isSolution to determine if solve() should be called -- remove solve() from email check. -- remove debug_print() before return statement. Modified Paths: -------------- trunk/1.2/includes/content/helpdesk/view.inc trunk/1.2/lib/helpdeskClass.php Modified: trunk/1.2/includes/content/helpdesk/view.inc =================================================================== --- trunk/1.2/includes/content/helpdesk/view.inc 2009-02-07 19:54:15 UTC (rev 949) +++ trunk/1.2/includes/content/helpdesk/view.inc 2009-02-09 15:54:29 UTC (rev 950) @@ -78,8 +78,6 @@ $useRespondLink = FALSE; if($_POST['isSolution']) { //IT'S A SOLUTION - //solve it & make sure they know if it was good or not. - #$result = $proj->helpdeskObj->solve($helpdeskId, $_POST['solution']); $remarks[] = array( 'remark' => $_POST['remark'], 'isSolution' => true @@ -155,9 +153,6 @@ ); } - #$page->gfObj->debug_print($_POST,1); - #$page->gfObj->debug_print($setMessage,1); - #exit; $page->set_message_wrapper($setMessage); } elseif($action == "re-open") { @@ -197,20 +192,7 @@ unset($_SESSION['goBackLink']); } - if($action == "create") { - create_page_title($page, array('title' => "Create a Helpdesk Issue")); - $page->set_all_block_rows("content"); - - //show the "category" selection. - $categoryList = $proj->helpdeskObj->get_category_list('bug', TRUE); - $page->add_template_var("select_tags", $categoryList); - - // - $page->add_template_var("email", $_SESSION['email']); - $page->add_template_var("linked_proj", cleanString($_GET['proj']),"numeric"); - - } - elseif($action == "view" && !is_numeric($helpdeskId)) { + if($action == "view" && !is_numeric($helpdeskId)) { //missing ID: throw a message & send 'em packin'. set_message_wrapper(array( "title" => "Invalid ID Specified", @@ -269,20 +251,6 @@ $doNotRipRows[] = "assigned_optionList"; $doNotRipRows[] = "priority_optionList"; $doNotRipRows[] = "editable_tags"; - if(($assignedStr == $_SESSION['contact_id']) || ($assignedStr == "" || is_null($assignedStr))) { - //well, we can show 'em the update/modify button. - $doNotRipRows[] = "update_button"; - if($_SESSION['contact_id'] == $assignedStr) { - //they're the owner... show 'em more options. - $doNotRipRows[] = "solution_row"; - $doNotRipRows[] = "owner_options"; - } - //if they're the owner, show 'em more options... - } - elseif($_SESSION['isGroupOwner']) { - //we got an OWNER!!! - $doNotRipRows[] = "owner_options"; - } $doNotRipRows[] = "remark_row"; $doNotRipRows[] = "buttons_row"; $doNotRipRows[] = 'accessBlock__modifyButton'; @@ -295,9 +263,6 @@ //keep the set of data allows it to be linked to a project. $doNotRipRows[] = "edit_project_selection"; - - //TODO: implement a link for updating project associations. - #$page->add_template_var("select_project_list", $proj->create_project_option_list($helpdeskData['ancestry'], NULL)); } $doNotRipRows[] = 'update_button'; Modified: trunk/1.2/lib/helpdeskClass.php =================================================================== --- trunk/1.2/lib/helpdeskClass.php 2009-02-07 19:54:15 UTC (rev 949) +++ trunk/1.2/lib/helpdeskClass.php 2009-02-09 15:54:29 UTC (rev 950) @@ -156,6 +156,7 @@ //start a transaction so if one part fails, they all fail. $this->db->beginTrans(); + $this->helpdeskId = $helpdeskId; $tmp = $this->get_record($helpdeskId); $noteObj = new noteClass($this->db); $noteData = array( @@ -209,6 +210,9 @@ $details = 'Sent notification(s) of for [helpdesk_id='. $helpdeskId .'] remark to: '. $sendEmailRes; $this->logsObj->log_by_class($details, 'information', NULL, $this->recordTypeId, $helpdeskId); + if($isSolution) { + $this->solve(); + } if($isSolution && strlen(constant('HELPDESK_ISSUE_ANNOUNCE_EMAIL'))) { $subject = '[ALERT] Helpdesk Issue #'. $helpdeskId .' was SOLVED'; if(strlen($_SESSION['login_username'])) { @@ -218,8 +222,6 @@ $sendEmailRes = send_email(HELPDESK_ISSUE_ANNOUNCE_EMAIL, $subject, $emailTemplate, $parseArr); $details = 'Sent notifications of SOLUTION for [helpdesk_id='. $helpdeskId .'] to: '. $sendEmailRes; $this->logsObj->log_by_class($details, 'information'); - - $this->solve(); } $this->db->commitTrans(); } @@ -230,8 +232,6 @@ } } - $this->gfObj->debug_print(__METHOD__ .": result=(". $retval .")",1); - return($retval); }//end remark() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |