44 views

Description

When a user creates a new card with no projects or demands in the allocation workbench, the resource finder dates are not displayed sorted in chronological order.

 

Steps to Reproduce

  1. Create a card in allocation workbench such that it should not have any project/demand.
  2. Create a resource plan.
  3. Go to the resource finder, observe the shown dates jump from Jan 2019 to Aug 2018 to Nov 2019.
  4. Play with the date toggle, observe this jumbles the dates even more.

Workaround

This problem has been fixed. If you are able to upgrade, review the Fixed In section to determine the latest version with a permanent fix your instance can be upgraded to.

If a workaround is needed, this consists in two steps:

- Change the below function _getRightSideColDefs in the 'ResourceGridColumnsForTask' Script Include:

 _getRightSideColDefs: function() {
    var plans;
    var dates;
    if (this.planIdList) {
        plans = ResourceGridQueries.getAllPlansFromPlanIds(this.planIdList);
    } else {
        if (this.taskId)
            plans = ResourceGridQueries.getAllPlans(this.taskId);
    }
    var gridDates = new ResourceGridDates(this.timeSpan);
    dates = ResourceGridQueries.getTaskStartAndEndDates(this.taskId, this.sysClass);
    gridDates.setTaskDates(dates[0], dates[1]);
    var dateRanges = gridDates.getGridDateRanges(plans);
    var startAndEndDates = gridDates.dateRange.computeRange(plans);
    this.finalPivotedDateRange = startAndEndDates;
    var startDates = dateRanges.map(RMDateRangeHelper.extractStartDate());
    var columns = ResourceGridMetadata.formatPivotColumnsToAgGrid(ResourceGridMetadata.REQUESTED_DAILY_ALLOCATION_PIVOT_COLUMNS);
    columns = columns.concat(ResourceGridMetadata.formatPivotColumnsToAgGrid(ResourceGridMetadata.RESOURCE_ALLOCATION_DAILY_PIVOT_COLUMNS));

    return ResourceGridPivotColumnFormatter.formatPivotColumns(startDates, this.timeSpan, columns);
}



- Change the below function _getPivotSortArray in the 'ResourceGridColDefsService' Script Include:

_getPivotSortArray: function(col, dateRange) {
    var pivotArr = [];
    var startDateTime = new GlideDateTime(dateRange.startDate);
    var endDateTime = new GlideDateTime(dateRange.endDate);
    startDateTime.addYearsUTC(-2);
    endDateTime.addYearsUTC(2);
    if (col == 'month') {
        startDateTime.setDayOfMonthUTC(1); //set date to first day of month
        while (startDateTime.getDate() <= endDateTime.getDate()) {
            pivotArr.push(this.getMonthFromDate(startDateTime));
            startDateTime.addMonthsUTC(1);
        }
    } else if (col == 'week') {
        var rmDateRangeHelper = new RMDateRangeHelper();
        rmDateRangeHelper.resetToWeekStartAndEnd(startDateTime, endDateTime);
        while (startDateTime.getDate() <= endDateTime.getDate()) {
            pivotArr.push(startDateTime.getDate().getDisplayValue());
            startDateTime.addDaysUTC(7);
        }
    }
    return pivotArr;
}

 


Related Problem: PRB1351550

Seen In

SR - IRM - Audit Management - New York 2019 Q3
SR - IRM - GRC Profiles - Madrid 2019 Q2
SR - IRM - GRC Workbench - New York 2019 Q3
SR - IRM - PA Premium Integration - New York 2019 Q3
SR - IRM - Policy and Compliance - Madrid 2019 Q2
SR - IRM - Risk Management - New York 2019 Q3
SR - Security - Integration Framework - Madrid 2019 Q2
SR - Security - Support Orchestration - Madrid 2019 Q2
SR - SIR - Palo Alto AutoFocus Integration - New York 2019 Q3
SR - SIR - Palo Alto Firewall Integration - New York 2019 Q3
SR - SIR - Palo Alto WildFire Integration - New York 2019 Q3
SR - SIR - Security Incident Response - Madrid 2019 Q2
SR - SIR - Splunk Sighting Search Integration - Madrid 2019 Q1
SR - SIR - Store SecOps Setup Assistant - Madrid 2019 Q2
SR - SIR - Store Threat Core - Madrid 2019 Q2
SR - SIR - Store Trusted Security Circles Client - New York 2019 Q3
SR - VR - Vulnerability Response - New York 2019 Q3

Fixed In

Madrid Patch 9
New York Patch 5
Orlando

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-06-29 12:40:13
Published:2020-03-16