Hi guys,
My OTRS agents are brazilians, so they choose "Português - Brasileiro" (pt_BR) at Personal preferences.
The file pt_BR.pm defines the date format as '%D/%M/%Y %T', which is right.
Some notifications have date fields (ex.: <OTRS_TICKET_SolutionTimeDestinationDate>). But when the notification is generated, any date values are formated using '%Y-%M-%D %T' instead.
Is this a [lack of] feature or a bug?
Any ideas to generate the notification using the agent language?
Thanks in advance!
Wrong notificaton date format
Moderator: crythias
-
- Znuny expert
- Posts: 167
- Joined: 26 Nov 2014, 20:34
- Znuny Version: 6.3.4
- Real Name: Samuel Casimiro
- Company: Câmara dos Deputados
- Contact:
Wrong notificaton date format
Samuel
Znuny 6.3.4 | OTRS 5.0.17
OS: Debian 11 | CentOS 6.5
Database: Postgres | Oracle 12.1
Number of agents: 450 | Number of customers: 20000 | Number of CIs: 30000
Znuny 6.3.4 | OTRS 5.0.17
OS: Debian 11 | CentOS 6.5
Database: Postgres | Oracle 12.1
Number of agents: 450 | Number of customers: 20000 | Number of CIs: 30000
Re: Wrong notificaton date format
Hi,
Not sure, but have you tried creating the notifications also in pt-BR at "index.pl?Action=AdminNotificationEvent"
The default only has en-US notifications so maybe that also fetches the english date format.
Not sure, but have you tried creating the notifications also in pt-BR at "index.pl?Action=AdminNotificationEvent"
The default only has en-US notifications so maybe that also fetches the english date format.
-
- Znuny expert
- Posts: 167
- Joined: 26 Nov 2014, 20:34
- Znuny Version: 6.3.4
- Real Name: Samuel Casimiro
- Company: Câmara dos Deputados
- Contact:
Re: Wrong notificaton date format
Hi,
Yes. The notification is in pt_BR.
Thanks.
Yes. The notification is in pt_BR.
Thanks.
Samuel
Znuny 6.3.4 | OTRS 5.0.17
OS: Debian 11 | CentOS 6.5
Database: Postgres | Oracle 12.1
Number of agents: 450 | Number of customers: 20000 | Number of CIs: 30000
Znuny 6.3.4 | OTRS 5.0.17
OS: Debian 11 | CentOS 6.5
Database: Postgres | Oracle 12.1
Number of agents: 450 | Number of customers: 20000 | Number of CIs: 30000
Re: Wrong notificaton date format
When searching OTRS's github for "%Y-%M-%D %T" it returns only one result and that's on the en_CA.pm file which I don't think is the actual issue.
Still, I did some further searching (using your example tag <OTRS_TICKET_SolutionTimeDestinationDate> as base) and found that the notification tags <OTRS_TICKET_*> are basically getting the parameters from the TicketGet method which in turn get's all it's escalation parameters from the TicketEscalationDateCalculation method.
That method uses the DateTime module to output its result string.
Finally, it's this DateTime::toString() method that's outputting the dates in the following format: '%Y-%m-%d %H:%M:%S' which I assume is exactly what you're getting.
So, in conclusion, I guess this is either a missing feature or maybe it's actually like this by design as (at least) that escalation parameter doesn't appear to be getting converted to any of the date formats available on the language files.
Disclaimer: I'm not connected with OTRS development in any way. I just did some code digging so it's possible that I missed something.
Maybe post on bugs.otrs.org to get some feedback from the developers.
Boa sorte
Still, I did some further searching (using your example tag <OTRS_TICKET_SolutionTimeDestinationDate> as base) and found that the notification tags <OTRS_TICKET_*> are basically getting the parameters from the TicketGet method which in turn get's all it's escalation parameters from the TicketEscalationDateCalculation method.
That method uses the DateTime module to output its result string.
Finally, it's this DateTime::toString() method that's outputting the dates in the following format: '%Y-%m-%d %H:%M:%S' which I assume is exactly what you're getting.
So, in conclusion, I guess this is either a missing feature or maybe it's actually like this by design as (at least) that escalation parameter doesn't appear to be getting converted to any of the date formats available on the language files.
Disclaimer: I'm not connected with OTRS development in any way. I just did some code digging so it's possible that I missed something.
Maybe post on bugs.otrs.org to get some feedback from the developers.
Boa sorte
Last edited by lido on 31 Jan 2018, 17:10, edited 1 time in total.
-
- Znuny expert
- Posts: 167
- Joined: 26 Nov 2014, 20:34
- Znuny Version: 6.3.4
- Real Name: Samuel Casimiro
- Company: Câmara dos Deputados
- Contact:
Re: Wrong notificaton date format
Thanks lido, I think you're right!
Reported a bug at bug.otrs.org:
https://bugs.otrs.org/show_bug.cgi?id=13602
Inté!
Reported a bug at bug.otrs.org:
https://bugs.otrs.org/show_bug.cgi?id=13602
Inté!
Samuel
Znuny 6.3.4 | OTRS 5.0.17
OS: Debian 11 | CentOS 6.5
Database: Postgres | Oracle 12.1
Number of agents: 450 | Number of customers: 20000 | Number of CIs: 30000
Znuny 6.3.4 | OTRS 5.0.17
OS: Debian 11 | CentOS 6.5
Database: Postgres | Oracle 12.1
Number of agents: 450 | Number of customers: 20000 | Number of CIs: 30000
-
- Znuny expert
- Posts: 167
- Joined: 26 Nov 2014, 20:34
- Znuny Version: 6.3.4
- Real Name: Samuel Casimiro
- Company: Câmara dos Deputados
- Contact:
Re: Wrong notificaton date format
Upgraded to 5.0.26 and looks like the problem was solved.
Thanks!
Thanks!
Samuel
Znuny 6.3.4 | OTRS 5.0.17
OS: Debian 11 | CentOS 6.5
Database: Postgres | Oracle 12.1
Number of agents: 450 | Number of customers: 20000 | Number of CIs: 30000
Znuny 6.3.4 | OTRS 5.0.17
OS: Debian 11 | CentOS 6.5
Database: Postgres | Oracle 12.1
Number of agents: 450 | Number of customers: 20000 | Number of CIs: 30000