DynamicFields in different Customer groups

English! place to talk about development, programming and coding
Post Reply
labasus
Znuny newbie
Posts: 17
Joined: 26 Oct 2011, 23:58
Znuny Version: 5.0.11

DynamicFields in different Customer groups

Post by labasus »

Hello friends,

I'm broke my head, how is it possible with different groups of clients to show different sets of DynamicFields.

ACL doesn't help in this situation, because it could only change the values of DynamicField, but does not allow to show or to hide it, depending on Customer group.
wurzel
Znuny guru
Posts: 3224
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: DynamicFields in different Customer groups

Post by wurzel »

Hi,

Producer provides an Add On
https://www.otrs.com/otrs-business-solu ... ic-fields/

Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
labasus
Znuny newbie
Posts: 17
Joined: 26 Oct 2011, 23:58
Znuny Version: 5.0.11

Re: DynamicFields in different Customer groups

Post by labasus »

Looks like solution, but ...
1) Too many incompatibility with other modules
2) Not documented right now... I don't really know does it have needed functionality
3) It seems to me official Hide/Show Dynamic Fields module has custom JS which controls CSS to hide/show DF.

Anybody else, all mind are welcome...
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: DynamicFields in different Customer groups

Post by tto »

labasus wrote:[..]
I'm broke my head, how is it possible with different groups of clients to show different sets of DynamicFields.

ACL doesn't help in this situation, because it could only change the values of DynamicField, but does not allow to show or to hide it, depending on Customer group.
In KIX(4OTRS) it is possible to hide/show dynamic fields via ACL-rules. This even works in AgentTicketProcess and it is compatible with the rest of capeITs add on packages.

An ACL would look as followed, whereas "RequiredEquipment" is a dynamic field which should not be shown if value "Medical Device" is selected in dynamic field "OrderType".

Code: Select all

- ChangeBy: capeIT
  ChangeTime: 2016-08-31 10:11:43
  Comment: Only show dynamic fields relevant for medical device related requests.
  ConfigChange:
    Possible:
      Form:
        RequiredEquipment:
        - '0'
  ConfigMatch:
    Properties:
      Ticket:
        DynamicField_OrderType:
        - Medical Device
  CreateBy: capeIT
  CreateTime: 2016-08-31 10:11:43
  Description: ''
  ID: '12'
  Name: 205_RfC_MedicalDevice
  StopAfterMatch: 0
  ValidID: '1'
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.
wurzel
Znuny guru
Posts: 3224
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: DynamicFields in different Customer groups

Post by wurzel »

Hi,

the syntax of the ACL is the same as in the other module :)

Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
wurzel
Znuny guru
Posts: 3224
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: DynamicFields in different Customer groups

Post by wurzel »

Hi,
labasus wrote:Looks like solution, but ...
acutally it IS your solution

1) Too many incompatibility with other modules
i doubt you need them all
2) Not documented right now... I don't really know does it have needed functionality
it hides/shows dynamic fields based on ACL. The same as Kix Add On does.


regards
Florian
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
labasus
Znuny newbie
Posts: 17
Joined: 26 Oct 2011, 23:58
Znuny Version: 5.0.11

Re: DynamicFields in different Customer groups

Post by labasus »

I have use KIX4OTRS already, but it can handle only with Depending and dropdown DF type
I haven't depending dropdown DF.

In my scenario must be:
1) Customer groups: group_A, customer group_B
2) Different queue from different customer groups
3) Dynamic fields - Custom_DF1 (text) - mandatory, custom_DF2(text), custom_DF3(date) - mandatory, custom_DF4 (text), Custom_DF5 (text) - for agent only, Custom_DF6 (text) - mandatory for agent only
4) Customer forms are different for customer groups (this is done with customer groups)
5) Customer group_a must have DF: Custom_DF1, custom_DF2, custom_DF3
6) Customer group_b must have DF: custom_DF3, custom_DF4
7) Agent must use DF: Custom_DF1, custom_DF2, custom_DF3, custom_DF4, Custom_DF5, Custom_DF6.
Note to p.7: As I see agents depending on Queue must have only DynamicFields which belongs to Customer Groups to avoid DF mandatory errors and logic.


tto wrote:
labasus wrote:[..]
I'm broke my head, how is it possible with different groups of clients to show different sets of DynamicFields.

ACL doesn't help in this situation, because it could only change the values of DynamicField, but does not allow to show or to hide it, depending on Customer group.
In KIX(4OTRS) it is possible to hide/show dynamic fields via ACL-rules. This even works in AgentTicketProcess and it is compatible with the rest of capeITs add on packages.

An ACL would look as followed, whereas "RequiredEquipment" is a dynamic field which should not be shown if value "Medical Device" is selected in dynamic field "OrderType".

