SiT! Bugs

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001347SiT!inbound emailpublic2010-06-17 12:252010-07-21 21:29
Reporternicdev 
Assigned Toivan 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.61 LTS 
Target Version3.62 LTSFixed in Version3.62 LTS 
Summary0001347: attachments that moved by move_update.php are not moved
DescriptionWhen we assign an email from the holding queue, the attachments are not moved from "/updates" to "/{incidentid}". This is because we never changes this code when incident_add.php was modified.

second issue is that if the file is not found there is no else statement and no debug info..
Steps To ReproduceIn move_update.php on line 184:
***Code***
while ($row = mysql_fetch_object($result))
            {
                $filename = $row->linkcolref . "-" . $row->filename;
                $old_file = $old_path . $filename;
                if (file_exists($old_file))
                {
                    $rename = rename($old_file, $new_path . $filename);
                    if (!$rename)
                    {
                        trigger_error("Couldn't move file: {$file}", E_USER_WARNING);
                        $moved_attachments = FALSE;
                    }
                }
            }
***Code***

This statement on line 187:
($old_file = $old_path . $filename;) <--- This is incorrect, as it should be:
$old_file = $old_path . $row->linkcolref;) <--- This is as it is in incident_add.php


Additional InformationFor the second issue, we say:
if (file_exists($old_file))

but there is no else if the file does not exist, thus it continues without error. I suggest we do the following:
**Code**
if (file_exists($old_file))
{
    $rename = rename($old_file, $new_path . $filename);
    if (!$rename)
    {
        trigger_error("Couldn't move file: {$filename}", E_USER_WARNING);
        $moved_attachments = FALSE;
    }
}
else
{
    debug_log("Could not find the file: {$old_file}");
    trigger_error("Couldn't FIND file: {$filename}", E_USER_WARNING);
    $moved_attachments = FALSE;
{

There are descrepancies in this code if compared to "incident_add.php" for example
TagsNo tags attached.
Attached Files

- Relationships
related to 0001005closedpaulh Creating an incident from the holding queue does not move the attachment 

-  Notes
User avatar (0003291)
ivan (administrator)
2010-07-04 15:04

Fixed in svn r6547 and Git 14fddb7
User avatar (0003321)
ivan (administrator)
2010-07-18 15:05

Released in v3.62

- Issue History
Date Modified Username Field Change
2010-06-17 12:25 nicdev New Issue
2010-06-17 12:42 ivan Relationship added related to 0001005
2010-07-04 12:29 ivan Status new => assigned
2010-07-04 12:29 ivan Assigned To => ivan
2010-07-04 12:29 ivan Target Version => 3.62 LTS
2010-07-04 15:04 ivan Note Added: 0003291
2010-07-04 15:04 ivan Status assigned => resolved
2010-07-04 15:04 ivan Fixed in Version => Current SVN
2010-07-04 15:04 ivan Resolution open => fixed
2010-07-18 15:05 ivan Note Added: 0003321
2010-07-18 15:05 ivan Status resolved => closed
2010-07-21 21:29 ivan Fixed in Version Current SVN => 3.62 LTS


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker