lightning
lightning copied to clipboard
Refactor count workorders to reuse search code
Validation Steps
$ mix test test/lightning/digest_email_worker_test.exs
Notes for the reviewer
As a continuation of #2118:
- Reuse
search_workorders_query
for counting - Reuse
search_workorders_query
to return workorders for retries (with dataclips not wiped)
Keeps same behavior as https://github.com/OpenFn/lightning/pull/2123.
Related issue
Refs #2121
Review checklist
- [x] I have performed a self-review of my code
- [x] I have verified that all appropriate authorization policies (
:owner
,:admin
,:editor
,:viewer
) have been implemented and tested - [x] If needed, I have updated the changelog
- [ ] Product has QA'd this feature