Hide Dynamic Fields by queue

English! place to talk about development, programming and coding
Post Reply
cris12345
Znuny advanced
Posts: 105
Joined: 24 Feb 2017, 16:45
Znuny Version: 5.0.16.01
Real Name: Cristina Corrales
Company: -

Hide Dynamic Fields by queue

Post by cris12345 »

Hi,

I was checking others topics like this, about show/hide dynamic fields, but are related to all versions.

Is it a way to hide and show dynamic fields? that is not to modify the code.

I found in KIX4OTRS → Core::DynamicField the possiblity to hide fields:

Ticket::Acl::Module###991_DisabledDynamicFields
Ticket-ACLs to define shown or hidden dynamic fields in forms.

However in the "possible" section in the ACL I don't know how to configure it:

I have it like this:
Possible
Ticket
DyamicField
FieldsName to match

I'm not sure if I'm using this as it supposed to be. For example
I don't know if I have to use ticket or form

Any ideas?

Thanks

I'm using the version: otrs-5.0.14
tto
Znuny wizard
Posts: 315
Joined: 09 Jan 2007, 15:24
Znuny Version: OTRS 5.0.x
Real Name: Torsten
Company: c.a.p.e. IT GmbH
Location: Chemnitz
Contact:

Re: Hide Dynamic Fields by queue

Post by tto »

Hi there,

if you are using KIX4OTRS r8.x then don'T use this. Rather make an ACL with the following structure:

Code: Select all

Properties => 
    ...whatever you want to check as you know it from ACLs...
Possible => 
    Form => 
        "NameOfTheDynamicFieldToSetInvisible" eq '0'
        "NameOfAnotherDynamicFieldToSetInvisible" eq '0'
...that's more understandable than the SysConfig setting mentioned above (which is sort of deprecated).

regards, T.
--
KIX 17.x (fork of OTRS)
Professional KIX-, or OTRS-integration, development and consulting by c.a.p.e. IT - http://www.cape-it.de
For questions and hints regarding KIX(4OTRS) please go to https://forum.kixdesk.com/
Bei Fragen und Hinweisen zu KIX(4OTRS) bitte an https://forum.kixdesk.com/ wenden.
cris12345
Znuny advanced
Posts: 105
Joined: 24 Feb 2017, 16:45
Znuny Version: 5.0.16.01
Real Name: Cristina Corrales
Company: -

Re: Hide Dynamic Fields by queue

Post by cris12345 »

Hi,

Thanks for your answer. Greta, using an ACL is better for me.

However I have a question in order to use the equal to 0, is this syntax correct?

The way as is in the image didn't worked. I'm not sure if is beacause I use "exact macth" to 0 or if under the queue I need write Queue_name instead just queue again
ACLQuestion.png
You do not have the required permissions to view the files attached to this post.
tto
Znuny wizard
Posts: 315
Joined: 09 Jan 2007, 15:24
Znuny Version: OTRS 5.0.x
Real Name: Torsten
Company: c.a.p.e. IT GmbH
Location: Chemnitz
Contact:

Re: Hide Dynamic Fields by queue

Post by tto »

cris12345 wrote:Hi,

Thanks for your answer. Greta, using an ACL is better for me.

However I have a question in order to use the equal to 0, is this syntax correct?

The way as is in the image didn't worked. I'm not sure if is beacause I use "exact macth" to 0 or if under the queue I need write Queue_name instead just queue again
ACLQuestion.png
Your configuration should work if you do not wirte "DynamicField_ResolutionCategory" but "ResolutionCategory" (without the "DynamicField_").

regards, T.
--
KIX 17.x (fork of OTRS)
Professional KIX-, or OTRS-integration, development and consulting by c.a.p.e. IT - http://www.cape-it.de
For questions and hints regarding KIX(4OTRS) please go to https://forum.kixdesk.com/
Bei Fragen und Hinweisen zu KIX(4OTRS) bitte an https://forum.kixdesk.com/ wenden.
cris12345
Znuny advanced
Posts: 105
Joined: 24 Feb 2017, 16:45
Znuny Version: 5.0.16.01
Real Name: Cristina Corrales
Company: -

Re: Hide Dynamic Fields by queue

Post by cris12345 »

I used it also ticket instead Form and I still seeing the dynamic field in Dynamic Fields tab and also Ticket Core Data tab
tto
Znuny wizard
Posts: 315
Joined: 09 Jan 2007, 15:24
Znuny Version: OTRS 5.0.x
Real Name: Torsten
Company: c.a.p.e. IT GmbH
Location: Chemnitz
Contact:

Re: Hide Dynamic Fields by queue

Post by tto »

cris12345 wrote:I used it also ticket instead Form and I still seeing the dynamic field in Dynamic Fields tab and also Ticket Core Data tab
You didn't check this as system user, did you?

Also take care, that there is no other ACL screwing up your "hide DF ACL rule". The following works fine under KIX4OTRS 8.0. As the name tells, the ACL hides these two DF when the ticket is moved into queue "Postmaster". The fields are shown in any other queue. This affects any Actions/masks as there are no other Property-checks.
s001.png
You may also checkout disabling following SysConfig settings as they aren't necessary in OTRS anymore (since PossibleAdd has been added) and are possibly causing some confusion when combining multiple ACLs:
  • * Ticket::ACL-PossibleActionSubsumption
    * Ticket::ACL-PossiblePropertiesSubsumption