Code: Select all

- ChangeBy: capeIT
  ChangeTime: 2016-08-31 10:11:43
  Comment: Only show dynamic fields relevant for medical device related requests.
  ConfigChange:
    Possible:
      Form:
        RequiredEquipment:
        - '0'
  ConfigMatch:
    Properties:
      Ticket:
        DynamicField_OrderType:
        - Medical Device
  CreateBy: capeIT
  CreateTime: 2016-08-31 10:11:43
  Description: ''
  ID: '12'
  Name: 205_RfC_MedicalDevice
  StopAfterMatch: 0
  ValidID: '1'
regards, T.
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: DynamicFields in different Customer groups

Post by tto »

Hi,
labasus wrote:I have use KIX4OTRS already, but it can handle only with Depending and dropdown DF type
I haven't depending dropdown DF.
...yes. This feature is available as well, but neither the one you require for the mentioned use case nor the one I referred to.
labasus wrote: In my scenario must be:
1) Customer groups: group_A, customer group_B
2) Different queue from different customer groups
This is a point to build on. Try to modify the ACL provided above to disable DF when the "wrong" queue is selected.
labasus wrote: 3) Dynamic fields - Custom_DF1 (text) - mandatory, custom_DF2(text), custom_DF3(date) - mandatory, custom_DF4 (text), Custom_DF5 (text) - for agent only, Custom_DF6 (text) - mandatory for agent only
4) Customer forms are different for customer groups (this is done with customer groups)
5) Customer group_a must have DF: Custom_DF1, custom_DF2, custom_DF3
6) Customer group_b must have DF: custom_DF3, custom_DF4
7) Agent must use DF: Custom_DF1, custom_DF2, custom_DF3, custom_DF4, Custom_DF5, Custom_DF6.
I guess you are a bit imprecise here - agents must be able to se entered values, mustn't they? There is no ACL or similar on displaying DF in AgentTicketZoom. This is controlled by SysConfig.
labasus wrote: Note to p.7: As I see agents depending on Queue must have only DynamicFields which belongs to Customer Groups to avoid DF mandatory errors and logic.
OK - so the ACLs rules should apply to any ticket creation / process masks. Then just leave out any ACL-properties limiting this.

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.
labasus
Znuny newbie
Posts: 17
Joined: 26 Oct 2011, 23:58
Znuny Version: 5.0.11

Re: DynamicFields in different Customer groups

Post by labasus »

Looks very promise, but still can't move forward (because of ACL is not documented well for these unstandart case):
1) For different customer group used "Ticket Template Configurator" with predefined Queue A or B (depending on customer group)
2) DF with name "place" must be hidding for customer group_A, which use Queue name "group_A" (queue id=2)

ConfigChange:
Possible:
Form:
DynamicField_place:
- '0'
ConfigMatch:
Properties:
Queue:
QueueID:
- '2'
Description: ''
ID: '3'
Name: LastKnowPlace
StopAfterMatch: '1'
ValidID: '1'

Doesn't work... :(
tto wrote:Hi,
labasus wrote:I have use KIX4OTRS already, but it can handle only with Depending and dropdown DF type
I haven't depending dropdown DF.
...yes. This feature is available as well, but neither the one you require for the mentioned use case nor the one I referred to.
labasus wrote: In my scenario must be:
1) Customer groups: group_A, customer group_B
2) Different queue from different customer groups
This is a point to build on. Try to modify the ACL provided above to disable DF when the "wrong" queue is selected.
labasus wrote: 3) Dynamic fields - Custom_DF1 (text) - mandatory, custom_DF2(text), custom_DF3(date) - mandatory, custom_DF4 (text), Custom_DF5 (text) - for agent only, Custom_DF6 (text) - mandatory for agent only
4) Customer forms are different for customer groups (this is done with customer groups)
5) Customer group_a must have DF: Custom_DF1, custom_DF2, custom_DF3
6) Customer group_b must have DF: custom_DF3, custom_DF4
7) Agent must use DF: Custom_DF1, custom_DF2, custom_DF3, custom_DF4, Custom_DF5, Custom_DF6.
I guess you are a bit imprecise here - agents must be able to se entered values, mustn't they? There is no ACL or similar on displaying DF in AgentTicketZoom. This is controlled by SysConfig.
labasus wrote: Note to p.7: As I see agents depending on Queue must have only DynamicFields which belongs to Customer Groups to avoid DF mandatory errors and logic.
OK - so the ACLs rules should apply to any ticket creation / process masks. Then just leave out any ACL-properties limiting this.

regards, T.
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: DynamicFields in different Customer groups

Post by tto »

