Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005280TestLinkReportspublic2012-10-12 05:092012-10-12 05:09
Reporterleed 
Assigned To 
PrioritynormalSeverityfeature requestReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Fixed in Version 
Summary0005280: format Execution Notes in reports to show original line breaks
DescriptionReports like "Failed Test Cases" include the "Execution Notes" column but if the notes entered for a failed test include carriage returns those are lost in the report. Depending on the notes this loss of formatting can make it hard to read. For example, our automated tests submit results which can include a stack trace when the test fails. Take out all the carriage returns and it can be pretty hard to read.


I originally made my own fix in TL 1.8.5. Now I made a fix in 1.9.3. I decided I should submit this in case others want it in the product and I won't have to figure it out next time :-)

My fix is for html reports. We should do a similar fix for Excel/Calc, etc.
Steps To ReproduceExecute a test
Set the "Notes / Description" field to something like this;

1. line 1 of notes
2. line 2 of notes

Select the Failed radio button
Save Execution

Go to "Test Reports" "Failed Test Cases"
You will see that the "Execution Notes" column contains;

1. line 1 of notes2. line 2 of notes

Additional InformationMy solution (may not be the best but does work) is in

"lib/functions/exttable.class.php"


        function buildContent()
        {
                if( !is_null($this->data) ) // to avoid warnings on foreach
                {
                        foreach ($this->data as &$row) {

                                // 2012-10-11 - Lee Drengenberg - wrap execution notes in

                                if (isset($row['notes'])) {
                                        $row['notes']="
" . $row['notes'] . "<\pre>";
                                }

                                // Use only column values from each row (makes every index numeric)
                                // This makes sure a js array is created, if named keys are used
                                // json_encode will create a js object instead.
                                $row = array_values($row);
                        }
                }
                return json_encode($this->data);
        }

TagsNo tags attached.
Database (MySQL,Postgres,etc)mySQL
Browser
PHP Version
TestCaseID
QA Team - Task Workflow StatusTBD
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2012-10-12 05:09 leed New Issue



Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker