Ticket Default Values : Date
Closed this issue · 3 comments
Hello,
Can't set Ticket Default Values for start date
start_date:mail->date
start_date:$mail->date$
not working
Thanks for pointing this out!
It indeed only worked for the default values of a person and in some other cases; but it should work for ticket default values now. I also noticed and double checked a mistake in the documentation, it should be ´$mail->date$´ (so dollar sign at the end).
It's only available in the "master" branch for now, I haven't updated the "Releases" yet. But "master" branch is stable at the moment.
Do mind that it is possible that iTop sets/overrides some attributes in some cases. I haven't tested it but I did quickly check the default iTop XML Datamodel; it seems "start_date" is automatically set to the date the ticket is created in iTop itself if there's no value defined yet. So it should work fine for you 😁
And perhaps a last note for this specific case: I also haven't tested yet if the date will be returned in a consistent manner. In my case, I live in GMT +1. I do see the same time I see in my Outlook mail client (which is however different from the email source header which uses a different time zone). I believe it will be fine if you configure the timezone correctly in PHP and in the iTop configuration file.
I had to look at Combodo's original code which is still present in this fork; the time is formatted using the date()
function in PHP and is hardcoded to be formatted as Y-m-d H:i:s
.
Thank you, works fine
Thanks for confirming!