SiT! Bugs

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000704SiT!triggerspublic2009-05-19 16:522013-05-04 17:56
Reporterivan 
Assigned Toivan 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version3.45 
Target Version3.90beta1Fixed in VersionCurrent GIT 
Summary0000704: Optional trigger parameters that are not provided can cause errors in trigger rules
DescriptionIf a trigger has parameters that are not required (i.e. Optional) and the trigger call does not provide values for those parameter and a trigger rule uses one of those same parameters an error can result because the {param} variable within the trigger rule will be replaced with an empty string leading to a rule like

=== TRUE

which is obviously invalid.
TagsNo tags attached.
Attached Files

- Relationships
parent of 0000350closedivan Open incident via portal gives an eval error 
parent of 0000685closed Customer Adding incidents 
child of 0001089confirmed [META] triggers revamp 

-  Notes
User avatar (0001386)
kieran (administrator)
2009-07-24 16:40

Bumping to 3.60, it's not causing problems atm and should be solved by the new triggers UI.
User avatar (0004577)
ivan (administrator)
2012-11-03 14:50

Review to see what the current status is.
User avatar (0004815)
paulh (administrator)
2013-05-04 16:36

To reproduce this issue create a notification on incident created and enable a check for priority though don't enter a priority and you get the following error

2013-05-04T16:34:00+01:00 /sit4/incident_new.php Application Warning [512] Error in trigger rule for
                                TRIGGER_INCIDENT_CREATED, check your
                                <a href='triggers.php'>trigger rules</a>
ID: 43, rule: {incidentpriorityid}== (in line 317 of file /home/paulh/git/paulheaneys-sit/lib/trigger.class.php)


and in the apache logs


[Sat May 04 16:34:00 2013] [error] [client ::1] PHP Parse error: syntax error, unexpected ';' in /home/paulh/git/paulheaneys-sit/lib/trigger.class.php(310) : eval()'d code on line 1, referer: http://localhost/sit4/incident_new.php?action=incidentform&type=support&contactid=4&maintid=1&producttext=Example+Product&productid=1&updateid=0&siteid=1&win= [^]
[Sat May 04 16:34:00 2013] [error] [client ::1] PHP Stack trace:, referer: http://localhost/sit4/incident_new.php?action=incidentform&type=support&contactid=4&maintid=1&producttext=Example+Product&productid=1&updateid=0&siteid=1&win= [^]
[Sat May 04 16:34:00 2013] [error] [client ::1] PHP 1. {main}() /home/paulh/git/paulheaneys-sit/incident_new.php:0, referer: http://localhost/sit4/incident_new.php?action=incidentform&type=support&contactid=4&maintid=1&producttext=Example+Product&productid=1&updateid=0&siteid=1&win= [^]
[Sat May 04 16:34:00 2013] [error] [client ::1] PHP 2. TriggerEvent->TriggerEvent() /home/paulh/git/paulheaneys-sit/incident_new.php:893, referer: http://localhost/sit4/incident_new.php?action=incidentform&type=support&contactid=4&maintid=1&producttext=Example+Product&productid=1&updateid=0&siteid=1&win= [^]
[Sat May 04 16:34:00 2013] [error] [client ::1] PHP 3. Trigger->fire() /home/paulh/git/paulheaneys-sit/lib/trigger.class.php:53, referer: http://localhost/sit4/incident_new.php?action=incidentform&type=support&contactid=4&maintid=1&producttext=Example+Product&productid=1&updateid=0&siteid=1&win= [^]
User avatar (0004816)
paulh (administrator)
2013-05-04 17:50

5232df37 adds check that optional parameters are filled in, don't think there is any point in checking the command before execution as its no different the running the command and getting the error (if we do need to check it won't be trivial)

- Issue History
Date Modified Username Field Change
2009-05-19 16:52 ivan New Issue
2009-05-19 16:54 ivan Relationship added parent of 0000350
2009-05-19 16:56 ivan Relationship added parent of 0000685
2009-05-19 16:56 ivan Status new => confirmed
2009-05-19 16:56 ivan Target Version => 3.50
2009-07-24 16:40 kieran Note Added: 0001386
2009-07-24 16:40 kieran Assigned To => kieran
2009-07-24 16:40 kieran Target Version 3.50 => 3.60
2009-08-17 12:30 kieran Target Version 3.60 => 3.80
2009-08-17 12:31 kieran Status confirmed => assigned
2010-02-20 17:03 paulh Target Version 3.60 LTS => 4.0
2010-02-20 17:04 paulh Relationship added child of 0001089
2011-02-14 13:25 ivan Target Version 4.0 => 3.90beta1
2012-11-03 14:50 ivan Assigned To kieran => ivan
2012-11-03 14:50 ivan Note Added: 0004577
2013-05-04 16:36 paulh Note Added: 0004815
2013-05-04 17:50 paulh Note Added: 0004816
2013-05-04 17:56 paulh Status assigned => resolved
2013-05-04 17:56 paulh Resolution open => fixed
2013-05-04 17:56 paulh Fixed in Version => Current GIT


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker