MantisBT - v3.0 Release
View Issue Details
0001027v3.0 Release[All Projects] Generalpublic2011-11-30 13:592013-08-28 11:21
Reporterproject_manager 
Assigned Tocaseydk 
PrioritynormalSeveritytweakReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version3.0.0 
Summary0001027: "Assigned To" users are not generated on pdf printout. "tasklist.php": bug report & fix
Description- latest "tasklist.php" from SVN (from pedora)
- file enclosed with comments & bug-fix
- "Assigned To" users are not generated on pdf printout.
- previous caseydk bug-fix of handling of only max. 2x "assigned to" users to handle all users.
---> introduced a new bug: $users are handled as an array()
---> pdf() needs a String-value !

Conversion (put code inside):

/********************************************************/
// "Assigned To" Users are arranged as an array $users[]
// ---> need to be converted to a single "String" as the $pdf->ezTable()requires it!
// loop runs on each task-entry
// implode(): combines array-elements with a "," between."
           
        $abc = array();
    // If more than 1 user, users are combined to a String value
        if ( count($users) > 1 ) {
             $abc = implode(",",$users);
             $users = $abc; // important not to generate a subarray with [].
                }
    // Keep only one user, but covert users-array to a "single" array!
        else $users = $users[0];

 /********************************************************/
                 
                
    if ($project_id == 0) {

$pdfdata[] = array($Tasks['project_name'], $Tasks['task_name'], $Tasks['task_description'], $users, (($start_date != ' ') ? $start_date->format($df) : ' '), (($end_date != ' ') ? $end_date->format($df) : ' '), $Tasks['task_percent_complete'] . '%', );
                           
        } else {
            
$pdfdata[] = array($Tasks['task_name'], $Tasks['task_description'], $users, (($start_date != ' ') ? $start_date->format($df) : ' '), (($end_date != ' ') ? $end_date->format($df) : ' '), $Tasks['task_percent_complete'] . '%', );
                  
                }
    }
  
Additional Information/* $Id: tasklist.php 2205 2011-11-25 19:38:08Z caseydk $ $URL: https://web2project.svn.sourceforge.net/svnroot/web2project/trunk/modules/reports/reports/tasklist.php $ */
// 1. December 2011; project_manager
// latest SVN with pedora-fix
// own db-sorting
// with caseydk-fix: all "Assigned To" users are printed out (screen-ok, ped generates error, no pdf print)
// fix of array2string conversion for "Assigned To" users of caseyk-bug to be pdf printed.
TagsNo tags attached.
Attached Filestxt tasklist.php.txt (14,207) 1969-12-31 16:00
https://bugs.web2project.net/file_download.php?file_id=303&type=bug

Notes
(0002361)
caseydk   
2011-12-22 21:03   
Resolved in r2262, differently than described but simpler;

Issue History
2011-11-30 13:59project_managerNew Issue
2011-11-30 13:59project_managerFile Added: tasklist.php.txt
2011-12-22 21:03caseydkNote Added: 0002361
2011-12-22 21:03caseydkStatusnew => resolved
2011-12-22 21:03caseydkResolutionopen => fixed
2011-12-22 21:03caseydkAssigned To => caseydk
2013-08-28 11:14caseydkFixed in Version => 3.0.0
2013-08-28 11:21caseydkStatusresolved => closed