Home Analyst Portal

How to hide "Send Email" from the "Tasks" column on the IR, SR, etc. form/page?

Brett_EtzelBrett_Etzel Customer IT Monkey ✭

Hello,


I am trying to hide "Send Email" from the "Tasks" column on the IR, SR, etc. form/page to force the usage of "Comments" to document work. I want everything IT is doing to be captured by documenting in "Comments".


I tried adding the script part in this link ... https://community.cireson.com/discussion/451/hide-send-email-link-for-ad-groups-in-incident ... to our custom.js file, but it doesn't seem to be having he desired affect.


FYI ... I've reastarted Cache Builder, IIS, etc. after adding the custom script part.


Any ideas?


Thanks!


///////////////////////////////////////////////////////////////////////////////////////////////

// Hide 'Send Email' Task from ticket form.

function HideSendMailForGroups(){

 var userid = session.user.Id;

 //Define the groups which can't see the "send email" link here:

 // var stsgroups = ["3rdL_AD_Group","2ndL_AD_Group","1stL_AD_Group"];

// No groups should see 'Send Email'.

 var stsgroups = [""];

 $.ajax({

 url: "/api/V3/User/GetUsersGroups",

 data: {id: userid},

 type: "GET",

 success: function (groups) {

  for ( i = 0 ; i < groups.length ; i++ ) {

  if (contains(stsgroups,groups[i].UserName)) {

   $( ".taskmenu li:contains('Send Email')" ).hide();

  }

  }

 }

 });

}

///////////////////////////////////////////////////////////////////////////////////////////////

Best Answers

Answers

  • Brett_EtzelBrett_Etzel Customer IT Monkey ✭

    Hi Geoff,

    Thank you very much for the reply!

    I don't make changes to the custom space all that often, so I'm likely missing the obvious. I generally get help from a Cireson consultant or support rep.

    I added the script-part you provided in the custom.js file, saved, restarted IIS (+ dependencies), including the Cache Builder. I then tested the IR and SR forms, however, Send Email still shows.

    Apologizes for missing the obvious.

    Brett

  • Geoff_RossGeoff_Ross Cireson Consultant O.G.

    Brett, no problems, we'll get it sorted. None of that stuff actually needs to be restarted, (but it doesn't hurt). The one thing that does need doing is clearing browser cache. An IIS restart should trigger that but to be sure, can you try in Incognito mode.

    Geoff

  • Brett_EtzelBrett_Etzel Customer IT Monkey ✭

    That did the trick. Thanks again, Geoff!

    That definitely rings a bell, and I now recall needing to frequently flush browser cache when customizing the Portal with the Cireson consultants and support reps (a couple years ago).

    Relating cached content. Is there a Cireson-approved method for shortening content caching from the IIS server's perspective? Ideally, I'd set a global limit for the Portal on content caching. If I can reduce that cache, customizations can take affect without asking end users to flush browser cache.

    I did a quick Cireson Community search and didn't find anything obvious, but maybe Cireson addresses that differently.

    If Cireson has no special way of achieving this, maybe it's done in the Web.Config file? I found this for the site ... https://docs.microsoft.com/en-us/iis/manage/managing-performance-settings/configure-iis-7-output-caching ... but if there is a best practice approach to use with the Portal, I'd rather go that route.

    Thanks, Brett

  • Brett_EtzelBrett_Etzel Customer IT Monkey ✭

    Great, I tried this (reducing the version number as described above) and it seems to have worked well.

    Thank you Geoff!

  • Gabriel_LencesGabriel_Lences Customer Advanced IT Monkey ✭✭✭
    edited March 2021

    This can now be done easily with the new addin "Hide OOB tasks" introduced in 10.2.0 or higher in latest branch :)

Sign In or Register to comment.