Edit in List View - allowing users to close incident

Marc_See
Giga Contributor

One of our users reported this and I wanted to see if anyone found a way to fix this. OOTB, itil users are only allowed to resolve an incident, and not close:

find_real_file.png

Here's the issue. When a user in list view, they are given the option to close:

find_real_file.png

I was asked to remove this functionality. As an itil user, I would want to keep this feature as it makes managing tickets faster.

Any ideas on how to remove the ability to "Close" the ticket from the list view?

9 REPLIES 9

Jaspal Singh
Mega Patron
Mega Patron

Hi Marc,

 

You can keep it opened/editable for assignments (Assignment Group, Assigend To) fields. In your cse if the Field is state then you can create ACL of type list_edit for incident table's state field & specify the role as Admin in the role. This should suffice your requirement.

Thank you for the insight into this, I was able to achieve my goal.

 

Kunal Varkhede
Tera Guru

Hi,

 

You don't need to create ACL for your use case, by creating onCellEdit() client script it is possible.Make sure that provide role correctly in g_user_hasRole('');  

function onCellEdit(sysIDs, table, oldValues, newValue, callback) {
    var saveAndClose = true;

   //var itil = g_user.hasRole('itil');
	//alert('admin'+itil);
	if (newValue == "7"  &&  g_user.hasRole('itil')) {   

               alert("You cannot change the state to Closed from the list view.");   
               saveAndClose = false;   

       }   
       callback(saveAndClose); 
}

I hope it will help you.

 

Please mark Correct/Helpful answer if it help you in any way.

Thanks and Regards,

Kunal

It didn't work on my personal instance (turned off resolution codes and notes then implemented the idea above). Instead of 'itil", I placed "incident_manager". Also what's "7" for? here's what I have in the client script:

find_real_file.png