Discussions

Ask a Question
Back to all

Historical Job Dates Not Reflected in New Charts πŸ“Š

(All jobs grouped on import date instead of original dates)

Chart Screenshot

Chart showing spike after import

Context

We've migrated ~1,000+ historical jobs from AroFlo β†’ ServiceM8.

During the import, we set each job's original date (from AroFlo) into the ServiceM8 payload so the data would chart correctly across the last ~3 years.

However, in the new Charts / Custom Reporting feature, all those jobs are showing as occurring on the single day we performed the import, creating a big spike instead of being distributed over time.

What I Did (Brief)

  • Per job, mapped AroFlo's job date β†’ ServiceM8 field we understood to be the job's date
  • Confirmed via API that the date fields were present on the record post-import

Here's a sanitised example of the payload we posted (addresses and IDs changed):

[
  {
    "uuid": "12345678-abcd-4f00-9abc-111122223333",
    "active": 1,
    "date": "2024-01-12 00:00:00",
    "job_address": "10 Example Street, Faketown NSW 2000",
    "billing_address": "10 Example Street, Faketown NSW 2000",
    "status": "Completed",
    "quote_date": "2025-09-27 11:42:19",
    "work_order_date": "0000-00-00 00:00:00",
    "work_done_description": "- Sample description...",
    "lng": 151.0000000,
    "lat": -33.9000000,
    "generated_job_id": "ABC1234",
    "completion_date": "2025-09-27 11:43:00",
    "completion_actioned_by_uuid": "99999999-aaaa-4bbb-cccc-111122223333",
    "unsuccessful_date": "0000-00-00 00:00:00",
    "payment_date": "0000-00-00 00:00:00",
    "payment_method": "",
    "payment_amount": 0,
    "payment_actioned_by_uuid": "",
    "edit_date": "2025-09-27 11:43:00",
    "geo_is_valid": 1,
    "ready_to_invoice": "0",
    "invoice_sent": false,
    "purchase_order_number": "JN-0000",
    "quote_sent": false,
    "job_description": "JN-0000 | Approved | Free Quote\n\n- previous work JN0000",
    "created_by_staff_uuid": "99999999-aaaa-4bbb-cccc-111122223333"
  }
]

The key bit: "date": "2024-01-12 00:00:00" is the original job date we need reflected in Charts.

Observed vs Expected

  • Observed: Charts aggregate those imported jobs on the import day (the day the records were created in ServiceM8), producing a single-day spike
  • Expected: Those jobs should be distributed across their original dates (e.g., 2022–2025), so trend lines and totals per month/year are accurate

Questions for the Community/Devs πŸ€”

  1. Which field(s) do the new Charts use as the "job date" for grouping/aggregation?

    • Is it created_at/system creation timestamp?
    • Or a domain field like date, requestdatetime, createddatetimeutc, completion_date, etc.?
  2. Is there a supported way to backfill or override the charting date for imported records so the historical reality is represented (e.g., setting a specific "job_created_date" or similar field that Charts honour)?

  3. If Charts intentionally use the system creation timestamp (i.e., when the record hits ServiceM8), would the team consider:

    • Allowing a field selector in Charts (e.g., "Group by this date field"), or
    • Respecting a specific imported/original date field when present, or
    • Providing an API parameter to set an "original_created_at" explicitly for migrations?

Why This Matters

Accurate historical reporting (volume trends, seasonal spikes, revenue forecasting, performance over calendar periods) depends on using the original job dates, not the import date. For anyone migrating from another platform, this significantly skews dashboards and management decisions.

Conclusion

Keen to know if I should be writing to a different field during import, or if this is something the dev team need to tweak in how Charts pick their aggregation date. Cheers! πŸ‘‹