[evolvis-commits] r18689: extend JSON export by voting information and linked tasks
mirabilos at evolvis.org
mirabilos at evolvis.org
Thu Oct 4 17:59:45 CEST 2012
Author: mirabilos
Date: 2012-10-04 17:59:44 +0200 (Thu, 04 Oct 2012)
New Revision: 18689
Modified:
trunk/gforge_base/evolvisforge-5.1/src/www/tracker/t_lookup.php
Log:
extend JSON export by voting information and linked tasks
Modified: trunk/gforge_base/evolvisforge-5.1/src/www/tracker/t_lookup.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/tracker/t_lookup.php 2012-10-04 15:59:39 UTC (rev 18688)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/tracker/t_lookup.php 2012-10-04 15:59:44 UTC (rev 18689)
@@ -135,6 +135,19 @@
$xinfo['group_artifact_unixname'] = $ah->getArtifactType()->getUnixName();
$xinfo['group_realname'] = $ah->getArtifactType()->getGroup()->getPublicName();
$xinfo['group_unixname'] = $ah->getArtifactType()->getGroup()->getUnixName();
+ $xinfo['_votes'] = array_combine(array(
+ 'votes',
+ 'voters',
+ 'votage_percent',
+ ), $ah->getVotes());
+ $xinfo['_related_tasks'] = array();
+ if ($ah->getArtifactType()->getGroup()->usesPM()) {
+ $taskcount = db_numrows($ah->getRelatedTasks());
+ if ($taskcount >= 1) for ($i = 0; $i < $taskcount; ++$i) {
+ $taskinfo = db_fetch_array($ah->relatedtasks, $i);
+ $xinfo['_related_tasks'][] = $taskinfo['project_task_id'];
+ }
+ }
}
sysdebug_off("Content-type: " . $asformat);
More information about the evolvis-commits
mailing list