Anonymous | Login | Signup for a new account | 2021-04-12 02:19 BST | ![]() |
Main | My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
0001945 | SiT! | incidents | public | 2014-06-12 14:28 | 2014-06-12 14:30 | ||||||||
Reporter | Frans | ||||||||||||
Assigned To | |||||||||||||
Priority | normal | Severity | minor | Reproducibility | sometimes | ||||||||
Status | new | Resolution | open | ||||||||||
Platform | Linux | OS | CentOS | OS Version | 2.6+later | ||||||||
Product Version | 3.67 LTS | ||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0001945: Duplicated incidents | ||||||||||||
Description | The 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; } | ||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files | |||||||||||||
![]() |
|
(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; } |
![]() |
|||
Date Modified | Username | Field | Change |
2014-06-12 14:28 | Frans | New Issue | |
2014-06-12 14:30 | Frans | Note Added: 0004945 |
Copyright © 2000 - 2021 MantisBT Team |