- Edited
Hello,Is it possible to change the default due-date time when editing a ticket? It's currently defaulting to 12am, I would rather it default to 11.I've checked around the "edit ticket" php files, but no luck or I'm missing it.Thank you!
Hello,Is it possible to change the default due-date time when editing a ticket? It's currently defaulting to 12am, I would rather it default to 11.I've checked around the "edit ticket" php files, but no luck or I'm missing it.Thank you!
It appears in the file includes/class.misc.php is where the time is initially set. It is on line 106 (in my copy) and the method is timeDropdownIt is an object of the Misc class.Keep in mind I just mapped out this function. I am not sure what else calls this so be careful.I would recommend you create a new class that extends the Misc class and then override that method for that specific instance.
I'm having a hard time finding this! Time zone stuff always confuses me. I'm searching for where the 12am call would be called but not seeing it.Any further help is appreciated... I think I've nailed it down to the following area (maybe??): ob_start(); echo sprintf('<select name="%s" id="%s">',$name,$name); echo '<option value="" selected>'.__('Time').'</option>'; $format = $cfg->getTimeFormat(); for($i=23; $i>=0; $i--) { for($minute=45; $minute>=0; $minute-=15) { $sel=($hr==$i && $min==$minute)?'selected="selected"':''; $_minute=str_pad($minute, 2, '0',STR_PAD_LEFT); $_hour=str_pad($i, 2, '0',STR_PAD_LEFT); $disp = gmdate($format, $i*3600 + $minute*60); echo sprintf('<option value="%s:%s" %s>%s</option>',$_hour,$_minute,$sel,$disp);
It is actually happening a little bit higher.function timeDropdown($hr=null, $min =null,$name='time') { global $cfg; $hr =is_null($hr)?0:$hr; $min =is_null($min)?0:$min; //normalize; if($hr>=24) $hr=$hr%24; elseif($hr<0) $hr=0; if($min>=45) $min=45; elseif($min>=30) $min=30; elseif($min>=15) $min=15; else $min=0;So what this is doing is if this ticket doesnt have a pre selected time, it will default to 24H and 0m which translates to 12am. What you can do is set the final hour else to 23 and the final minute else to 45.
Sure enough! Thank you!!!
Hi - Sorry to resurrect an old post but I would like to modify the default time the time picker defaults to when modifying the due date.
I have looked for the timeDropdown function in realease 1.14.6 and cannot seem to find it.
Has anyone else looked at this in the latest releases?