SiT! Bugs

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001945SiT!incidentspublic2014-06-12 14:282014-06-12 14:30
ReporterFrans 
Assigned To 
PrioritynormalSeverityminorReproducibilitysometimes
StatusnewResolutionopen 
PlatformLinuxOSCentOSOS Version2.6+later
Product Version3.67 LTS 
Target VersionFixed in Version 
Summary0001945: Duplicated incidents
DescriptionThe users (engineers) are complaining about duplicated incidents.
I suspect they do a refresh of the page which assigns the incident to an engineer.
This refresh causes the duplication of the incident --> Reproducible.
The users pretend they don't do that (but I do not believe them).
Anyways, I included a test before creating the incident.
In the file incident_add.php, before the "insert into incidents",
I check the existence of an incident with the same title,
from the same user and for the same contact registrated
within the last three minutes.


    $lapso = $now - 180; // 180 sec = 3 min
    $ya_existe = exec_sql ("select id value from incidents where title = '{$incidenttitle}' and owner = '{$sit[2]}' and contact = '{$contactid}' and opened > {$lapso} ; ");
    if ($ya_existe != "")
        {
        $nombre = contact_realname ($contactid);
        $message = "Already exists an incident with title: {$incidenttitle}
Created by yourself for the contact {$nombre}
The incident number is ".$ya_existe.".";
        html_redirect ("main.php", FALSE, $message);
        return;
        }
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0004945)
Frans (reporter)
2014-06-12 14:30

function exec_sql($sql) // Devuelve un solo campo de un solo registro ! El nombre del campo = "value".
    {
    $val = "";
    $result = mysql_query($sql);
    if (mysql_error()) trigger_error($sql." -- ".mysql_error(), E_USER_WARNING);
    
    // debug_log ("Frans exec_sql = ".$sql);
    
    if ($result != false)
        {
        if (mysql_num_rows($result) > 0)
            {
            $inf = mysql_fetch_object($result);

            // debug_log("Frans exec_sql inf.value = ".$inf->value);
        
            $val = $inf->value;
            }
        mysql_free_result($result);
        }
    return $val;
    }

- Issue History
Date Modified Username Field Change
2014-06-12 14:28 Frans New Issue
2014-06-12 14:30 Frans Note Added: 0004945


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker