ACL to make available certain TicketFreeText based on queue
Moderator: crythias
ACL to make available certain TicketFreeText based on queue
I posted this in the mail list, but I'm posting it here too, just in case someone who know the answer happens to be here.
Does anybody know the proper ACL syntax to be able to completely enable/disable TicketFreeText based on Queues? I've tried different ways and their not achieving what I need. Here's what I'm trying to achieve:
I have two customers that must supply different additional info with new tickets, with the only common additional info being contact phone number.
The examples provided in the OTRS FAQ only change what options are available in the TicketFreeKey drop-down. So, for instance, the following ACL would simply remove "Other" from the TicketFreeKey2 selection, but would not remove TicketFreeKey2 entirely, and commenting out TicketFreeText2 => ['Other'] and specifying only TicketFreeKey2 => ['Choices'] has no effect:
$Self->{TicketAcl}->{'ACL-Name-Test'} = {
# match properties
Properties => {
# current ticket match properties
Ticket => {
Queue => ['ABCCompany'],
},
Frontend => {
Action => ['CustomerTicketMessage'],
},
},
# return possible options (black list)
PossibleNot => {
Ticket => {
TicketFreeKey2 => ['Choices'],
TicketFreeText2 => ['Other'],
},
},
};
The other alternative I tried, which also does not work, is the following ACL. That "$Self->" entry under "Possible" acts globally and does not obey the matching criteria and executes regardless of any ACL criteria:
$Self->{TicketAcl}->{'ACL-Name-Test'} = {
# match properties
Properties => {
# current ticket match properties
Ticket => {
Queue => ['ABCCompany'],
},
Frontend => {
Action => ['CustomerTicketMessage'],
},
},
# return possible options (white list)
Possible => {
$Self->{'Ticket::Frontend::CustomerTicketMessage'}->{'TicketFreeText'} = {
'1' => '1',
'10' => '0',
'11' => '0',
'12' => '0',
'13' => '0',
'14' => '0',
'15' => '0',
'16' => '0',
'2' => 0,
'3' => '0',
'4' => '0',
'5' => '0',
'6' => '0',
'7' => '0',
'8' => '0',
'9' => '0',
},
},
};
Someone on the Forums posted an example for hiding TicketFreeText using CSS; however, that is limited, as I need it to operate on queues; therefore I need an ACL I can place in Kernel/Config.pm.
Any pointers would be greatly appreciated.
Thanks
Does anybody know the proper ACL syntax to be able to completely enable/disable TicketFreeText based on Queues? I've tried different ways and their not achieving what I need. Here's what I'm trying to achieve:
I have two customers that must supply different additional info with new tickets, with the only common additional info being contact phone number.
The examples provided in the OTRS FAQ only change what options are available in the TicketFreeKey drop-down. So, for instance, the following ACL would simply remove "Other" from the TicketFreeKey2 selection, but would not remove TicketFreeKey2 entirely, and commenting out TicketFreeText2 => ['Other'] and specifying only TicketFreeKey2 => ['Choices'] has no effect:
$Self->{TicketAcl}->{'ACL-Name-Test'} = {
# match properties
Properties => {
# current ticket match properties
Ticket => {
Queue => ['ABCCompany'],
},
Frontend => {
Action => ['CustomerTicketMessage'],
},
},
# return possible options (black list)
PossibleNot => {
Ticket => {
TicketFreeKey2 => ['Choices'],
TicketFreeText2 => ['Other'],
},
},
};
The other alternative I tried, which also does not work, is the following ACL. That "$Self->" entry under "Possible" acts globally and does not obey the matching criteria and executes regardless of any ACL criteria:
$Self->{TicketAcl}->{'ACL-Name-Test'} = {
# match properties
Properties => {
# current ticket match properties
Ticket => {
Queue => ['ABCCompany'],
},
Frontend => {
Action => ['CustomerTicketMessage'],
},
},
# return possible options (white list)
Possible => {
$Self->{'Ticket::Frontend::CustomerTicketMessage'}->{'TicketFreeText'} = {
'1' => '1',
'10' => '0',
'11' => '0',
'12' => '0',
'13' => '0',
'14' => '0',
'15' => '0',
'16' => '0',
'2' => 0,
'3' => '0',
'4' => '0',
'5' => '0',
'6' => '0',
'7' => '0',
'8' => '0',
'9' => '0',
},
},
};
Someone on the Forums posted an example for hiding TicketFreeText using CSS; however, that is limited, as I need it to operate on queues; therefore I need an ACL I can place in Kernel/Config.pm.
Any pointers would be greatly appreciated.
Thanks
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: ACL to make available certain TicketFreeText based on qu
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: ACL to make available certain TicketFreeText based on qu
Hi crythias,
I already saw that, which is why I stated that the CSS solution is not the appropriate solution for what I need.
Thanks
I already saw that, which is why I stated that the CSS solution is not the appropriate solution for what I need.
Thanks
Re: ACL to make available certain TicketFreeText based on qu
Hi qwerty
I currently show / hide various things based on state and queues (and I am sure any other variable with some changes) for agents using CSS.
You can easily show / hide what you need based on Queues
Have a look at this: http://forums.otrs.org/viewtopic.php?f=62&t=11461
I don't have access to my server at the moment, but look at the link so long and I will post examples a bit later today.
You will need to make some changes, as I am doing it for agents and you are looking at doing it for customers.
I currently show / hide various things based on state and queues (and I am sure any other variable with some changes) for agents using CSS.
You can easily show / hide what you need based on Queues
Have a look at this: http://forums.otrs.org/viewtopic.php?f=62&t=11461
I don't have access to my server at the moment, but look at the link so long and I will post examples a bit later today.
You will need to make some changes, as I am doing it for agents and you are looking at doing it for customers.
Jakez
--------------
OTRS 3.0.9
ITSM 3.0.4
--------------
OTRS 3.0.9
ITSM 3.0.4
Re: ACL to make available certain TicketFreeText based on qu
Hmm... OK. Thank you, jakezp, I'll have a look at the thread you linked to, and try and implement this weekend, when I have more time.
Thank you crythias and jakezp, for answering my query.
Thank you crythias and jakezp, for answering my query.
Re: ACL to make available certain TicketFreeText based on qu
Hi again qwerty,
Ok here is how I do it...
I know there is a better way to define how / which selections I want to make, but I have not had time to neaten it up and this works for now.
I added the following to the bottom of otrs/Kernel/Output/HTML/Standard/AgentTicketActionCommon.dtl:
I wanted to hide the Pending Time Selection unless it is a specific queue.
So additional thins I had to do in the same file:
I basically added the id's above... In 'label' I added 'pending_date_label' and div id I added 'pending_date'.
Now, this is the part that's not so neat (and I know there is a better way to define this... but here goes...
In /otrs/Kernel/Output/HTML/Standard/AgentTicketNote.dtl, I added:
It was added to AgentTicketNote.dtl as I only wanted these actions to apply when the agents add a new note...
I hope it helps you in using CSS to hide the stuff based on the Queue
Ok here is how I do it...
I know there is a better way to define how / which selections I want to make, but I have not had time to neaten it up and this works for now.
I added the following to the bottom of otrs/Kernel/Output/HTML/Standard/AgentTicketActionCommon.dtl:
Code: Select all
#Layers
<!--dtl:js_on_document_complete-->
<script type="text/javascript">//<![CDATA[
Core.Agent.TicketAction.Init();
//---- Above is existing code - below new
function nonetext() {
document.getElementById('TicketFreeText1').style.display = 'none';
document.getElementById('LabelTicketFreeText1').style.display = 'none';
document.getElementById('TicketFreeText3').style.display = 'none';
document.getElementById('LabelTicketFreeText3').style.display = 'none';
}
switch ($('#Dest').val() ) { //this is where the queue is relevant (Dest = Queue)
case "11": // StateID
# document.compose.RichText.value = "First state"; //Debug
nonetext();
document.getElementById('TicketFreeText3').style.display = 'block';
document.getElementById('LabelTicketFreeText3').style.display = 'block';
break;
case "14": // StateID
# document.compose.RichText.value = "Second state"; //Debug
nonetext();
document.getElementById('TicketFreeText1').style.display = 'block';
document.getElementById('LabelTicketFreeText1').style.display = 'block';
break;
default:
# document.compose.RichText.value = $('#Dest').val(); // Debug - Print current state
nonetext();
}
function nonetext2() {
document.getElementById('pending_date_label').style.display = 'none';
document.getElementById('pending_date').style.display = 'none';
}
switch ($('#Dest2').val() ) { //this is where the queue is relevant (Dest = Queue)
case "17": // Queue selection
# document.compose.RichText.value = "Correct queue"; //Debug
nonetext2();
document.getElementById('pending_label').style.display = 'block';
document.getElementById('pending_date_label').style.display = 'block';
break;
default:
# document.compose.RichText.value = $('#Dest2').val(); //Debug - Print QueueID
nonetext2();
}
//----- end code - below is existing
//]]></script>
<!--dtl:js_on_document_complete-->
So additional thins I had to do in the same file:
Code: Select all
<!-- dtl:block:StatePending -->
<label id="pending_date_label">$Text{"Pending date"}:</label>
<div id="pending_date" class="Field">
$Data{"DateString"}
<div id="DayServerError" class="TooltipErrorMessage"><p>$Text{"Date invalid!"}</p></div>
<div id="HourServerError" class="TooltipErrorMessage"><p>$Text{"Date invalid!"}</p></div>
</div>
<div class="Clear"></div>
<!-- dtl:block:StatePending -->
Now, this is the part that's not so neat (and I know there is a better way to define this... but here goes...
In /otrs/Kernel/Output/HTML/Standard/AgentTicketNote.dtl, I added:
Code: Select all
<input id="Dest" type="hidden" value="$Data{"StateID"}" />
<input id="Dest2" type="hidden" value="$Data{"QueueID"}" />
I hope it helps you in using CSS to hide the stuff based on the Queue
Jakez
--------------
OTRS 3.0.9
ITSM 3.0.4
--------------
OTRS 3.0.9
ITSM 3.0.4
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: ACL to make available certain TicketFreeText based on qu
I don't know why it's not the appropriate situation, though. Can you explain further?qwerty wrote:Hi crythias,
I already saw that, which is why I stated that the CSS solution is not the appropriate solution for what I need.
Thanks
You said, "I need it to be based upon queues" and the CSS is TicketFreeText based upon queues.
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: ACL to make available certain TicketFreeText based on qu
Thank you very much, jakezp, for your explanation. That should really help me out when I work on it this weekend.
Re: ACL to make available certain TicketFreeText based on qu
I don't remember exactly what was stated about the difficulty with using CSS, and I can't find the page where I read the statement. Nonetheless, I will be giving the various CSS suggestions a try. Thanks.crythias wrote:I don't know why it's not the appropriate situation, though. Can you explain further?
Re: ACL to make available certain TicketFreeText based on qu
Is this possible to do for agents as opposed to customers
OTRS 3.0.7 installed on Linux. Agents access it, customers emails us.