Home Cireson Uploads
image


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.

DISCLAIMER

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 November 2021 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..");
		$('#statusname').html('Resolved');
	}
	
	ResolveIncident(viewModel);
});

Download the attached .zip file below.

UPDATE BY Geoff Ross:

This customisation has been superseded by the Resolve IR Task Add-In.

https://kb.cireson.com/article/user-guide-add-in-resolve-ir-task/2586

Comments

  • Conner_WoodConner_Wood Customer Ninja 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 O.G.
    edited November 2021
    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).
    Geoff

    UPDATE BY Geoff Ross:

    This customisation has been superseded by the Resolve IR Task Add-In.

    https://kb.cireson.com/article/user-guide-add-in-resolve-ir-task/2586

  • 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 O.G.
    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.

    Geoff
  • 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 Ninja 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?
  • Nico_RedepenningNico_Redepenning Customer IT Monkey ✭

    This task worked perfectly until we upgraded our portal to 11.2.2. The prompt pops up but without "OK" or "CANCEL". Thank you to everyone for any help that can be provided.


  • Geoff_RossGeoff_Ross Cireson Consultant O.G.

    @Nico_Redepenning

    This customisation has been superseded by the Resolve IR Task Add-In.

    https://kb.cireson.com/article/user-guide-add-in-resolve-ir-task/2586

    That issue is fixed in that.

    Geoff

  • Jonathan_BolesJonathan_Boles Customer Ninja IT Monkey ✭✭✭✭

    Hi @Geoff_Ross , is there a work around for the button issue in V11? We have several custom tasks that are falling victim to this same issue. The Resolve Incident is one of them and from what I can tell the add-in is not working with localizations. Any pointers?

  • Geoff_RossGeoff_Ross Cireson Consultant O.G.

    Hi @Jonathan_Boles

    The issue will be a lack of closing tags in the html file

    Previous version of jQuery was less fussy about using self closing tags eg <select />

    But the newer version enforces stricter html rules where these are not allowed so you need to have a closing tag too eg <select></select>

    However, I'm pretty sure the latest version of the Add-In is fully localised (localized) :P

    Geoff

Sign In or Register to comment.