Is there any way to get a PriorityID corresponding to a Priority such that whatever Admin sets as PriorityDefault, it's corresponding ID should be saved to the database.
I'm trying to modify that in CustomerTicketMessage.pm file, but not getting any idea of it...
OTRS 2.4.9
Debian
Thanks !
[SOLVED]Get PriorityID for a particular Priority
Moderator: crythias
[SOLVED]Get PriorityID for a particular Priority
Last edited by adt on 20 Aug 2012, 13:23, edited 1 time in total.
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Get PriorityID for a particular Priority
http://dev.otrs.org/2.4/Kernel/System/Priority.html
http://dev.otrs.org
Code: Select all
my $PriorityID = $PriorityObject->PriorityLookup(
Priority => '3 normal',
);
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
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Get PriorityID for a particular Priority
Why are you modifying CustomerTicket for this purpose?
Do you want all tickets to have this priority and no other priority? Either hide priority in sysconfig or directly in the .dtl
Do you want all tickets to have this priority by default? Change it in Sysconfig.adt wrote: whatever Admin sets as PriorityDefault, it's corresponding ID should be saved to the database
Do you want all tickets to have this priority and no other priority? Either hide priority in sysconfig or directly in the .dtl
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: Get PriorityID for a particular Priority
Hi crythias,
the problem was with PriorityID.
In my Customer Interface Priority is not shown to customers to be filled, instead i'm using Default priority to be inserted.But if i select Default Priority to be 2 low or 5 very high or any priority; it was always getting stored as 3 normal and id was 3 in my DB.I wanted to get rid of this problem such that if Admin has set any priority, the PriorityID should be saved corresponding to this itself.
The line
wasn't present in my code then after this
i am supposed to write the code to fetch the PriorityID, and i got that working by following code>>>
and
while inserting it to DB. Thanks for your reply crythias.
the problem was with PriorityID.
In my Customer Interface Priority is not shown to customers to be filled, instead i'm using Default priority to be inserted.But if i select Default Priority to be 2 low or 5 very high or any priority; it was always getting stored as 3 normal and id was 3 in my DB.I wanted to get rid of this problem such that if Admin has set any priority, the PriorityID should be saved corresponding to this itself.
The line
Code: Select all
$Self ->{PriorityObject} = Kernel::System::Priority->new(%Param);
i am supposed to write the code to fetch the PriorityID, and i got that working by following code>>>
Code: Select all
my $fetchprioid = $Self->{PriorityObject}->PriorityLookup(Priority => $Self->{Config}->{PriorityDefault});
Code: Select all
PriorityID => $fetchprioid,
while inserting it to DB. Thanks for your reply crythias.
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: [SOLVED]Get PriorityID for a particular Priority
If you know what you're trying to accomplish, why not put the other value as default instead of modifying code to translate it? You can get the value you seek by hovering over the link in the Priority list.
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