How to reopen resolved Hr cases i.e to change state from 'resolved' to 'work in progress'

namitakharade
Kilo Contributor

I am trying to change reopen HR case by inbound action i.e to change state from 'resolved' to 'work in progress'

I am able to change the state from suspended to 'work in progress' by using same inbound action

For changeing the state from Resolved to work in progress, it is skipping the inbound action

Is there ACL's related to this?

6 REPLIES 6

Jaspal Singh
Mega Patron
Mega Patron

Hi Namita,

 

Can you kindly help with the conditons & script being used for the inbound.

 

Thanks,

Jaspal Singh

 

Hit Helpful or Correct on the impact of response.

namitakharade
Kilo Contributor

Hello Jaspal,

 

Thanks for quick response.

For my incoming emails in the email logs, even though watermark is identified wth correct record, target remains empty.

And thats why it is not updating anything on the record, as script uses cueent object and there target is empty.

Rob Sestito
Mega Sage

Hello,

I don't remember there being any ACLs that would prevent something like this. However, we also do not allow for closed cases to be reopen. We would rather have the end user, by inbound email action, to bring the case from awaiting acceptance back to work in progress IF they reject the case resolution.

If we have a closed case that definitely needs to be put back to WIP, we use a UI Action for that - and only a select few have this ability (including the admin of course).

And quickly, when you say 'resolved', is that your actual state? Or is the state 'awaiting acceptance' or 'close complete'?

I can show you what we use for both of my scenarios mentioned above, and maybe that can help you out with your requirement.

 

Inbound email action (which has to be created for each COE table you are using) I will be showing from my HRIT COE Table:

 

find_real_file.png

Action script:

gs.include('validators');

if (current.getTableName() == "sn_hr_core_case_operations") {
	current.work_notes= "reply from: " + email.origemail + "\n\n" + email.body_text;
	
	if (current.state == 20) //Awaiting Acceptance
		
	if (email.subject.indexOf("Accept") >= 0){
		current.state = 3; //Close Complete
	}
	
		if (current.state == 3) //Close Complete
		
		if (email.subject.indexOf("Reject") >= 0){
			gs.eventQueue('sn_hr_core.automatedResponse',current,gs.getUserID(),gs.getUserName());
	}
	
	if (current.state != 3) //Not Close Complete
	
	if (email.subject.indexOf("Reject") >= 0)
		current.state = 18; // Work in Progress
}
current.update();


-OR-

UI Action to reopen cases:

find_real_file.png

 

UI Action Script:

function reopenCase() {
	var sysId = typeof rowSysId == 'undefined' || rowSysId == null ?
	gel('sys_uniqueValue').value : rowSysId;
	var dialogClass = window.GlideModal ? GlideModal : GlideDialogWindow;
	var dialog = new dialogClass('sn_hr_core_HR Reopen Dialog');
	var msg = new GwtMessage().getMessage('Please enter reason for reopening');
	dialog.setTitle(msg);
	dialog.setPreference('sysparm_task_sys_id', sysId);
	dialog.setPreference('sysparm_task_table', 'sn_hr_core_case');
	dialog.setPreference('sysparm_is_comment', 'true');
	dialog.render();
}

 

Not sure if this is exactly what you are looking for - but maybe bring some ideas or help to what you are trying to accomplish. Please let us know if this is not the way you want. If not, maybe provide some screen shots on what you have that is not working.

Thanks,

-Rob

I followed the second option just as it was written, but no joy.

Everything Saved OK.  The button shows shows up, but when I click-it, nothing.