You are not logged in.
Pages: 1
Hello,
we're trying to build some new Notification Templates.
We came across this tags:
##ticket.log.content##
##ticket.log.date##
##ticket.log.field##
##ticket.log.user##
As far as we figured they give back history (log file data)
But, if we put them in a template they don't work.
In the notification the is no data. The only thing you see is the printed tag name
e.g.:
URL : http://xxxxx/index.php?redirect=ticket_263
Beschreibung der Supportanfrage
##ticket.log.content##
##ticket.log.date##
##ticket.log.field##
##ticket.log.user##
Ereignis : Ticket aktualisiert
How are this tags are used?
Frank
Still nuts about GLPI
Running glpi 0.84.1 on Ubuntu 12.04 LTS
Why are my posts written so poorly: I was the best dyslexic in my class.
Offline
I know it has been a while and you may no longer need this information, but I figured it could be helpful for someone else.
Just like for ticket followups you need to surround those tags by the FOREACH tags. The following example would show the log history for everyone historical event for the ticket.
##FOREACHlog##
Time : ##ticket.log.date##
By : ##ticket.log.user##
Field Updated : ##ticket.log.field##
Details : ##ticket.log.content##
##ENDFOREACHlog##
If you only want to display the last historical event you could change the first line to
##FOREACH LAST log##
In my testing earlier today I also found that the following commands are also valid even though they are not listed anywhere.
This first one displays the number of historical events associated with the ticket
##ticket.numberoflogs##
I also discovered that you can you IF statements to filter out certain fields. So if I only wanted to historical events pertaining to the status field, I could use the following to filter them out.
##IFticket.log.field=Status##
##ENDIFticket.log.field##
Altogether it would look something like this
##FOREACHlog##
##IFticket.log.field=Status##
Time : ##ticket.log.date##
By : ##ticket.log.user##
Field Updated : ##ticket.log.field##
Details : ##ticket.log.content##
##ENDIFticket.log.field##
##ENDFOREACHlog##
I discovered these extra commands because I am trying to find a way to display a limited number of historical events, say maybe the last 5. If anybody else has any suggestions on how to make that happen, I would appreciate the input.
Offline
Hello,
we figured it out. But you cleared up some other things.
THX
You can close
Frank
Still nuts about GLPI
Running glpi 0.84.1 on Ubuntu 12.04 LTS
Why are my posts written so poorly: I was the best dyslexic in my class.
Offline
No matter the stage in personal evolution, we all seek attraction, attention, and eventually LOVE. For some connectionsnumerology reportthis is simply not possible. It can be rather frustrating not being able to have a good connection with someone over an extended period of time. Especially seeing other couples happy, frolicked and displaying public affection.
Offline
No matter the stage in personal evolution, we all seek attraction, attention, and eventually LOVE. For some connectionsnumerology reportthis is simply not possible. It can be rather frustrating not being able to have a good connection with someone over an extended period of time. Especially seeing other couples happy, frolicked and displaying public affection..
Offline
No matter the stage in personal evolution, we all seek attraction, attention, and eventually LOVE. For some connectionsnumerology reportthis is simply not possible. It can be rather frustrating not being able to have a good connection with someone over an extended period of time. Especially seeing other couples happy, frolicked and displaying public affection...
Offline
Then after that what I loved most was having Sandra and Maria hang with me chilling all day everyday.
Then when I went to the college or whatever to call it what I loved most about that was when I had sex with a girl whom I still don’t know her name. Her name was something and I always called her Britney Spears. I lost my virginity toneed womenher. That was my most favorite moment. I was 16 at that time. A year before I had the best moment also when I spent 3 hours kissing Edda, a beautiful girl. I was just too scared to do anything more with her. After this pathetic school system I went to denmark.
Offline
Realy helpful... thank you.
I know it has been a while and you may no longer need this information, but I figured it could be helpful for someone else.
Just like for ticket followups you need to surround those tags by the FOREACH tags. The following example would show the log history for everyone historical event for the ticket.
##FOREACHlog## Time : ##ticket.log.date## By : ##ticket.log.user## Field Updated : ##ticket.log.field## Details : ##ticket.log.content## ##ENDFOREACHlog##
If you only want to display the last historical event you could change the first line to
##FOREACH LAST log##
In my testing earlier today I also found that the following commands are also valid even though they are not listed anywhere.
This first one displays the number of historical events associated with the ticket##ticket.numberoflogs##
I also discovered that you can you IF statements to filter out certain fields. So if I only wanted to historical events pertaining to the status field, I could use the following to filter them out.
##IFticket.log.field=Status## ##ENDIFticket.log.field##
Altogether it would look something like this
##FOREACHlog## ##IFticket.log.field=Status## Time : ##ticket.log.date## By : ##ticket.log.user## Field Updated : ##ticket.log.field## Details : ##ticket.log.content## ##ENDIFticket.log.field## ##ENDFOREACHlog##
I discovered these extra commands because I am trying to find a way to display a limited number of historical events, say maybe the last 5. If anybody else has any suggestions on how to make that happen, I would appreciate the input.
GLPI 0.90.1 / OCS Inventory 2.1.2 / OCS AGENTS v2.1.1.1/ 1500 hosts
Debian Squeeze, Apache/2.2.16, PHP 5.4.45-1~dotdeb+6.1, MySQL 5.1.73
Offline
Use the "LAST n" syntax like
#FOREACH LAST 10 log##
if you want to get the last 10 logs
regards,
Tomolimo
GLPI 9.2.4 - PHP 7.2.13 x64 / ProcessMaker 3.3.0-community-RE-1.7 - PHP 7.1.24 x64 / Windows 2012 x64 / IIS 8.5 / MySQL 5.7.17 x64
Worldwide: >12316 PC, >9400 users (16 languages, >11 timezones), >360k tickets, >3600 entities, >4200 groups
Raynet is ARaymond (http://www.araymond.com) IT service management
Offline
Hi Tomolimo...
I'm putting this codes in my notification model but the message that I'm receiving is empty... Like nothing has done...
Did you already experience this behavior?
I try delete and recreate the model but still facing the same problem... Don't know what else i can do.
Regards.
GLPI 0.90.1 / OCS Inventory 2.1.2 / OCS AGENTS v2.1.1.1/ 1500 hosts
Debian Squeeze, Apache/2.2.16, PHP 5.4.45-1~dotdeb+6.1, MySQL 5.1.73
Offline
I figure it out...
For some reason the default notification comes with ##FOREACHtickets## ##ENDFOREACHtickets## (side by side)
I've put this codes again... this time ##FOREACHtickets## on top and the other at the end, closing the "script"
and
also had to reenter all other codes in the middle... erase, consult the list and retype one by one.
Now it's working...
Tomolimo... in your experience, what do you think about this... I think this is something to be reviewed by developers.
Last edited by scharpf (2013-03-26 21:12:53)
GLPI 0.90.1 / OCS Inventory 2.1.2 / OCS AGENTS v2.1.1.1/ 1500 hosts
Debian Squeeze, Apache/2.2.16, PHP 5.4.45-1~dotdeb+6.1, MySQL 5.1.73
Offline
Pages: 1