Home Community Uploads
image

Cireson Partners, Customers and Community members share your customizations and examples here to help benefit the community as a whole to earn Kudos and badges.

DISCLAIMER

All files and projects located here are provided and come "as-is" and without any warranty or support. Use at your own risk. Your use of Community Uploads is subject to our Terms of Use.

Cireson does not and will not support or maintain these enhancements, extensions, and scripts.

For Team Cireson uploads click here.

Extend incident class. Security

Sergey_AstashkiSergey_Astashki Customer IT Monkey ✭

Hi.

We have expanded the incident class with 2 fields:contract(list), departure (yes\no).

How to configure the visibility of these fields for AD groups of users (engineers):

1. Do not see new fields

2. They only see the contract number, and the field is required to be filled in.

Comments

  • Simon_ZeinhoferSimon_Zeinhofer Customer Ninja IT Monkey ✭✭✭✭

    You could create custom forms inside the Incident.js file in your CustomSpace folder.

    Inside the portal you can then assign this form to AD groups. Inside the file you can then decide which field is shown and if it is either required or not.

    Don't forget to assign the correct Type Projection, else you won't see certain Incident Relationships.

    Do you know how to do that?

  • Sergey_AstashkiSergey_Astashki Customer IT Monkey ✭

    Hi.

    thanks for the reply. I do not know how to make different forms for different users, and how to assign them to AD groups. I didn't find it in the knowledge base either. Can you share your experience?

  • Simon_ZeinhoferSimon_Zeinhofer Customer Ninja IT Monkey ✭✭✭✭
    edited March 2022

    Hello @Sergey_Astashki ,

    sure :)


    First of all, copy the the Incident.js from inetpub\CiresonPortal\Scripts\forms\templates to your inetpub\CiresonPortal\CustomSpace folder. You can just copy it there or in the WorkItem folder inside the CustomSpace. We did that so we have the CUstomSPace folder itself clean and it is easier to find what you're looking for.

    VERY IMPORTANT: DO NOT change or delete the files from the forms\templates folder. If you have any errors inside your custom form, and you don't find the cause, you can still just override it with the OOTB Template and it's working again ;-)

    Open the Incident.js file with a text editor. I recommend Notepad++, as the standard editors from Microsoft are garbage for that.

    On top of the file you see the following line:


    This marks the standard Incident View for Analysts.

    If you scroll down to line 179 you see the following:


    This marks the standard View for NON-Analysts.

    What you have to do now, is to create a new section, at the same hirarchy as the Default and DefaultEndUser.

    What I do in such case, I just copy the Default Section completely and paste it at the end of the file.

    Be careful to paste it exactly where it belongs, which means AFTER the second last }. Do not forget to add an , after this }

    Now rename the section you just pasted to anything you like, I recommend something short like "engineers". Inside this section you can then edit the fields as you wish. Here is the KB Article for that: https://kb.cireson.com/article/how-to-create-custom-forms-for-cireson-portal/51

    You can of course also edit the fields inside the Default and DefaultEnduSer section to your needs.

    After you have finished your engineers section to your needs, open the portal and go to Admin Settings--> Group Seetings. You will find the following in top:

    This is the part, where you assign this engineers Incident form to an AD group.

    1. Click the Add button on top.
    2. A new line will appear. In the first column type in the AD group which should have access to the engineers form
    3. In the second column, type in the Name of the form, in your case engineers.
    4. The third column is the ordinal number, which is very important if, e.g. you create multiple sections inside the same js file and a user is in more than one of the assigend AD groups. With the ordinal number, you decide, which section will be shown. In our environment we use -1 as the TOP number.
    5. In the forth column, you have to select the item type. In your case it's incident.
    6. The fifth column is very important, as the type projection has influence on which relationships you see inside the incident. If you choose the wrong one, you might for example not see the Affected user Relationship anymore. To have all the relationships you could use the Incident (advanced) but I remember we had some troubles when we used this projection in views, so maybe this is not a good idea. "Incident (portal)" is a good one for that. But there are two of these, one which only has the Affected User and one, which has the relationships which are "typical". What I remember the second one is the big one, but oyu will have to test that.
    7. If you have finished that, click on the Update button on the side, the new form is now added.
    8. DO NOT FORGET TO SAVE AT THE BOTTOM OF THE PAGE!! ;-)

    If the corresponding engineer group has already been "touched" by the cachebuilder, members if the engineers AD group should immediately see the new view when they open an Incident.

    I hope this helped :)

Sign In or Register to comment.