Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: FF5.3.4 : Tracker : export CSV [ Reply ]
By: Franck Villaume on 2017-05-07 14:50
[forum:1008]
see [#853] for implementation in master branch.

RE: FF5.3.4 : Tracker : export CSV [ Reply ]
By: Franck Villaume on 2017-05-07 10:29
[forum:1007]
Well done!

RE: FF5.3.4 : Tracker : export CSV [ Reply ]
By: Chanh TRAN on 2017-05-05 14:43
[forum:1006]
Finally, this is how I solved my needs Inside 'downloadcsv' :


$result = $at_arr[$i]->getMessages();
$rows=db_numrows($result);
if ($rows > 0) {

$data = db_fetch_array($res);

$comments="";

for ($j=0; $j < $rows; $j++) {
$date = date(my_gettext('Y-m-d H:i'),db_result($result, $j, 'adddate'));
$realname = db_result($result,$j,'realname');

$body = (db_result($result,$j,'body'));

// replace all newline by ' ~ '
$body = str_replace(array("\r\n", "\r", "\n", PHP_EOL, chr(10), chr(13), chr(10).chr(13)), " ~ ", $body);

$comments = $comments . " *** " . $date . " --- " . $realname . " --- " . $body;
}

echo $sep.$comments;

RE: FF5.3.4 : Tracker : export CSV [ Reply ]
By: Franck Villaume on 2017-05-05 13:57
[forum:1005]
the work done for [#848] feature is part of FusionForge master code.
Most of the code is in the ~/src/bin/forge file.

https://scm.fusionforge.org/anonscm/gitweb?p=fusionforge/fusionforge.git;a=blob;f=src/bin/forge;h=14f0cf33c781e32bca6623567df853b4f1b89893;hb=HEAD

Notice: the enhancement requires a lot of modification in FusionForge main classes to support / improve the dump/import functions

https://scm.fusionforge.org/anonscm/gitweb?p=fusionforge%2Ffusionforge.git&a=search&h=HEAD&st=commit&s=forge+cli

RE: FF5.3.4 : Tracker : export CSV [ Reply ]
By: Chanh TRAN on 2017-05-05 12:20
[forum:1004]
Hi Franck,

Thx for replying so quickly

About 'work done in [#848]', if I guessed right the title is 'Import projects from another forge site'.
But I can't seem to find 'master code' you mentioned.
So could you pls give me link pointing to this code ?

Thx again in advance for your help
Regards

RE: FF5.3.4 : Tracker : export CSV [ Reply ]
By: Franck Villaume on 2017-05-05 11:16
[forum:1003]
Hi, the CSV exports one element per column.
It could be possible to export comments into one new column but all comments would be wrap all together. You will need to do some development to implement the feature.

Did you look at the SOAP API available in FF5.3.4? and leverage the standard functions: getArtifacts and getArtifactMessages
FusionForge community has published a SOAP cli. Maybe worth to try it: https://fusionforge.org/scm/browser.php?group_id=6&extra=fusionforge-soap-cli

Other option would be to look at the current work done in [#848] and see if backport from the master code into 5.3 branch is possible.

FF5.3.4 : Tracker : export CSV [ Reply ]
By: Chanh TRAN on 2017-05-04 15:23
[forum:1002]
Hi all,

Is there anyway to have also all the 'comments' with 'export CSV' in addition to :

artifact_id status_id status_name priority submitter_id submitter_name assigned_to_id assigned_to_name open_date close_date last_modified_date summary details _votes _voters _votage

Thx in advance for any help
Regards,