API response (accounting) does not match file-export via web-UI

Infos:

  • Used Zammad version: 6.2.0-1711349647.bc0c70d0.bullseye
  • Used Zammad installation type: package
  • Operating system: debian
  • Browser + version: python api-call

Expected behavior:

  • identical accounted time values in api-response (accounting log) and in xlsx-export

Actual behavior:

  • exporting via web-ui delivers two values per ticket: time units total, time units
  • exporting via REST-api delivers only the value time_unit which corresponds to time units total
  • this means that the accounted time from the api response in the current month is wrong because it’s the tickets total and not the total in the given month.

Steps to reproduce the behavior:

  • have a ticket that is open for over a month with accounted values in the previous and the current month
  • download the accounting data via web-ui selected by the previous month
  • download the accounting data via web-ui selected by the current month
  • compare with the api call to api endpoint your-zammad-domain/api/v1/time_accounting/log/by_ticket/{year}/{month}

I just read a reply in another thread:
“The endpoints you referenced are for the totals of the moment you reference.”

This is bad. Assuming we have month 3 it would give us a total of say 100.
And it would give us the same value in previous months (if the ticket lived that long). Because it’s the moment of the request that counts for the total value.

If that is the case: How can I get the accounting values of the requested month via api? Ist this even possible atm.?

I coded a workaround by downloading and parsing the Excel-File via api.
Additionally I query the API (without download) to get the amount for the month and the ticket-id. The ticket id is needed to compose the direct link to the ticket.

Isn’t there a possibility to directly get the accounting values of the given month?
Any hint would be greatly appreciated. Thanks in advance!