SiT! Bugs

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001961SiT!schedulerpublic2015-04-10 15:592015-05-09 13:52
Reporterdipohl 
Assigned Topaulh 
PriorityhighSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformLinuxOSLinuxOS Version2.6+later
Product Version3.67 LTS 
Target VersionFixed in VersionCurrent SVN 
Summary0001961: [PATCH] schedule_actions_due() - SQL query result is empty
DescriptionAfter migrating our SiT! instance to a new server:

Red Hat Enterprise Linux Server release 7.1 (Maipo)
mysql Ver 15.1 Distrib 5.5.41-MariaDB, for Linux (x86_64) using readline 5.1
PHP 5.4.16 (cli) (built: Oct 23 2014 07:19:40)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

auto.php was not working any more.

Investigation showed that no due tasks were found.
Steps To Reproducerunning auto.php from cronjob and also when called via webbrowser does nothing.
Additional InformationMariaDB [sit]> SELECT * FROM `scheduler` WHERE `status` = 'enabled' AND type = 'interval' AND UNIX_TIMESTAMP(start) <= 1428674062 AND (UNIX_TIMESTAMP(end) >= 1428674062 OR UNIX_TIMESTAMP(end) = 0) AND IF(UNIX_TIMESTAMP(lastran) > 0, UNIX_TIMESTAMP(lastran) + `interval`, UNIX_TIMESTAMP(NOW())) <= 1428674062 AND IF(UNIX_TIMESTAMP(laststarted) > 0, UNIX_TIMESTAMP(lastran), -1) <= IF(UNIX_TIMESTAMP(laststarted) > 0, UNIX_TIMESTAMP(laststarted), 0);
Empty set (0.00 sec)

MariaDB [sit]> select * from scheduler;
+----+----------------------+--------+---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+---------------------+---------------------+----------+----------+-----------+-------------+-----------+-------------+---------------------+---------+
| id | action | params | paramslabel | description | status | start | end | type | interval | date_type | date_offset | date_time | laststarted | lastran | success |
+----+----------------------+--------+---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+---------------------+---------------------+----------+----------+-----------+-------------+-----------+-------------+---------------------+---------+
| 1 | CloseIncidents | 554400 | closure_delay | Close incidents that have been marked for closure for longer than the <var>closure_delay</var> parameter (which is in seconds) | enabled | 2008-01-01 00:00:00 | 0000-00-00 00:00:00 | interval | 300 | month | 0 | NULL | NULL | 2015-04-08 12:20:01 | 1 |
| 2 | SetUserStatus | | NULL | (EXPERIMENTAL) This will set users status based on data from their holiday calendar. e.g. Out of Office/Away sick. | enabled | 2008-01-01 00:00:00 | 0000-00-00 00:00:00 | interval | 300 | month | 0 | NULL | NULL | 2015-04-08 12:20:01 | 1 |
| 3 | PurgeJournal | | NULL | Delete old journal entries according to the config setting <var>$CONFIG['journal_purge_after']</var> | enabled | 2008-01-01 00:00:00 | 0000-00-00 00:00:00 | interval | 86400 | month | 0 | NULL | NULL | 2015-04-07 21:09:01 | 1 |
| 4 | TimeCalc | | NULL | Calculate SLA Target Times and trigger OUT_OF_SLA and OUT_OF_REVIEW system email templates where appropriate. | enabled | 2008-01-01 00:00:00 | 0000-00-00 00:00:00 | interval | 1800 | month | 0 | NULL | NULL | 2015-04-08 11:59:01 | 1 |
| 5 | ChaseCustomers | | NULL | Chase customers | enabled | 2008-01-01 00:00:00 | 0000-00-00 00:00:00 | interval | 3600 | month | 0 | NULL | NULL | 2015-04-08 12:23:01 | 1 |
| 6 | CheckWaitingEmail | | NULL | Checks the holding queue for emails and fires the TRIGGER_WAITING_HELD_EMAIL trigger when it finds some. | enabled | 2008-01-01 00:00:00 | 0000-00-00 00:00:00 | interval | 300 | month | 0 | NULL | NULL | 0000-00-00 00:00:00 | 1 |
| 7 | PurgeExpiredFTPItems | | NULL | purges files which have expired from the FTP site when run. | enabled | 2008-01-01 00:00:00 | 0000-00-00 00:00:00 | interval | 216000 | month | 0 | NULL | NULL | 2015-04-07 18:50:01 | 1 |
| 8 | CheckIncomingMail | | NULL | Check incoming support mailbox. | enabled | 2008-01-01 00:00:00 | 0000-00-00 00:00:00 | interval | 300 | month | 0 | NULL | NULL | 0000-00-00 00:00:00 | 1 |
| 9 | CheckTasksDue | | NULL | Checks for due tasks. | enabled | 2008-01-01 00:00:00 | 0000-00-00 00:00:00 | interval | 3600 | month | 0 | NULL | NULL | 2015-04-08 12:23:01 | 1 |
| 10 | ldapSync | | NULL | Sync users and customers from LDAP | enabled | 2014-03-07 00:00:00 | 0000-00-00 00:00:00 | interval | 3600 | month | 0 | 00:00:00 | NULL | 2015-04-08 11:35:01 | 1 |
+----+----------------------+--------+---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------+---------------------+---------------------+----------+----------+-----------+-------------+-----------+-------------+---------------------+---------+
10 rows in set (0.00 sec)
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
User avatar (0004961)
dipohl (developer)
2015-04-10 16:01

Issue can be fixed with the following changes:

# rcsdiff functions.inc.php
===================================================================
RCS file: RCS/functions.inc.php,v
retrieving revision 1.1
diff -r1.1 functions.inc.php
5996c5996
< $sql .= "AND UNIX_TIMESTAMP(start) <= $now AND (UNIX_TIMESTAMP(end) >= $now OR UNIX_TIMESTAMP(end) = 0) ";
---
> $sql .= "AND UNIX_TIMESTAMP(start) <= $now AND (UNIX_TIMESTAMP(end) >= $now OR UNIX_TIMESTAMP(end) is NULL) ";
6011c6011
< $sql .= "AND UNIX_TIMESTAMP(start) <= $now AND (UNIX_TIMESTAMP(end) >= $now OR UNIX_TIMESTAMP(end) = 0) ";
---
> $sql .= "AND UNIX_TIMESTAMP(start) <= $now AND (UNIX_TIMESTAMP(end) >= $now OR UNIX_TIMESTAMP(end) is NULL) ";
6029c6029
< $sql .= "AND (UNIX_TIMESTAMP(end) >= $now OR UNIX_TIMESTAMP(end) = 0) ";
---
> $sql .= "AND (UNIX_TIMESTAMP(end) >= $now OR UNIX_TIMESTAMP(end) is NULL) ";
User avatar (0004979)
paulh (administrator)
2015-05-09 13:52

Thanks Dipohl this is fixed in r7600 and 8d704ee

- Issue History
Date Modified Username Field Change
2015-04-10 15:59 dipohl New Issue
2015-04-10 16:01 dipohl Note Added: 0004961
2015-05-09 13:52 paulh Note Added: 0004979
2015-05-09 13:52 paulh Assigned To => paulh
2015-05-09 13:52 paulh Status new => resolved
2015-05-09 13:52 paulh Resolution open => fixed
2015-05-09 13:52 paulh Fixed in Version => Current SVN


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker