You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2019-10-29 14:25:59

alexkenon
Member
Registered: 2019-07-17
Posts: 31

New comment on the request - color

Hello. Question. When the user receives a letter that a new comment on the request has been received, it would be desirable that the most recent comment in the request is colored red. So that when a notification letter came to the mail, it was immediately visible to the last comment, which will be colored red. Where is it set up?

Offline

#2 2019-10-29 15:32:02

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,145

Re: New comment on the request - color

setup>notification>notification Template>[my template]>translations> change code

if "comment" means followup
then use

##FOREACH last followups##
<font  color="red">##followup.description##</font>
##ENDFOREACHfollowups##


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Online

#3 2019-10-29 17:09:58

alexkenon
Member
Registered: 2019-07-17
Posts: 31

Re: New comment on the request - color

LaDenrée wrote:

setup>notification>notification Template>[my template]>translations> change code

if "comment" means followup
then use

##FOREACH last followups##
<font  color="red">##followup.description##</font>
##ENDFOREACHfollowups##



Thanks for the help. Yes, that's what I meant (last followup). BUT! There is already a line in the "tickets" code:

##FOREACHfollowups##

[##followup.date##] ##lang.followup.isprivate## : ##followup.isprivate##
##lang.followup.author## ##followup.author##
##lang.followup.description## ##followup.description##
##lang.followup.date## ##followup.date##
##lang.followup.requesttype## ##followup.requesttype##

##ENDFOREACHfollowups##

I just need to paint this line red (##followup.description##)?

But then all comments will be red and I only need the last one.

Is it possible?

Last edited by alexkenon (2019-10-29 17:10:06)

Offline

#4 2019-10-29 17:15:38

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,145

Re: New comment on the request - color

do you really need all the followups in notification ?

if yes then

##FOREACH last followups##
[##followup.date##] ##lang.followup.isprivate## : ##followup.isprivate##
##lang.followup.author## ##followup.author##
<font  color="red">##lang.followup.description## ##followup.description##</font>
##lang.followup.date## ##followup.date##
##lang.followup.requesttype## ##followup.requesttype##
##ENDFOREACHfollowups##

##FOREACHfollowups##
[##followup.date##] ##lang.followup.isprivate## : ##followup.isprivate##
##lang.followup.author## ##followup.author##
##lang.followup.description## ##followup.description##
##lang.followup.date## ##followup.date##
##lang.followup.requesttype## ##followup.requesttype##
##ENDFOREACHfollowups##

last followup will be printed twice :  once red and the other time, like the other followups


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Online

#5 2019-11-07 15:29:03

alexkenon
Member
Registered: 2019-07-17
Posts: 31

Re: New comment on the request - color

LaDenrée wrote:

do you really need all the followups in notification ?

if yes then

##FOREACH last followups##
[##followup.date##] ##lang.followup.isprivate## : ##followup.isprivate##
##lang.followup.author## ##followup.author##
<font  color="red">##lang.followup.description## ##followup.description##</font>
##lang.followup.date## ##followup.date##
##lang.followup.requesttype## ##followup.requesttype##
##ENDFOREACHfollowups##

##FOREACHfollowups##
[##followup.date##] ##lang.followup.isprivate## : ##followup.isprivate##
##lang.followup.author## ##followup.author##
##lang.followup.description## ##followup.description##
##lang.followup.date## ##followup.date##
##lang.followup.requesttype## ##followup.requesttype##
##ENDFOREACHfollowups##

last followup will be printed twice :  once red and the other time, like the other followups

Thanks!

Last edited by alexkenon (2019-11-07 15:29:18)

Offline

Board footer

Powered by FluxBB