Modify the Statistics
Moderator: crythias
Modify the Statistics
Hi All,
In OTRS, I created my own stats, but I also want to change the way how can they appear in the exported file.
For Example, in CSV file, I show as below:
Number SR# Title Created Close Time State
1 1090214 Network was looped 2/9/2014 20:30 2/9/2014 20:30 closed successful
2 1230114 Mr.Hung can not insert column in Excel file 1/23/2014 13:27 1/23/2014 13:37 closed successful
3 2220114 Ms.Hanh can not use the https://nhantokhai.gdt.gov.vn website 1/22/2014 13:58 1/24/2014 10:03 closed successful
I want to change the Created by Created Day, Title by Subject....some thing like that.
Or in the .pdf file, I also want to change the appearance of it.
Could you please show me where can I modify the function as I mentioned above?
Thanks for you support in advance and look forward to hearing from all you soon.
Best regards,
Hong Phuc
In OTRS, I created my own stats, but I also want to change the way how can they appear in the exported file.
For Example, in CSV file, I show as below:
Number SR# Title Created Close Time State
1 1090214 Network was looped 2/9/2014 20:30 2/9/2014 20:30 closed successful
2 1230114 Mr.Hung can not insert column in Excel file 1/23/2014 13:27 1/23/2014 13:37 closed successful
3 2220114 Ms.Hanh can not use the https://nhantokhai.gdt.gov.vn website 1/22/2014 13:58 1/24/2014 10:03 closed successful
I want to change the Created by Created Day, Title by Subject....some thing like that.
Or in the .pdf file, I also want to change the appearance of it.
Could you please show me where can I modify the function as I mentioned above?
Thanks for you support in advance and look forward to hearing from all you soon.
Best regards,
Hong Phuc
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Modify the Statistics
You might try a custom translation: viewtopic.php?f=61&t=12290#p47838
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
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
Re: Modify the Statistics
Thanks for your reply, Crythias.
I already try the tips as you give me but it not as I expected. Could you please help more, please?


For clear, please see the pictures below, I want to change the re marked area, could you please show me where can I access to change it.
Thanks again!
Best regards,
Hong Phuc
I already try the tips as you give me but it not as I expected. Could you please help more, please?
For clear, please see the pictures below, I want to change the re marked area, could you please show me where can I access to change it.
Thanks again!
Best regards,
Hong Phuc
Re: Modify the Statistics
Sorry the imange as below:


Please help me with this. Thanks a lot!


Please help me with this. Thanks a lot!
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Modify the Statistics
It would be more helpful to have information about your Agent Preference Language Settings, the file contents and filename that you created for translation.
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
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
Re: Modify the Statistics
Sorry but how can I check the Agent Preference Language Settings?
I do the same your example below.
The file name is en_Custom.pm and the content as below:
Bu when create start in Statistics, it still the same, nothing change 
I do the same your example below.
The file name is en_Custom.pm and the content as below:
Code: Select all
package Kernel::Language::en_Custom;
use strict;
use warnings;
sub Data {
my $Self = shift;
# $$START$$
# own translations
#$Self->{Translation}->{'Lock'} = 'Lala';
#$Self->{Translation}->{'Unlock'} = 'Lulu';
# or a other syntax would be
$Self->{Translation} = {
%{$Self->{Translation}},
# # own translations
'Created' => 'Create Time',
'CustomerUserID' => 'Customer'
};
# $$STOP$$
}

-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Modify the Statistics
Click your name within OTRS.hongphuc wrote:Sorry but how can I check the Agent Preference Language Settings?
What language is assigned to your name?
That's what needs a Custom.
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
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
Re: Modify the Statistics
My language is English (United States)
So what do I need to check for the next step?
So what do I need to check for the next step?
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Modify the Statistics
It should work... Changing your language does translate:
And you missed the "1;" at the end of your file, but it does work:You do not have the required permissions to view the files attached to this post.
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
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
Re: Modify the Statistics
Hic, still not work. It can not change anything. Do I need to check somewhere else?
How about pdf file? I also modify in en_Custom.pm file? Right?
How about pdf file? I also modify in en_Custom.pm file? Right?
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Modify the Statistics
Bummer. It should. It does. I used your code.hongphuc wrote:Hic, still not work.
'Created' => 'Create Time',
The screenshot I showed you says "Create Time"
before you reply "It doesn't work", you need to SPECIFY what doesn't work, and tell us how to reproduce what doesn't work.
Show what you changed.
Tell us what you expect to happen.
Show us what is happening.
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
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
Re: Modify the Statistics
I do these step:
- Firstly, I change the file name xx_Custom.pm to en_Custom.pm
- Then change the content inside like this one:
- I want it appear like your screenshot (the second screenshot) but mine, it doesn't change anything.
- I try to log out then log in again, add new stat but it still the same the picture as I show you before.
Do I made wrong any step?
- Firstly, I change the file name xx_Custom.pm to en_Custom.pm
- Then change the content inside like this one:
Code: Select all
package Kernel::Language::en_Custom;
use strict;
use warnings;
sub Data {
my $Self = shift;
# $$START$$
# own translations
#$Self->{Translation}->{'Lock'} = 'Lala';
#$Self->{Translation}->{'Unlock'} = 'Lulu';
# or a other syntax would be
$Self->{Translation} = {
%{$Self->{Translation}},
# own translations
'Created' => 'Create Time',
'CustomerUserID' => 'Customer',
};
# $$STOP$$
}
1;
- I try to log out then log in again, add new stat but it still the same the picture as I show you before.
Do I made wrong any step?
Re: Modify the Statistics
Hi crythias,
Now, I can change the custom file as expected after restart my server. Thanks for your help.
May I asked about .pdf file?

As an example below, I want to:
- Replace the Stat#10011 by another phrase.
- Also want to change the width, height, color... of the row in the file
Can I do that? And where can I modify these function?
Please give me advice. Thanks a lot!
Now, I can change the custom file as expected after restart my server. Thanks for your help.
May I asked about .pdf file?
As an example below, I want to:
- Replace the Stat#10011 by another phrase.
- Also want to change the width, height, color... of the row in the file
Can I do that? And where can I modify these function?
Please give me advice. Thanks a lot!
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Modify the Statistics
'Stat#' Is custom translatable
Widths, height, etc ... I think you may want to browse Kernel/Modules/AgentStats.pm but I don't really have good information on layout customization at this point.
Widths, height, etc ... I think you may want to browse Kernel/Modules/AgentStats.pm but I don't really have good information on layout customization at this point.
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
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
Re: Modify the Statistics
Thanks Crythias for all your help.
I already try to modify the file Kernel/Modules/AgentStats.pm and get some expected results.
Thanks again!
I already try to modify the file Kernel/Modules/AgentStats.pm and get some expected results.
Thanks again!