labasus wrote:Looks very promise, but still can't move forward (because of ACL is not documented well for these unstandart case):
1) For different customer group used "Ticket Template Configurator" with predefined Queue A or B (depending on customer group)
2) DF with name "place" must be hidding for customer group_A, which use Queue name "group_A" (queue id=2)

ConfigChange:
Possible:
Form:
DynamicField_place:
- '0'
ConfigMatch:
Properties:
Queue:
QueueID:
- '2'
Description: ''
ID: '3'
Name: LastKnowPlace
StopAfterMatch: '1'
ValidID: '1'

Doesn't work... :(
try the following changes to your ACL really importat is just the removed "Dynamicfield_" before "place". If you match Queue-Properties rather than Ticket-Properties, QueueID should be replaced by "ID" because it's a sub-attribute-name of queue. Anyway the filter for queue I'd configure like that:

Code: Select all

  ConfigChange:
    Possible:
      Form:
        place:
        - '0'
  ConfigMatch:
    Properties:
      Ticket:
        Queue:
        - 'BetterUseYourQueueName'
  Description: ''
  ID: '3'
  Name: LastKnowPlace
  StopAfterMatch: '1'
  ValidID: '1'
--
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.
labasus
Znuny newbie
Posts: 17
Joined: 26 Oct 2011, 23:58
Znuny Version: 5.0.11

Re: DynamicFields in different Customer groups

Post by labasus »

Strange, but doesn't work..
All DynamicFields must be enabled in DynamicField SysConfig Settings -> CustomerTicketMessage must be ticked to show it (or to hide it with ACL)?

Where I can find kix4otrs documentation for developers with ACL description?
try the following changes to your ACL really importat is just the removed "Dynamicfield_" before "place". If you match Queue-Properties rather than Ticket-Properties, QueueID should be replaced by "ID" because it's a sub-attribute-name of queue. Anyway the filter for queue I'd configure like that:

Code: Select all

  ConfigChange:
    Possible:
      Form:
        place:
        - '0'
  ConfigMatch:
    Properties:
      Ticket:
        Queue:
        - 'BetterUseYourQueueName'
  Description: ''
  ID: '3'
  Name: LastKnowPlace
  StopAfterMatch: '1'
  ValidID: '1'
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: DynamicFields in different Customer groups

Post by tto »

OK - let's start from scratch:
  • Which OTRS- and KIX4OTRS-Versions do you use?
  • Which dynamic fields are relevant how are their names?
  • How does at lease one queue is named and which DFs should be hidden in input screens if this queue is selected (to cross-check with your ACL)?
  • How does your ACL(s) look like?
  • Are these ACLs enabled?
  • Do you check with other users than UserID 1?
labasus wrote:Strange, but doesn't work..
All DynamicFields must be enabled in DynamicField SysConfig Settings -> CustomerTicketMessage must be ticked to show it (or to hide it with ACL)?
Where I can find kix4otrs documentation for developers with ACL description?
...the documentation on this is not very obvious, I'd even say it's missing. I'll file this as a "documentation bug".

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.
labasus
Znuny newbie
Posts: 17
Joined: 26 Oct 2011, 23:58
Znuny Version: 5.0.11

Re: DynamicFields in different Customer groups

Post by labasus »

> Which OTRS- and KIX4OTRS-Versions do you use?
OTRS 5.0.11
KIX4OTRS 8.0.6
and other extentions (latest versions) like: AccountedTimeInOverview, CustomerUserImportExport, DynamicFieldRemoteDB, ImportExport, OutOfOfficeNoStateChange, SystemMonitoring,TemplateX, UserImportExport

> Which dynamic fields are relevant how are their names?
For this moment IIm'm testing only with one DF for testing with DF name "place" (field type - Text, object type - Ticket, field order - last one, Show in frontend modules (ticked) - CustomerTicketMessage)

> How does at lease one queue is named and which DFs should be hidden in input screens if this queue is selected (to cross-check with your ACL)?
Queue: "SANDELIAI::Apsauga" where DF "place" must be hidden
Queue: "SANDELIAI::Kedainiai" where DF "place" must be not hidden

So, AdminQuickTicketConfigurator was used to make different forms for different Customer groups with predefined Queue
Customer group "Apsauga" can see only SANDELIAI::Apsauga and predefined SANDELIAI::Apsauga and text
Customer group "Kedainiai" can see only SANDELIAI::Kedainiai and predefined SANDELIAI::Kedainiai and text

> How does your ACL(s) look like?

Code: Select all

ConfigChange:
    Possible:
      Form:
        place:
        - '0'
  ConfigMatch:
    Properties:
      Ticket:
        Queue:
        - 'SANDELIAI::Apsauga'
  Description: ''
  ID: '3'
  Name: LastKnowPlace
  StopAfterMatch: '1'
  ValidID: '1'
  
