I have a readonly jira:customField with a value function that derives its value from other fields on the issue.
When a user views an issue, the value function seems to get called, and the value is populated.
What is the correct way to populate all existing issues with the appropriate value without “visiting” each issue separately?
There may be many issues, possibly thousands, that currently do not have a value. What is the correct way to do this without being throttled or being a bad Forge citizen?
I have tried doing something with the app lifecycle installed/updated events, but it didn’t seem to get called (possibly an error on my part).
Any code examples would be very much appreciated.
You can use the Async Events API to run jobs in the background, such as backfilling custom field data. There are some code examples on the page.
Please make sure you read through the Retry Events section on that page, as jobs may be rate-limited or otherwise fail.
With the app lifecycle events not working, could you provide me with your manifest file so I can take a look at the configuration?
Sorry for the delay in replying.
Thanks for the tip about the Async Event API.
I discovered that I had made a typo in the manifest and have resolved that issue.
Thanks for your support.
How do you resolve this issue？@dbush
Do you mean how did I populate the issues?
As this was an internal app, I created a web trigger which when called searched for issues without the field populated and then looped through the first 50 doing the update.
Calling this web trigger multiple times eventually updated all the issues.
Bit of a hack but it was a pragmatic solution at the time.
Hope this helps.