This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, master has been updated
via 639065297ce9fd073887bd5bbc7e0844b1b4dc67 (commit)
from 1f5534ca30bf70ea66eddfa062c8b788ed6051de (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=639065297ce9fd073887bd5bbc7e0844b1b4dc67
commit 639065297ce9fd073887bd5bbc7e0844b1b4dc67
Author: Franck Villaume <[email protected]>
Date: Sat Jan 21 09:16:55 2017 +0100
export csv: split in 2 values the effort: unit and value
diff --git a/src/common/tracker/actions/downloadcsv.php
b/src/common/tracker/actions/downloadcsv.php
index 96377da..6489646 100644
--- a/src/common/tracker/actions/downloadcsv.php
+++ b/src/common/tracker/actions/downloadcsv.php
@@ -88,8 +88,11 @@ if ($headers) {
// Show the extra fields
//
$ef = $ath->getExtraFields();
- $keys=array_keys($ef);
- for ($i=0; $i<count($keys); $i++) {
+ $keys = array_keys($ef);
+ for ($i = 0; $i < count($keys); $i++) {
+ if ($ef[$keys[$i]]['field_type'] ==
ARTIFACT_EXTRAFIELDTYPE_EFFORT) {
+ echo $sep.'"'.'effort_unit for
'.$ef[$keys[$i]]['field_name'].'"';
+ }
echo $sep.'"'.$ef[$keys[$i]]['field_name'].'"';
}
echo "\n";
@@ -130,7 +133,16 @@ for ($i=0; $i<count($at_arr); $i++) {
$effortUnitSet = new EffortUnitSet($ath,
$ath->getEffortUnitSet());
$effortUnitFactory = new
EffortUnitFactory($effortUnitSet);
}
- $value =
$effortUnitFactory->encodedToString($efd_pair['value']);
+ $units = $effortUnitFactory->getUnits();
+ $unitId =
$effortUnitFactory->encodedToUnitId($efd_pair['value']);
+ $unittexts = _('Unknown');
+ foreach ($units as $unit) {
+ if ($unit->getID() == $unitId) {
+ $unittexts = $unit->getName();
+ }
+ }
+ echo $sep.'"'. fix4csv($unittexts) .'"';
+ $value =
$effortUnitFactory->encodedToValue($efd_pair['value']);
} else {
$value = $efd_pair["value"];
}
-----------------------------------------------------------------------
Summary of changes:
src/common/tracker/actions/downloadcsv.php | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits