[Migration] Error when sorting data after sending track event with existing user's info.

Found in

EPiServer.Profiles.Client 1.7.0

Fixed in

EPiServer.Profiles.Client 1.8.0

Created

Nov 06, 2018

Updated

May 03, 2019

State

Closed, Fixed and tested


Description

Precondition:
A "demo" user (demo@email.com) has tracking and profile in the store (data is created from version 1.6)

Steps to reproduce

1. Send track event with information data.

POST
{
  "user": {
    "name": "demo",
    "email": "demo@email.com",
    "information": {
    "Picture": "demo",
        "Website": "website.com",
        "StreetAddress": "demo",
        "Phone": "123456",
        "Mobile": "123456",
        "City": "demo",
        "State": "demo",
        "ZipCode": "123456",
        "JobTitle": "demo",
        "Company": "demo",
        "Country": "UK",
        "InferredCountry": "UK",
        "Email": "demo@email.com"
    }
  },
  "payload": {
  
  },
  "deviceId": "demo@email.com",
  "eventType": "demo",
  "value": "demo",
  "pageUri": "demo",
  "pageTitle": "demo"
}

2. Query the track event with ?$orderby.

GET {{urlProfileTrackeventsAPI}}/?$orderby=EventTime desc

Expected:
All track events are returned with the correct order.

Actual:
Returns 500 Internal Server Error.

P/S: no such issue when GET track event with $skip/$top