Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Absent Member.. SanjeevDas Absent Member..
Absent Member..
2019 views

Auto Close Tickets after 24 hrs

Jump to solution

Hi Experts,

 

The requirement is SM has to auto close the tickets(say incident) within 24 hrs after the status of the ticket is changed to "Resolved".

 

SM has a normal SLA runing with initial and final state - Open to Resolved respectively. After the SLA is resolved an email will go to the user stating that he has to send a feedback within 24 hrs, orelse the ticket will be auto closed.

 

Please let me knw how do i achieve this?

Thanks and Best regards,

Sanjeev

0 Likes
1 Solution

Accepted Solutions
Piku Absent Member.
Absent Member.

Re: Auto Close Tickets after 24 hrs

Jump to solution
Hi Sanjeev,

It is easy to create the scheduler.
name : <desired>
id : <auto generated>
class : problem
schd class : problem
expiration : <next execution time you wan>
action time : blank or any past time
Repeat interval : <as desired>
status : rescheduled
in js tab : put you above after removing first line of js or may create a js in sl and call from js tab as
var autoclose = system.library.IMclose.autoclose();
new js will have the complete js as you pasted.

Also you might require adding the expression as below for ‘close’ display option button of incident,
<Existing condition> or operator()=”problem”

And frequency should be hourly,1-2 minute will lead to overhead on system.

Hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
11 Replies
Piku Absent Member.
Absent Member.

Re: Auto Close Tickets after 24 hrs

Jump to solution
Hi Sanjeev,

You can opt for RAD and JavaScript to configure the same and then put this in new scheduler record, it is quite easy. Search the forum for same.

Now for second query also you have to close the ticket. SLA do not resolved, it should be ticket. OOB on resolution of ticket I suppose mail is configured. If not then you can make in by modifying the 'update' notification record for IM or can use macros.

Since OOB, for close also mail do shoots, hence you need not to worry about here as whenever SM will auto close the ticket in background it go through all business logic and notify the user as configured. You have to use the same display option in auto closure script as manually used to close the ticket.


hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
0 Likes
Highlighted
BAG_Ass Absent Member.
Absent Member.

Re: Auto Close Tickets after 24 hrs

Jump to solution
U need to write java script to make changes that u need. After it create Alert and start ur script from alert.
0 Likes
Outstanding Contributor.. Ngoc_Ngo_SM Outstanding Contributor..
Outstanding Contributor..

Re: Auto Close Tickets after 24 hrs

Jump to solution

Hi Sanjeev,

 

May be this post is helpful for you: http://h30499.www3.hp.com/t5/HP-Service-Manager-Service/Auto-close-incident-tickets-after-48-hours/td-p/6073765#.U407CCgXKSo.

It has the same requirement with yours. Please spend some time to check it.

 

Thank you and Best regards

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation.
0 Likes
Absent Member.. SanjeevDas Absent Member..
Absent Member..

Re: Auto Close Tickets after 24 hrs

Jump to solution

Hi all,

 

I could close an incident ticket automatically by using the js stated below

 

function autoclose()
{
var ticket = new SCFile("probsummary");
var rc = ticket.doSelect("problem.status=\"Resolved\" and resolved.time.rs<tod()-'0 23:59:59'");
if(rc == RC_SUCCESS)
{
do
{
ticket.doAction("close");
}while (ticket.getNext() == RC_SUCCESS);
}
}
autoclose();

 

However, I had to execute the script manually to close the ticket. How do i configure a schedular to run the script automatically at every 1 min or 2 mins interval.

 

Sanjeev

0 Likes
Piku Absent Member.
Absent Member.

Re: Auto Close Tickets after 24 hrs

Jump to solution
Hi Sanjeev,

It is easy to create the scheduler.
name : <desired>
id : <auto generated>
class : problem
schd class : problem
expiration : <next execution time you wan>
action time : blank or any past time
Repeat interval : <as desired>
status : rescheduled
in js tab : put you above after removing first line of js or may create a js in sl and call from js tab as
var autoclose = system.library.IMclose.autoclose();
new js will have the complete js as you pasted.

Also you might require adding the expression as below for ‘close’ display option button of incident,
<Existing condition> or operator()=”problem”

And frequency should be hourly,1-2 minute will lead to overhead on system.

Hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
Absent Member.. SanjeevDas Absent Member..
Absent Member..

Re: Auto Close Tickets after 24 hrs

Jump to solution

Hi Piku,

Thanks for your help but somehow I could not make the schedular work.

Please check the images attached.

 

 

And the Java Script

Thanks,

Sanjeev

Piku Absent Member.
Absent Member.

Re: Auto Close Tickets after 24 hrs

Jump to solution
Hi,


Try JS expression like in scheduler,
var autoclose = system.library.IMclose.autoclose();

Also how can you say that it is working ? do you have any relevant ticket to be closed. ? Is scheduler time is changing as expected.

Just put print statement in sch before call of js like,
print("will call js in sch record");

and in JS also put like below inside do-while loop,
print("ticket to be close now : " + ticket.number);

now wait for scheduler to execute and check sm.log file for these print statements.


Remove package value 'Activities' in JS.

hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
Absent Member.. SanjeevDas Absent Member..
Absent Member..

Re: Auto Close Tickets after 24 hrs

Jump to solution

Hi Piku,

 

The schedular couldn't close the ticket. The log says problem doesn't have authorization to perform the action: close

 

5432(  8648) 06/04/2014 13:14:29   JS I Will call js in the schedular
5432(  8648) 06/04/2014 13:14:29  RAD E User problem does not have authorization to perform the action: close
5432(  8648) 06/04/2014 13:14:29   JS I ticket to be close now : IM10216

 

Thanks,

Sanjeev

0 Likes
Piku Absent Member.
Absent Member.

Re: Auto Close Tickets after 24 hrs

Jump to solution
Hi Sanjeev,

Did you followed as below ?

Also you might require adding the expression as below for ‘close’ display option button of incident,
<Existing condition> or operator()=”problem”

if so the add one operator with login name 'problem' and give the access to close the incident ticket in incident profile.


hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
omeraydin Absent Member.
Absent Member.

Re: Auto Close Tickets after 24 hrs

Jump to solution

Hi,

I have a question. Where is the scheduler? I can't found it.

Thank you.

0 Likes
omeraydin Absent Member.
Absent Member.

Re: Auto Close Tickets after 24 hrs

Jump to solution

Okey I resolved. Command>db>search the schedule....

Thank you your ticket 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.