View Issue Details

IDProjectCategoryView StatusLast Update
0031876mantisbtplug-inspublic2023-02-22 19:21
Reporterdregad Assigned Todregad  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Target Version2.25.6Fixed in Version2.25.6 
Summary0031876: XML import: Undefined property warning when importing bug notes
Description

When importing issues with bugnotes where the bugnote node does not contain all the possible fields, Mantis issues a System warning

'Undefined property: stdClass::$time_tracking' in '.../plugins/XmlImportExport/ImportXml/Issue.php' line 263
'Undefined property: stdClass::$note_type' in '.../plugins/XmlImportExport/ImportXml/Issue.php' line 265
'Undefined property: stdClass::$note_attr' in '.../plugins/XmlImportExport/ImportXml/Issue.php' line 266
'Undefined property: stdClass::$last_modified' in '.../plugins/XmlImportExport/ImportXml/Issue.php' line 270

These fields are actually not mandatory and should be defaulted when not present.

TagsNo tags attached.

Relationships

related to 0031550 closeddregad Unable to import xml data 

Activities

There are no notes attached to this issue.

Related Changesets

MantisBT: master-2.25 8f53f0f7

2022-11-30 12:02

dregad


Details Diff
Fix undefined variable warnings in XML plugin

When importing issues with bugnotes where the bugnote node does not
contain all the possible fields, Mantis issues an Undefined property
warning.

This sets a default value for missing non-required fields to prevent
this.

Fixes 0031876

Backported from 431562242080fd1747b97d567349b05b34da7157.
Affected Issues
0031876
mod - plugins/XmlImportExport/ImportXml/Issue.php Diff File

MantisBT: master 43156224

2022-11-30 12:02

dregad


Details Diff
Fix undefined variable warnings in XML plugin

When importing issues with bugnotes where the bugnote node does not
contain all the possible fields, Mantis issues an Undefined property
warning.

This sets a default value for missing non-required fields to prevent
this.

Fixes 0031876
Affected Issues
0031876
mod - plugins/XmlImportExport/ImportXml/Issue.php Diff File