ivylabs / suitecrm-analytics

4 stars 4 forks source link

Case Performance Dashboard's "Detailed Case Listing" - Sorting on the "Closed" Column can behave inconsistently if items exist with no "Closed" Date #287

Open johnM2401 opened 3 years ago

johnM2401 commented 3 years ago

Describe the bug The "Closed" column appears to sort in different ways, depending on how the panel is used, if there are items with no "Closed" date value.

For example, on initial load of the page, the Items do not get sorted by this column at all, if the "Closed" items are seperated

However, if you select "Closed" -> Sort by "Closed" Column -> Select "All Cases" The Closed Cases will be stuck to the Top/Bottom of the First/Last Page, depending on if you were Sorting ASC/DESC on "Closed"


**Component What component does this bug relate to?

  1. Dashboard - Case Performance Dashboard


**Solution File CasePerformanceDashboard.wcdf


To Reproduce Steps to reproduce the behavior, there are a few different issues, steps below:

  1. Have CRM Data that contains both Open and Closed Cases
  2. Push this to the DWH with the ./run script
  3. Open the Case Performance Dashboard
  4. Navigate to the "Detailed Case Listing" Panel
  5. Sort by the "Closed" Column, and see that the Items are not sorted. (I would expect sorting to consider the Blank items, and order the "Closed" items as appropriate)


  1. Change the Case Listing to "Closed"
  2. Sort by "Closed" column, this works as Expected
  3. Change to "All Cases"
  4. Attempt to Sort Again
  5. You can see that the Sorting does now occur on the Closed Items, but they are stuck to either the First/Last Page, depending on what Sorting Order the user was using before changing to "All Cases"


  1. Change the Case Listing to "Closed"
  2. Sort by "Closed" column, so that it is DESC
  3. Change to "All Cases"
  4. Attempt to Sort Again, this Works only on the Closed Items, and does not take the Blank items into consideration
  5. Sort by the "Created" column, this works as expected, but may scatter the "Closed" items
  6. Attempt to Sort on "Closed", this may not work now as the Closed items are again seperated.

Expected behavior The Sorting behaviour should stay consistent across all of the Parameters set.

Screenshots

On Initial Load of the Page, sorting does not change the Order nor Position of the Closed Items. (Expected that they would appear, as they would in the CRM for this scenario): image image

When "Closed" is selected, it displays as so, and sorting works as expected: image image


When the User changes back to "All", the Closed items appear at either the beginning or the end of the List, depending on whether Ascending or Descending was chosen before changing. However, neither ASC nor DESC appears to include the Blank items, which is inconsistent with how the CRM behaves image image

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

harrisward commented 3 years ago

@johnM2401 Can you send us over a zipped up mysql dump of the DB you are using so I can try and recreate the issue on our side please?

johnM2401 commented 3 years ago

Hey @harrisward ,

This should be the most recent dump of my local DB, both structure and Data: crmDB.zip

harrisward commented 3 years ago

@johnM2401 I can't extract this zip. Can you make sure its not broken please

johnM2401 commented 3 years ago

Hey @harrisward

Strange, I'm able to download & extract that .zip

Looks like Github doesn't allow uploading of .sql files, so I've attached the two .sql files as .txt files here

Are you able to download these? analyticCRMData.txt analyticCRMStructure.txt

harrisward commented 3 years ago

Looks like this could possibly be a bug with the pentaho component. Going to have to park this for now so I will disable the ability to sort the table columns for now and push the changes to master. Will revisit this ticket some other time