message: Fixed related data loading order (lib)
diff: @@ -787,96 +787,96 @@ void User::loadUserAndRelatedDataFromJSON(
  {
  std::set<Poco::UInt64> alive;
  - if (data.isMember("projects")) {
  - Json::Value list = data["projects"];
  + if (data.isMember("workspaces")) {
  + Json::Value list = data["workspaces"];
  for (unsigned int i = 0; i < list.size(); i++) {
  - loadUserProjectFromSyncJSON(list[i], &alive);
  + loadUserWorkspaceFromJSON(list[i], &alive);
  }
  }
  if (including_related_data) {
  - deleteZombies(related.Projects, alive);
  + deleteZombies(related.Workspaces, alive);
  }
  }
  {
  std::set<Poco::UInt64> alive;
  - if (data.isMember("tags")) {
  - Json::Value list = data["tags"];
  + if (data.isMember("clients")) {
  + Json::Value list = data["clients"];
  for (unsigned int i = 0; i < list.size(); i++) {
  - loadUserTagFromJSON(list[i], &alive);
  + loadUserClientFromSyncJSON(list[i], &alive);
  }
  }
  if (including_related_data) {
  - deleteZombies(related.Tags, alive);
  + deleteZombies(related.Clients, alive);
  }
  }
  {
  std::set<Poco::UInt64> alive;
  - if (data.isMember("tasks")) {
  - Json::Value list = data["tasks"];
  + if (data.isMember("projects")) {
  + Json::Value list = data["projects"];
  for (unsigned int i = 0; i < list.size(); i++) {
  - loadUserTaskFromJSON(list[i], &alive);
  + loadUserProjectFromSyncJSON(list[i], &alive);
  }
  }
  if (including_related_data) {
  - deleteZombies(related.Tasks, alive);
  + deleteZombies(related.Projects, alive);
  }
  }
  {
  std::set<Poco::UInt64> alive;
  - if (data.isMember("time_entries")) {
  - Json::Value list = data["time_entries"];
  + if (data.isMember("tasks")) {
  + Json::Value list = data["tasks"];
  for (unsigned int i = 0; i < list.size(); i++) {
  - loadUserTimeEntryFromJSON(list[i], &alive);
  + loadUserTaskFromJSON(list[i], &alive);
  }
  }
  if (including_related_data) {
  - deleteZombies(related.TimeEntries, alive);
  + deleteZombies(related.Tasks, alive);
  }
  }
  {
  std::set<Poco::UInt64> alive;
  - if (data.isMember("workspaces")) {
  - Json::Value list = data["workspaces"];
  + if (data.isMember("tags")) {
  + Json::Value list = data["tags"];
  for (unsigned int i = 0; i < list.size(); i++) {
  - loadUserWorkspaceFromJSON(list[i], &alive);
  + loadUserTagFromJSON(list[i], &alive);
  }
  }
  if (including_related_data) {
  - deleteZombies(related.Workspaces, alive);
  + deleteZombies(related.Tags, alive);
  }
  }
  {
  std::set<Poco::UInt64> alive;
  - if (data.isMember("clients")) {
  - Json::Value list = data["clients"];
  + if (data.isMember("time_entries")) {
  + Json::Value list = data["time_entries"];
  for (unsigned int i = 0; i < list.size(); i++) {
  - loadUserClientFromSyncJSON(list[i], &alive);
  + loadUserTimeEntryFromJSON(list[i], &alive);
  }
  }
  if (including_related_data) {
  - deleteZombies(related.Clients, alive);
  + deleteZombies(related.TimeEntries, alive);
  }
  }
  }
  