Hi everyone,
I need help to create an exclusive filter inside the file AgentTicketResponsibleView.pm.
These are my changes:
# define filter
my %Filters = (
All => {
Name => Translatable('Responsible'),
Prio => 1000,
Search => {
StateType => 'Open',
ResponsibleIDs => [ $Self->{UserID} ],
OrderBy => $OrderBy,
SortBy => $SortByS,
UserID => 1,
Permission => 'ro',
},
},
Owner => {
Name => Translatable('Owner'),
Prio => 1001,
Search => {
StateType => 'Open',
OwnerIDs => [ $Self->{UserID} ],
OrderBy => $OrderBy,
SortBy => $SortByS,
UserID => 1,
Permission => 'ro',
},
},
In the "ticket responsible window" I can see now one new filter called "Owner" where there are all the tickets owned by the agent.
I'd like to have a filter called "Owner and NOT Responsbile".
I suppose this is the code to modify:
OwnerIDs => [ $Self->{UserID} ],
but I have not idea how to add filter " and NOTResponsbile".
I tried to write this filter but it does'nt work:
Owner => {
Name => Translatable('Owner'),
Prio => 1001,
Search => {
StateType => 'Open',
OwnerIDs => [ $Self->{UserID} ],
ResponsibleIDs != [ $Self->{UserID} ],
OrderBy => $OrderBy,
SortBy => $SortByS,
UserID => 1,
Permission => 'ro',
},
},
Any suggestion?
Need HELP to modify a filter in AgentTicketResponsibleView.pm
Moderator: crythias
-
- Znuny newbie
- Posts: 7
- Joined: 05 Apr 2018, 20:39
- Znuny Version: 6.0.x
- Real Name: Alessandro
Need HELP to modify a filter in AgentTicketResponsibleView.pm
OTRS 5.0.x, ITSM, Zuny4OTRS
CentOS 7
CentOS 7
-
- Znuny newbie
- Posts: 7
- Joined: 05 Apr 2018, 20:39
- Znuny Version: 6.0.x
- Real Name: Alessandro
Re: Need HELP to modify a filter in AgentTicketResponsibleView.pm
I think I'm close to the desired result (i need to edit the Label from "Responsible" to "All"):
This is my modded responsible view window: This is the Owner filter added to the same window: This is the modded counter function that I added on file "/opt/otrs/Kernel/Output/HTML/ToolBar/TicketResponsible.pm"
my $CountOwnerResponsible = $TicketObject->TicketSearch(
Result => 'COUNT',
StateType => 'Open',
ResponsibleIDs => [ $Self->{UserID} ],
OwnerIDs => [ $Self->{UserID} ],
UserID => 1,
Permission => 'ro',
);
$Count = $Count + $CountOwner - $CountOwnerResponsible;
So this number: it's the total number of agent tickets (owner only, responsible only and owner and responsible)
What I need is a single VIEW where the agents can see all their tickets or 3 separate views:
owner only
responsible only
owner and responsble
My agents have difficulties because they do not have a global and clear situation of the tickets in which they are involved. (it does not matter if as owner or as responsible)
I'm stuck here
Any suggestion please?
This is my modded responsible view window: This is the Owner filter added to the same window: This is the modded counter function that I added on file "/opt/otrs/Kernel/Output/HTML/ToolBar/TicketResponsible.pm"
my $CountOwnerResponsible = $TicketObject->TicketSearch(
Result => 'COUNT',
StateType => 'Open',
ResponsibleIDs => [ $Self->{UserID} ],
OwnerIDs => [ $Self->{UserID} ],
UserID => 1,
Permission => 'ro',
);
$Count = $Count + $CountOwner - $CountOwnerResponsible;
So this number: it's the total number of agent tickets (owner only, responsible only and owner and responsible)
What I need is a single VIEW where the agents can see all their tickets or 3 separate views:
owner only
responsible only
owner and responsble
My agents have difficulties because they do not have a global and clear situation of the tickets in which they are involved. (it does not matter if as owner or as responsible)
I'm stuck here
Any suggestion please?
You do not have the required permissions to view the files attached to this post.
OTRS 5.0.x, ITSM, Zuny4OTRS
CentOS 7
CentOS 7
-
- Znuny newbie
- Posts: 7
- Joined: 05 Apr 2018, 20:39
- Znuny Version: 6.0.x
- Real Name: Alessandro
Re: Need HELP to modify a filter in AgentTicketResponsibleView.pm
To modify the title from "My Responsible Tickets" to "My tickets":
edit file: ./Kernel/Modules/AgentTicketResponsibleView.pm and replace the string
TitleName => Translatable('My Responsible Tickets'),
with
TitleName => Translatable('My Tickets'),
Still not able to modify filters section to have the filters:
"owner only tickets" and "responsible only tickets"
edit file: ./Kernel/Modules/AgentTicketResponsibleView.pm and replace the string
TitleName => Translatable('My Responsible Tickets'),
with
TitleName => Translatable('My Tickets'),
Still not able to modify filters section to have the filters:
"owner only tickets" and "responsible only tickets"
OTRS 5.0.x, ITSM, Zuny4OTRS
CentOS 7
CentOS 7