|
#1
|
|||
|
|||
|
I have made a modification that calculates the date when a Ticket is overdue, based on actual workhours (meaning a ticket can't become overdue outside workhours) The first version was based on the assumption that tickets will only be created during workhours, due to using Autocron. (I hadn't bothered with a cronjob) This version worked like this: class.ticket.php (starting line 1320): PHP Code:
Now, I wanted to alter the code in case a cronjob is set, so that the duedate will still be within workhours. To do this, I had to change the berechnen() function so it now returns the actual timestamp. (created by either the mktime() or strtotime() function) This worked without problems in a small testscript, but when I included the changes into osticket, (which also meant removing the 'time() + 'from the line where the function berechnen() is called) the system stopped creating Tickets. Any Idea what the problem is? |
|
#2
|
|||
|
|||
|
Sorry for the double-Post, but i'm a bit on a schedule. To give some more information, i present the berechnen()-function:
PHP Code:
|
|
#3
|
||||
|
||||
|
Have you tried putting the stock class.ticket.php back in place to see if the system starts making tickets again?
Also I have moved this post to the mods forum since your problem is the result of modding your source. |
|
#4
|
|||
|
|||
|
I still have the first Version of my modification, and that one is still working.
|
|
#5
|
|||
|
|||
|
It's getting more confusing. When I removed the call of the function berechnen() (basically having the content of the loop be $pruefer=true; ), the ticket creation was working again. When i changed the function berechnen() to just return '1', it still didn't work.
Edit: -_- Spot the difference: PHP Code:
PHP Code:
Yeah, you read right. I forgot the Object. ARGH!!! On a lighter sidenote, should i manage to get some time free for it, i'll try to make the mod more complete (like including setting workhours in the config or something like that) and open a new thread for it. Last edited by guyfonderball; 05-07-2012 at 01:24 PM. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|