Home Cireson Uploads

IT Monkey will place code here as examples of what Cireson's consulting team has to offer as well as examples for public consumption to benefit the Microsoft System Center community as a whole.


All files and projects located here come as is and without any warranty or support. We will attempt to improve the projects as time goes on based on customer and community demand. Comments and improvements are welcome as well as customization requests. Your use of these Cireson Uploads is subject to our Terms of Use.

Cireson's support team has no information on these projects outside of what you have available and will not provide support for these enhancements, extensions, and scripts.

Dont forget to checkout solutions uploaded by our customers, partners and community members here.

Resolved Incident

IT MonkeyIT Monkey O.G.
edited May 2016 in Cireson Uploads
This is an example custom task for resolving an incident directly with a single click.

/* Resolve Incident */
app.custom.formTasks.add('Incident', 'Resolve Incident', function (formObj, viewModel) {
	function ResolveIncident (incident) {
		console.log("Setting incident to 'Resolved'...");
		incident.Status.Id = "2b8830b6-59f0-f574-9c2a-f4b4682f1681"
		incident.ResolutionDescription = "This Incident was resolved by the resolve incident task."
		incident.ResolutionCategory.Id = "c5f6ada9-a0df-01d6-7087-6b8500ca6c2b";   
		incident.ResolvedDate = new Date().toISOString().split(".")[0];
		console.log("Incident set to 'Resolved', refreshing header and awaiting save..");

Download the attached .zip file below.


  • Conner_WoodConner_Wood Customer Advanced IT Monkey ✭✭✭
    edited June 2016
    Resolve Task - They say it's available from Cireson Community but it's not.  They show a far more advanced version of ResolveTask.js code that gives a minimum requirement for the description.

    Since the full code is never shown, perhaps an update on the above code is in order?
  • Adrian_MataiszAdrian_Mataisz Customer Advanced IT Monkey ✭✭✭
    edited June 2016

    Yeah. In the video says that the code presented there can be downloaded here. The code showed in the video  requires analyst to pick a Category and add a minimum 20 character Resolution Description.

    Can we have the code showed in the video? Thank You!

  • Geoff_RossGeoff_Ross Cireson Consultant Super IT Monkey ✭✭✭✭✭
    Hi All,
    Here's the code for the Custom task on that webinar. Sorry its taken a while to get this up here.
    Please join me for Part 2 of that Webinar series, one week from today, 28 June, 2pm (London).
  • Adrian_MataiszAdrian_Mataisz Customer Advanced IT Monkey ✭✭✭

    Thank You Geoff for the code. We use custom statuses and you code will hide the Change Status task so our Analysts will not have the option to change the status.

    Any way to add to your code the change status drop down? 

    Thank You

  • Geoff_RossGeoff_Ross Cireson Consultant Super IT Monkey ✭✭✭✭✭
    Hi Adrian,

    You cannot edit the OOB tasks so you would need to add the change status bit to this task. Copy the resolution description bit but change GUIDs etc so it brings in status list. You'll then need to play is visibility so the resolution stuff shows up when Resolve is selected as the Status.
    Let me know how you get on and if you'd be willing to share once done.

  • Eugene_RackEugene_Rack Customer Adept IT Monkey ✭✭
    Hello all
    Not sure if anyone has experience this issue. We have been using the Resolve Task for a while now. In most cases it works fine. However we have noticed that in some cases when using the resolve task code above, the history does not load for that IR or it does not log that the IR was resolved. Even though when looking at  the IR via the SCSM console I can see in the history tab that it was resolved. There is however one item in the SCSM history that may be the cause but not sure why. Under the Relationship changes, under Add/remove it has Remove then relationship class Trouble Ticket has action log then Item is Unknown. 

    As said before it does not fail all the time.

  • Conner_WoodConner_Wood Customer Advanced IT Monkey ✭✭✭
    @Eugene_Rack We have same issue on v6.3, we had to resolve in SCSM Console to get the incident ticket resolved.  The issue seems rare enough, but I can confirm I have experienced it.
  • Giovanni_PeriniGiovanni_Perini Customer IT Monkey ✭
    Is there any news about the history, we experience the same issue and I was wondering if anybody had found a solution for this?
Sign In or Register to comment.