I've tried to use and Raw queue for testing... (nothing)

> Are these ACLs enabled?
Yes, sure and synchronized every time after changes

> Do you check with other users than UserID 1?
Yes
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: DynamicFields in different Customer groups

Post by tto »

labasus wrote:[..]
one idea - if the field is shown on initial mask display - try to change some value in order to cause an AJAX-Request - does the visibility change? I think there's a bug with the initial display.

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.
labasus
Znuny newbie
Posts: 17
Joined: 26 Oct 2011, 23:58
Znuny Version: 5.0.11

Re: DynamicFields in different Customer groups

Post by labasus »

Finally... ACL really works and DF can such hidding magic:)
My trouble was only because of Customer form was without Queue selection field, it was predefined with QuickText forms.

Almost happy, but... now all DF are showing up until Queue hide some of them by ACL rules.

Is it possible to change logical model (up side down): Hide all of them (DF), until Queue will be chosen and ACL rules will begin show/hide magic?

Thx.
tto wrote:
labasus wrote:[..]
one idea - if the field is shown on initial mask display - try to change some value in order to cause an AJAX-Request - does the visibility change? I think there's a bug with the initial display.

regards, T.
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: DynamicFields in different Customer groups

Post by tto »

labasus wrote:Finally... ACL really works and DF can such hidding magic:)
My trouble was only because of Customer form was without Queue selection field, it was predefined with QuickText forms.

Almost happy, but... now all DF are showing up until Queue hide some of them by ACL rules.

Is it possible to change logical model (up side down): Hide all of them (DF), until Queue will be chosen and ACL rules will begin show/hide magic?
...not yet :-/ but it is planned to add/fix that.
--
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.
labasus
Znuny newbie
Posts: 17
Joined: 26 Oct 2011, 23:58
Znuny Version: 5.0.11

Re: DynamicFields in different Customer groups

Post by labasus »

First of all thank you for the quick and constructive answers, I'll be waiting for this add/fix and I could be a beta tester as also.
Just pm

Thx one more time.
...not yet :-/ but it is planned to add/fix that.
brianmark2
Znuny newbie
Posts: 13
Joined: 01 Sep 2014, 05:52
Znuny Version: 3.3.8
Real Name: Brian
Company: none

Re: DynamicFields in different Customer groups

Post by brianmark2 »

Hi Sir,

How did you do it?

could you show us your screenshot acl configuration.

Thank you
labasus
Znuny newbie
Posts: 17
Joined: 26 Oct 2011, 23:58
Znuny Version: 5.0.11

Re: DynamicFields in different Customer groups

Post by labasus »

http://joxi.ru/n2Y8K8bfjL6KKm
brianmark2 wrote:Hi Sir,

How did you do it?

could you show us your screenshot acl configuration.

Thank you
brianmark2
Znuny newbie
Posts: 13
Joined: 01 Sep 2014, 05:52
Znuny Version: 3.3.8
Real Name: Brian
Company: none

Re: DynamicFields in different Customer groups

Post by brianmark2 »

Thank you Sir,

Did you define anything from this sysconfig?
Ticket::Frontend::DynamicField###DisabledDynamicFields
How did you do it?

Thank you
labasus wrote:http://joxi.ru/n2Y8K8bfjL6KKm
brianmark2 wrote:Hi Sir,

How did you do it?

could you show us your screenshot acl configuration.

Thank you
labasus
Znuny newbie
Posts: 17
Joined: 26 Oct 2011, 23:58
Znuny Version: 5.0.11

Re: DynamicFields in different Customer groups

Post by labasus »

Just leave DisabledDynamicFields unfilled
brianmark2 wrote:Thank you Sir,

Did you define anything from this sysconfig?
Ticket::Frontend::DynamicField###DisabledDynamicFields
How did you do it?

Thank you
labasus wrote:http://joxi.ru/n2Y8K8bfjL6KKm
brianmark2 wrote:Hi Sir,

How did you do it?

could you show us your screenshot acl configuration.

Thank you
labasus
Znuny newbie
Posts: 17
Joined: 26 Oct 2011, 23:58
Znuny Version: 5.0.11

Re: DynamicFields in different Customer groups

Post by labasus »

Just leave DisabledDynamicFields unfilled
brianmark2 wrote:Thank you Sir,

Did you define anything from this sysconfig?
Ticket::Frontend::DynamicField###DisabledDynamicFields
How did you do it?

Thank you
labasus wrote:http://joxi.ru/n2Y8K8bfjL6KKm
brianmark2 wrote:Hi Sir,

How did you do it?

could you show us your screenshot acl configuration.

Thank you
Post Reply