Bulk fetching worklogs with metadata for a forge app

I’m trying to figure out how to efficiently bulk fetch worklogs including properties/metadata (from a jql search or list of issues) with my forge app.

The /rest/api/3/search/jql endpoint allows you to bulk fetch worklogs directly from a jql search query (up to 20 per issue). However, you don’t get worklog properties (metadata) this way.

As far as I’m aware, the /issue/{issueId}/worklog endpoint (expanding the properties parameter) is the only way to get at worklog properties. You can’t pass a list of issues into this endpoint, and I’m unaware of any other bulk operations generally that will allow you to get worklogs WITH metadata in one go.

Is there an obvious way to do this? The ways I’m currently thinking are either possibly not feasible for large sets of worklogs, or quite complicated:

  • Build a custom field and silently sync worklogs in there so that the jql endpoint can retrieve the data from the field
  • Mirror the worklog data entirely in a different database and implement a customised bulk fetch api for my app to use.

I would prefer to avoid using individual /issue gets, worrying about rate limiting from async calls, etc. if possible to achieve this-- I am looking for a genuine bulk fetching solution.