regards, T.
You do not have the required permissions to view the files attached to this post.
--
KIX 17.x (fork of OTRS)
Professional KIX-, or OTRS-integration, development and consulting by c.a.p.e. IT - http://www.cape-it.de
For questions and hints regarding KIX(4OTRS) please go to https://forum.kixdesk.com/
Bei Fragen und Hinweisen zu KIX(4OTRS) bitte an https://forum.kixdesk.com/ wenden.
tto
Znuny wizard
Posts: 315
Joined: 09 Jan 2007, 15:24
Znuny Version: OTRS 5.0.x
Real Name: Torsten
Company: c.a.p.e. IT GmbH
Location: Chemnitz
Contact:

Re: Hide Dynamic Fields by queue

Post by tto »

cris12345 wrote:I used it also ticket instead Form and I still seeing the dynamic field in Dynamic Fields tab and also Ticket Core Data tab
oh wait now I see what's wrong with your ACL - your property check is incorrect:

IS

Code: Select all

Property => Queue => Queue eq 'Utilities'
SHOULD BE

Code: Select all

Property => Queue => Name eq 'Utilities'
...or...

Code: Select all

Property => Ticket => Queue eq 'Utilities'
more graphically (wher "Postmaster" is your "Utilities"):
s001.png
regards, T.
You do not have the required permissions to view the files attached to this post.
--
KIX 17.x (fork of OTRS)
Professional KIX-, or OTRS-integration, development and consulting by c.a.p.e. IT - http://www.cape-it.de
For questions and hints regarding KIX(4OTRS) please go to https://forum.kixdesk.com/
Bei Fragen und Hinweisen zu KIX(4OTRS) bitte an https://forum.kixdesk.com/ wenden.
kongyong92
Znuny newbie
Posts: 43
Joined: 15 Sep 2017, 11:40
Znuny Version: OTRS v5.0.10
Real Name: Kong-Yong
Company: Rhenus Logistics

Re: Hide Dynamic Fields by queue

Post by kongyong92 »

Hi All,

I am trying to achieve the same but was not able to find the 'Form' options though.

Any reasons why?

I am only able to see under 'Possible', the following values:
1. Action
2. ActivityDialog
3. Process
4. Ticket

My main objective is to restrict the dynamic fields based on the respective queues.
Best regards,
Kong-Yong
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Hide Dynamic Fields by queue

Post by jojo »

Forms in the ACL requires additional software module e.g. the OTRS Business Solution
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
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: Hide Dynamic Fields by queue

Post by reneeb »

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
kongyong92
Znuny newbie
Posts: 43
Joined: 15 Sep 2017, 11:40
Znuny Version: OTRS v5.0.10
Real Name: Kong-Yong
Company: Rhenus Logistics

Re: Hide Dynamic Fields by queue

Post by kongyong92 »

reneeb wrote:Maybe https://opar.perl-services.de/dist/HideDynamicFields will help you...
Dear reneeb and jojo, thanks for the replies. :)

@reneed, how exactly should i go about using this function?
I am trying to hide the dynamic field HSE24PO from the queue 'Africa' in the view 'Note' i.e. when adding a new note. But it did not seem to work.

Seek your expertise on this!

Attached are the settings that i did.
HideDynamicField 1.PNG
HideDynamicField 2.PNG
You do not have the required permissions to view the files attached to this post.
Best regards,
Kong-Yong
ronaldjerardmedina
Znuny advanced
Posts: 102
Joined: 24 Jun 2016, 11:36
Znuny Version: 5.0.3-01
Real Name: Ronald Jerard
Company: Medina

Re: Hide Dynamic Fields by queue

Post by ronaldjerardmedina »

I also installed the said package, but it doesnt work i cant even add another line to hide more fields.
OTRS 5.0.3-01 - MySql - SLES -
grillo91
Znuny newbie
Posts: 6
Joined: 07 Feb 2018, 14:21
Znuny Version: 5.x.x
Real Name: Carlos F

Re: Hide Dynamic Fields by queue

Post by grillo91 »

jojo wrote:Forms in the ACL requires additional software module e.g. the OTRS Business Solution
Then it isn't possible hide the dynamic fields without the bussiness solution?
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: Hide Dynamic Fields by queue

Post by reneeb »

ronaldjerardmedina wrote:I also installed the said package, but it doesnt work i cant even add another line to hide more fields.
This currently works on the ticket create forms (AgentTicketPhone and AgentTicketEmail). To hide more than one field, you can set a list of fields, so add ", NameOfField2, NameOfField3" after "HSE24PO"
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
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: Hide Dynamic Fields by queue

Post by reneeb »

grillo91 wrote:
jojo wrote:Forms in the ACL requires additional software module e.g. the OTRS Business Solution
Then it isn't possible hide the dynamic fields without the bussiness solution?
With KIX4OTRS you can also hide dynamic fields. And with the above mentioned module, you can hide them in some dialogs. When I have time, I will add more dialogs...
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
Post Reply