[CS-Project-svn_notify] SF.net SVN: cs-project: [867] trunk/1.1
Brought to you by:
crazedsanity
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. |