how i can change Priority formate in TicketViewZoom

Moderator: crythias

Post Reply
grathi
Znuny newbie
Posts: 38
Joined: 14 Jan 2015, 10:21
Znuny Version: 2.3.4

how i can change Priority formate in TicketViewZoom

Post by grathi »

I wish to change the formate of Priority in TicketViewZoom
right now it Shows Like "Priority : 3 Low"
But instead Of it I want Like "Priority : Low" This Way
So how I can change it


Thanks
Gaurav
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: how i can change Priority formate in TicketViewZoom

Post by reneeb »

Change it in the translation file. Create a new en_grathi.pm (instead of "en" the language code you need) and add your custom translations there. See other language files for templates.
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
grathi
Znuny newbie
Posts: 38
Joined: 14 Jan 2015, 10:21
Znuny Version: 2.3.4

Re: how i can change Priority formate in TicketViewZoom

Post by grathi »

sorry I din't find translation file
can you please explain steps


Thanks
Gaurav
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: how i can change Priority formate in TicketViewZoom

Post by reneeb »

Place this as en_grathi.pm in Kernel/Language:

Code: Select all

package Kernel::Language::en_grathi;

use strict;
use warnings;

our $VERSION = '0.01';

sub Data {
    my $Self = shift;

    my $Lang = $Self->{Translation};

    return if ref $Lang ne 'HASH';

    $Lang->{"2 low"} = "low";
    
    return 1;
}

1;
Just add another

Code: Select all

    $Lang->{"2 low"} = "low";
line with the appropriate values if you need other translations.
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
grathi
Znuny newbie
Posts: 38
Joined: 14 Jan 2015, 10:21
Znuny Version: 2.3.4

Re: how i can change Priority formate in TicketViewZoom

Post by grathi »

I have done it .
but how I can use this module .
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: how i can change Priority formate in TicketViewZoom

Post by reneeb »

OTRS uses that module automatically when the user has selected "en" as the language to use...
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
grathi
Znuny newbie
Posts: 38
Joined: 14 Jan 2015, 10:21
Znuny Version: 2.3.4

Re: how i can change Priority formate in TicketViewZoom

Post by grathi »

Thanks
Its works but it also changed in CustomerTicketMessage.pm .
while I wish to change it only in CustomerTicketZoom.pm .
I don't want to show ID of priority only value should be in CustomerTicketZoom.pm
Please help me for it
Thanks
Gaurav
yuri0001
Znuny superhero
Posts: 631
Joined: 17 Mar 2011, 14:40
Znuny Version: 5.0.6
Real Name: Yuri Kolesnikov
Location: Russia

Re: how i can change Priority formate in TicketViewZoom

Post by yuri0001 »

To my mind, your idea to change the name of priority is wrong becouse the first number in name is to sort them in drop-down lists. If you want to do it only to display in some screens? The translation file do this change for all screens.
Best regards Yuri Kolesnikov
OTRS 5.0.14, ITSM 5.0.14
SUSE 13.2, MariaDB 10.0.22(productive)
OTRS 5.0.14, ITSM 5.0.14(test)
grathi
Znuny newbie
Posts: 38
Joined: 14 Jan 2015, 10:21
Znuny Version: 2.3.4

Re: how i can change Priority formate in TicketViewZoom

Post by grathi »

Hi yuri0001

yes I agree with you but dropdownlist not present in CustomerTicketZoom.pm , here it just display which we had selected in customerTicketMessage.pm
So I dont think so there is nay need to display the numeric value in front of Priority , Only required string.
If I am wrong please correct me
Thanks
Gaurav
yuri0001
Znuny superhero
Posts: 631
Joined: 17 Mar 2011, 14:40
Znuny Version: 5.0.6
Real Name: Yuri Kolesnikov
Location: Russia

Re: how i can change Priority formate in TicketViewZoom

Post by yuri0001 »

Sorry my bad English!
I mean "3 normal" or "4 high". It's not ID - it is the name of Priority. In dropdown lists they sorted by first symbol. If you delete first number - they where mixed. :?
Best regards Yuri Kolesnikov
OTRS 5.0.14, ITSM 5.0.14
SUSE 13.2, MariaDB 10.0.22(productive)
OTRS 5.0.14, ITSM 5.0.14(test)
Post Reply