[CLOSED] Ticket background color in dashboard depending on the AGE, not Priority

Moderator: crythias

Post Reply
othoma
Znuny newbie
Posts: 25
Joined: 04 May 2015, 11:45
Znuny Version: 4.0.6

[CLOSED] Ticket background color in dashboard depending on the AGE, not Priority

Post by othoma »

Hi there,

After crawling the forum I did find solutions to color the background of a ticket depending on the priority, but I'm looking to change the color depending on the age of the ticket.

So basically, if my process ticket is older than 15 minutes, color it in red.

I don't want to escalate the ticket, I just want to remind the agent that the process is taking more time than expected and need attention without sending mail or sms notification.

The delay should be different according the process.

So,
process A --> red after 15 minutes
process B --> red after 30 minutes
process c --> red after 1 day

Thanks a lot for your answers.

Have a nice week-end.
Last edited by othoma on 10 Jul 2015, 12:39, edited 1 time in total.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Ticket background color in dashboard depending on the AGE, not Priority

Post by crythias »

why not change the priority based upon age?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
othoma
Znuny newbie
Posts: 25
Joined: 04 May 2015, 11:45
Znuny Version: 4.0.6

Re: Ticket background color in dashboard depending on the AGE, not Priority

Post by othoma »

hi thanks for your attention.

The reason is I already use priority for another kind of sorting.
When I decided to print a list of ticket each day at midnight, it appeared to me that the printed information was the number of the process (something like Process-2708071027f742c46cb0fba0d1106c40), as I wanted the name of the process to be printed, I decided to create priority with the name of the process for each process, and at the creation of the process ticket, the priority is set to what I want to appear on my report, it's a redundant way of doing things but it's the only way I found to do it.

If I have to correct that please let me know.

Thanks
othoma
Znuny newbie
Posts: 25
Joined: 04 May 2015, 11:45
Znuny Version: 4.0.6

Re: Ticket background color in dashboard depending on the AGE, not Priority

Post by othoma »

Does anyone have any idea(s) ?

Thanks
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Ticket background color in dashboard depending on the AGE, not Priority

Post by crythias »

I'm not able to replicate your environment, so I'm unsure where the background color exists.
I'm also not sure how you're not getting the title of the process as well as the process ID in your print job.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
othoma
Znuny newbie
Posts: 25
Joined: 04 May 2015, 11:45
Znuny Version: 4.0.6

Re: Ticket background color in dashboard depending on the AGE, not Priority

Post by othoma »

Thanks for the answer.

I made a generic agent changing the state of my open ticket older than XX minutes (depending on the process) to Pending Reminder state.

So if I make a generic agent for each different process I will be able to change the state of my ticket to pending reminder with a different amount of time for each process.

How can I change the color of the flag (instead of line background) for all tickets with pending reminder state?

It will be less flashy, but will do the job.

Thanks
othoma
Znuny newbie
Posts: 25
Joined: 04 May 2015, 11:45
Znuny Version: 4.0.6

Re: Ticket background color in dashboard depending on the AGE, not Priority

Post by othoma »

I found the .Flag span.Escalated
warning
priorityID-X

background-color


But what about the pending reminder ?


THX
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Ticket background color in dashboard depending on the AGE, not Priority

Post by crythias »

Note that generally a css code may be established for a known, static ID(value) of a field's state. Doing math to change css is beyond the scope of what you should expect from this forum.

That said, if a generic agent can calculate this and change a DynamicField value, it's possible you might be able to modify CSS to reflect the value of the Dynamic Field. (But where and how?) First would be the .tt or .dtl of the location that represents what you're going to change. Second would be a style sheet that has the appropriate style data given the field's value. As an example:

OTRS3:

Code: Select all

<span class="PriorityID-$QData{"PriorityID"}">
OTRS4:

Code: Select all

<span class="PriorityID-[% Data.PriorityID | html %]">
css (var/httpd/htdocs/skins/Agent/default/css/Core.Default.css)

Code: Select all

.Flag span.PriorityID-1 {
    background-color:#03c4f0;
}  
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
othoma
Znuny newbie
Posts: 25
Joined: 04 May 2015, 11:45
Znuny Version: 4.0.6

Re: Ticket background color in dashboard depending on the AGE, not Priority

Post by othoma »

So, if I understand. It's all about the file AdminState.tt & Core.Default.css ?

Am I right?
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Ticket background color in dashboard depending on the AGE, not Priority

Post by crythias »

othoma wrote:So, if I understand. It's all about the file AdminState.tt & Core.Default.css ?

Am I right?
If that complies with your request, sure. If you tried it and had an error or different result, you'd be asking a different question.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
othoma
Znuny newbie
Posts: 25
Joined: 04 May 2015, 11:45
Znuny Version: 4.0.6

Re: Ticket background color in dashboard depending on the AGE, not Priority

Post by othoma »

Hello again,

so in Core.Default.css I tried

Code: Select all

.Flag span.ID-6 {
    background-color:#F00;
}
6 being the id of the pending reminder state in the database.

But nothing happens, I'm still looking for a way to "trigger" that css.

I had a look in AdminState.tt to get the parameter for StateID, taking as exemple AdminPriority.tt

In AdminPriority the parameter Data.PriorityID is set with PriorityID in the css and it works
So in AdminState the parameter Data.ID should work if I use "ID-X" in my css, but it doesn't.

I tried with span.ID - span.StateID - span.Pending - span.Pending Reminder - span.PendingReminder

What do I miss, I think my css code is correct. :roll:
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Ticket background color in dashboard depending on the AGE, not Priority

Post by crythias »

othoma wrote:So in AdminState the parameter Data.ID should work if I use "ID-X" in my css, but it doesn't.
"it doesn't work" is a division by zero statement. Please post the .tt relevant line(s).
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
othoma
Znuny newbie
Posts: 25
Joined: 04 May 2015, 11:45
Znuny Version: 4.0.6

Re: Ticket background color in dashboard depending on the AGE, not Priority

Post by othoma »

Hello,

I changed my mind about the configuration. So it's not relevant anymore. Thank you for your answers that helped me finding a solution.

In fact, I came back to priorities as you suggested in your first answers.

It was worth getting back to previous configuration. It was less time consuming for me.

Thanks.
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Re: [CLOSED] Ticket background color in dashboard depending on the AGE, not Priority

Post by pradeepspa »

othoma wrote:Hi there,

After crawling the forum I did find solutions to color the background of a ticket depending on the priority, but I'm looking to change the color depending on the age of the ticket.

So basically, if my process ticket is older than 15 minutes, color it in red.

I don't want to escalate the ticket, I just want to remind the agent that the process is taking more time than expected and need attention without sending mail or sms notification.

The delay should be different according the process.

So,
process A --> red after 15 minutes
process B --> red after 30 minutes
process c --> red after 1 day

Thanks a lot for your answers.

Have a nice week-end.


Hi,

I am trying to apply background color based on priority. It would be heloful if you share the procedure you did to achieve the same. I am using OTRS 5s. Thanks in advance.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: [CLOSED] Ticket background color in dashboard depending on the AGE, not Priority

Post by reneeb »

Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
pradeepspa
Znuny newbie
Posts: 68
Joined: 06 May 2016, 14:03
Znuny Version: 3.0.5
Real Name: Pradeep

Re: [CLOSED] Ticket background color in dashboard depending on the AGE, not Priority

Post by pradeepspa »

Thank you.
Post Reply