Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • James 4 posts 74 karma points
    Feb 14, 2020 @ 21:15

    Dashboard not displaying current day items on Highcharts graph and instances option for view type causes error

    plumber - v1.1.12-build402 - 2020-01-24

    Umbraco 7.15.3

    Been having a couple issues with the workflow.js file.

    1. In the workflow dashboard, highcharts is not displaying items created that day.

    enter image description here

    enter image description here

    Looks like the issue is in \www\App_Plugins\Workflow\backoffice\js\workflow.js line 108[_this.range - now.diff(moment(v.completedDate), 'days')] += 1[_this.range - now.diff(moment(v.createdDate), 'days')] += 1;

    The size of and are equal to the selected date range. If v.completedDate or v.createdDate are today's date, the now.diff in days will be zero. Because of zero-indexing, these lines then try and add 1 to a non-existent item that is one beyond the last item in the array. The array then adds an extra item with NaN as the value. This causes the highchart graph to display no values. Simply subtracting 1 from the index allows the chart to be displayed but causes issues with displaying the correct dates.

    2) The dashboard gets an error if you select 'instance' from the 'view type' dropdown. This is because gets a 404 error. Looks like the url constructor is not adding a slack after instances, as returns results.

    getAllInstancesForRange: function getAllInstancesForRange(days) {
            return request('GET', urls.instances + 'range/' + days);
Please Sign in or register to post replies

Write your reply to: