SiT! Bugs

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001749SiT!incidentspublic2011-12-15 14:482011-12-19 20:08
Reporternicdev 
Assigned Topaulh 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product VersionCurrent GIT 
Target Version3.90beta1Fixed in VersionCurrent GIT 
Summary0001749: Incident_update and Incident_email saves multiple drafts
DescriptionWhen Updating an incident or sending an email, a new draft is saved every 10 seconds, creating an enormous amount of data in the Drafts DB table. It seems the drafid remains "-1" thus a new draft is created instead of updating the existing draft.
TagsNo tags attached.
Attached Filespng file icon Image 008 2011 12 15.png [^] (32,110 bytes) 2011-12-15 14:48

- Relationships

-  Notes
User avatar (0004368)
nicdev (developer)
2011-12-15 16:20

For info I have found the error, but I need someone to confirm it ...

Problem is that we use "Setinterval" with no time(which i assume defaults to 1mS) as well as PeriodicalExecuter every 10 seconds:
--- Code ---
new PeriodicalExecuter(function(pe) {
        setInterval("save_draft('"+<?php echo $id; ?>+"', 'update')")
    },
    10);
--- End ---
This causes the function "save draft" to be executed every mS continuously renewed every 10 seconds.

I changed the code as follows:
--- Code ---
new PeriodicalExecuter(function(pe) {
        save_draft('<?php echo $id; ?>', 'update')
    },
    10);

I confirm it works now.

Can someone confirm ?

Thanks
--- End ---
User avatar (0004376)
paulh (administrator)
2011-12-19 20:03

I can't actually reproduce this though agree we don't need to call setInterval
User avatar (0004377)
paulh (administrator)
2011-12-19 20:08

55aee85 tidies this up, cheers Nico

- Issue History
Date Modified Username Field Change
2011-12-15 14:48 nicdev New Issue
2011-12-15 14:48 nicdev File Added: Image 008 2011 12 15.png
2011-12-15 16:20 nicdev Note Added: 0004368
2011-12-19 20:03 paulh Note Added: 0004376
2011-12-19 20:03 paulh Status new => confirmed
2011-12-19 20:04 paulh Assigned To => paulh
2011-12-19 20:04 paulh Target Version => 3.90beta1
2011-12-19 20:08 paulh Note Added: 0004377
2011-12-19 20:08 paulh Status confirmed => resolved
2011-12-19 20:08 paulh Resolution open => fixed
2011-12-19 20:08 paulh Fixed in Version => Current GIT


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker