Trusted Contributor.. Abhishek Srivas Trusted Contributor..
Trusted Contributor..
725 views

Auto Closure of incident ticket

Jump to solution
Hi Experts,

I have a requirement,it says,

.) Dont allow the user to close the incident ticket while it is in open status.
.)Allow closure only when the ticket is in resolved status.
.)Once the ticket is moved to resolved status it has to auto close in "X" days.
.)If the ticket is reopened within "X" days and resolved, the ticket has to close in [Last resolution date + "X" day]


Thanks in Advance
Abhishek
0 Likes
1 Solution

Accepted Solutions
Piku Absent Member.
Absent Member.

Re: Auto Closure of incident ticket

Jump to solution
Hi Abhishek,

Implement the scripts something like as in the attached screen shots.
Check for the case of the resolve(it is Resolved or resolved)

Check for the scheduler record and if possible attach it.

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

Re: Auto Closure of incident ticket

Jump to solution
Hi Abhishek,

1)You can make the close button invisible while incident is in open status.

2)Same as above.

3)You can write the script for this and mentioned the condition within the script.(using condition like problem.status=\"Resolved\" and resolved.time
4)I think for this you have to calculate and save the time difference between reopen and closed time(since OOB it is not calculated).And using this saved field value, you can put the condition in script to close the ticket.


hth,
Piku
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
0 Likes
Trusted Contributor.. Abhishek Srivas Trusted Contributor..
Trusted Contributor..

Re: Auto Closure of incident ticket

Jump to solution
HI Piku,

Thanks for your time.
I am done with 1 and 2.

For point no 3,I have managed a script which I am attaching here in which X=2 days.I am not sure how to and where to put the script and also how to check whether my script is right and doing the correct job.
Please could you guide me.

Point no 4 I am still working on, but no idea.Would appreciate if you help on that also.

Thanks
Abhishek
0 Likes
Trusted Contributor.. Abhishek Srivas Trusted Contributor..
Trusted Contributor..

Re: Auto Closure of incident ticket

Jump to solution
Attaching the Script.
0 Likes
Piku Absent Member.
Absent Member.

Re: Auto Closure of incident ticket

Jump to solution
Abhishek,

I did not talked about the Java script.I told you about the script using script library,however you can also use the Java script.But i used the simple RAD script and it worked for me and have no idea for JS.

JS and RAD scripts both could be executed at particular time interval using the Schedular.

regards,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
0 Likes
Trusted Contributor.. Abhishek Srivas Trusted Contributor..
Trusted Contributor..

Re: Auto Closure of incident ticket

Jump to solution
Hi Piku,

Could you please explain how to and where to use the script thing wat you are talking about.

I tried with the js and created a scheduler but however its doesnt seem to work.

Thanks
Abhishek
0 Likes
Piku Absent Member.
Absent Member.

Re: Auto Closure of incident ticket

Jump to solution
Hi,
look in this thread
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1381773

I have implemented same type of script.You can just try above and come again if face any difficulty.


And regarding your 4 point,it is lookin a bit complicated requirement but can be acheived.

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

Re: Auto Closure of incident ticket

Jump to solution
Sorry forget about the schedular,
Pass the following parameter to create a new schedular,
class : problem
expiration : any future time
Scheduled class : problem
application : script.execute.bg
interval : any desirable(can pass 5 minutes i.e 00:05:00 for initial testing purpose)

In the strings tab,in the String array put tha name of you first script :(close.incident from the link thread)


Note down that after adding a new schedular with above parameters, value in Status field will be "rescheduled" automatically.If not so you just pass this and save the record again.


regards,
Piku
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
0 Likes
Trusted Contributor.. Abhishek Srivas Trusted Contributor..
Trusted Contributor..

Re: Auto Closure of incident ticket

Jump to solution
Hi Piku,

I tried adding the scheduler after adding the scripts but still the incidents are not getting closed.

Is there anything i missed.

Abhishek
0 Likes
Piku Absent Member.
Absent Member.

Re: Auto Closure of incident ticket

Jump to solution
Hi Abhishek,

Implement the scripts something like as in the attached screen shots.
Check for the case of the resolve(it is Resolved or resolved)

Check for the scheduler record and if possible attach it.

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

Re: Auto Closure of incident ticket

Jump to solution
forgot the attachment 😞
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
0 Likes
Trusted Contributor.. Abhishek Srivas Trusted Contributor..
Trusted Contributor..

Re: Auto Closure of incident ticket

Jump to solution
Hi Piku,

Please find the screenshots attached what I m trying to do.

I think i m going wrong somwhere.

Also from your screen dumps i could notsee the whole code of the last screen.

Anyways plz see my screendumps and let me know what is wrong.


Abhishek
0 Likes
Piku Absent Member.
Absent Member.

Re: Auto Closure of incident ticket

Jump to solution
Hello Abhishek,

I am not getting the full vies of second line in first script.
I am attaching the first unl file of all 4 scripts,you can upload them to your test environment and see exactly what is written in them.They have same name as in my attached screen shots.
UPLOAD Fist in you test environment only.

And just start with the simplest condition as only with status as closed (cross check the field name for the status)
For the tracing add some print statement to each script and scheduler so that from the log file you can trace that whether script or scheduler is executed or not


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

Re: Auto Closure of incident ticket

Jump to solution

I see you reference a script "AutoClosureOfInteractions" but I did not see that in your unl.  Can you please elaborate on this.  

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.