Auto Show History

Geoff_RossGeoff_Ross Cireson Consultant Super IT Monkey ✭✭✭✭✭
This solution is already up here but buried in a thread somewhere so I thought I'd drag it out for all to see.

It removes the need to click the Show History button once the History tab is selected and just auto loads the history data instead.

Enjoy.

Geoff
Tagged:

Comments

  • seth_coussensseth_coussens Product Owner Ninja IT Monkey ✭✭✭✭
    On addition I would suggest here is having a check for the current page to see if you actually want the script dynamically loaded on that page. For instance in this example you would only want this script to load on work item pages, that way you aren't dynamically loading ALL your scripts on each page that doesn't actually utilize that code.
  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭

    One of the biggest performance complaints we get for the portal is the time it takes history to load. Especially on the older incidents. Is there a way to add that once the work item is loaded the history loads even before the user clicks the history tab?

  • Martin_BlomgrenMartin_Blomgren Customer Ninja IT Monkey ✭✭✭✭
    @Brian_Wiest

    Just remove the need to click on history tab first and the xhr request to show history will fire instantly!

    Comment out (or remove) these lines in AutoShowHistory.js
    app.custom.formTasks.add('Incident', null, function (formObj, viewModel) {
        //bind a function to the form ready event
        formObj.boundReady(function () {
      //$('a[data-cid=History]').on("click", function () { <== remove this
        pageForm.viewModel.view.loadHistory();
        $('#historyView').prev('div').hide()
       //}); <== remove this
        });
    });
  • Marek_LefekMarek_Lefek Customer Advanced IT Monkey ✭✭✭
    Is there a possibility to add this feature for closed activities?
Sign In or Register to comment.