Home General Discussion

What happened to "Convert IR to SR" download?

Brian_WinterBrian_Winter Customer Adept IT Monkey ✭✭
Was there a bug?  Implemented in OoB?

Best Answer

Answers

  • Brian_WinterBrian_Winter Customer Adept IT Monkey ✭✭
    That's the one.  I didn't see a Downloads article in the Community like the others.  Also don't see the MA/CR Group Notify download in the DevOps.
  • Mathias_VandendriessMathias_Vandendriess Customer Adept IT Monkey ✭✭
    the IR to SR task doesn't work when I copy the code
    when I look in the debugger i get this error:
    'IR2SR_loadTemplates' is undefined

    this is the custom.js code from the latest verstion

    // Convert IR to SR-- Set permissions for the task
    app.custom.formTasks.add('Incident', null, function (formObj, viewModel) {
    formObj.boundReady(function(){
    var vm = pageForm.viewModel;
    //If the Service Request is Complete or Cancelled don't show the task
    if (vm.Status.Name == "Resolved"){
    $("li[class='link']:contains('Convert to SR')").css("display", "none");
    }
    //If the user is not an analyst, hide the task
    if (!session.user.Analyst) { 
    $( ".taskmenu li:contains('Convert to SR')" ).hide() 
    });
    return;
    });

    // Convert IR to SR-- Add the tasks to the tasks pane
    app.custom.formTasks.add('Incident', "Convert to SR", function (formObj, viewModel) {
    //Class Id for Service Requests
    var classid = "04B69835-6343-4DE2-4B19-6BE08C612989";
    //Call the Get Templates Web Service to return all Service Request Templates
    $.ajax({
    url: "/api/V3/Template/GetTemplates",
    data: {classId: classid},
    type: "GET",
    success: function (data) {
    var templatedata = JSON.stringify(data);
    //Call the IR2SR_loadTemplates Function and send it the SR Template Names and Id's
    IR2SR_loadTemplates(data);
    }
    });
    });
  • Mathias_VandendriessMathias_Vandendriess Customer Adept IT Monkey ✭✭
    the IR to SR task doesn't work when I copy the code
    when I look in the debugger i get this error:
    'IR2SR_loadTemplates' is undefined

    this is the custom.js code from the latest verstion

    // Convert IR to SR-- Set permissions for the task
    app.custom.formTasks.add('Incident', null, function (formObj, viewModel) {
    formObj.boundReady(function(){
    var vm = pageForm.viewModel;
    //If the Service Request is Complete or Cancelled don't show the task
    if (vm.Status.Name == "Resolved"){
    $("li[class='link']:contains('Convert to SR')").css("display", "none");
    }
    //If the user is not an analyst, hide the task
    if (!session.user.Analyst) { 
    $( ".taskmenu li:contains('Convert to SR')" ).hide() 
    });
    return;
    });

    // Convert IR to SR-- Add the tasks to the tasks pane
    app.custom.formTasks.add('Incident', "Convert to SR", function (formObj, viewModel) {
    //Class Id for Service Requests
    var classid = "04B69835-6343-4DE2-4B19-6BE08C612989";
    //Call the Get Templates Web Service to return all Service Request Templates
    $.ajax({
    url: "/api/V3/Template/GetTemplates",
    data: {classId: classid},
    type: "GET",
    success: function (data) {
    var templatedata = JSON.stringify(data);
    //Call the IR2SR_loadTemplates Function and send it the SR Template Names and Id's
    IR2SR_loadTemplates(data);
    }
    });
    });
    nvm..
    if you only copy 1/4 of the code it's logical it won't work 
  • Stefan_BarrettStefan_Barrett Customer IT Monkey ✭
    Greetings!

    I too am having trouble.  Tried both the IR to SR Conversion and SR to IR Conversion code in our Dev env and no success.

    By contrast, I've loaded both the Portal add MA to SR code (https://community.cireson.com/discussion/58/portal-add-ma-to-sr-task) and Add Support Group Field to Portal MA Activity code (https://community.cireson.com/discussion/169/add-support-group-field-to-portal-ma-activity-form/p1) without issue (we had to update the ENUM used in the second instance), so I don't believe it is anything I'm doing incorrectly procedurally.

    We're on v7.2 of the Portal.  I haven't tried it in Prod yet as I'd like to see it work in Dev first.  We don't get errors from either of the above - just nothing.

    I've tried this with a basic analyst account, my own analyst account, and my admin account - no differences/same result.

    Thoughts?  Any help?
    Cheers!
Sign In or Register to comment.