Basis checkbox Prevent or Allow Group's Manager Assignment as Assigned to

rishabh31
Mega Sage

Dear Team,

 

I need help with the below requirement,

 

There is a checkbox (Prevent Manager assignment) on the sys_user_group table.
If this checkbox is True, then on INC record the Group that already assigned in the 'Assignment Group' field, it checks if that checkbox 'Prevent Manager assignment' is true then 'Assigned to' does not display the name of the associated assignment group's manager OR manager is not available for selection as assigned to for that particular INC record.

 

If the checkbox is false then 'Assigned to' will display the name of the associated assignment group's manager OR manager is available for selection.

 

Please help me with the script to achieve this.

 

Thanks

6 REPLIES 6

AshishKM
Kilo Patron
Kilo Patron

Hi @rishabh31 , 

As per OOTB , the group manager is not considered for assigned to purpose unless manager also added in group members [ sys_user_grmember ] table.

 

For your custom implementation, you need to write BR [ after , insert/update ]on Group table and check if this checkbox is changed then add/or/remove the group manager in/from table [sys_user_grmember].

 

Let us know if you need BR code for this. First write some draft and share.

 

-Thanks,

AshishKM

 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Thanks @AshishKM for your inputs, you are right about OOTB. But earlier what i did was manager also added as member of their respective groups.

 

Yes for my custom implementation I need BR code to get this acheived.

 

 

Please consider the details explained by @OlaN and @Sasikanth.

The BR based implantation will impact other form also, and this adding/removing managerUser to/from group will trigger the roles to add/remove.

 

If you still go for BR, let me know.

 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Sumanth16
Kilo Patron

Hi @rishabh31 ,

 

The best I can do is give you an example using out of the box tables and fields that sounds to me like it matches your example, then you can see where amongst your various custom tables and fields the scenario differs.

 

Let use the incident table as an example, and the Category field (named category, type of String, with Choices) and the Configuration item field (extended from the task table, named cmdb_ci, referencing the cmdb_ci table).  Note that the Category and Configuration item fields are not at all related, nor are the incident/task table related to the cmdb_ci table.

 

I added to the out of box choices for Category a record with the Label = Computers, and the Value = cmdb_ci_computer

Sumanth16_0-1708967764566.png

 

I have changed the reference qualifier (Dictionary Override in this case) to: 

Sumanth16_1-1708967764561.png

 

So when I select the Category = Computers, the Configuration item field reference search will only show the records from the cmdb_ci table which have a value in the sys_class_name field = cmdb_ci_computer

Sumanth16_2-1708967764562.png

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,

Sumanth Meda