Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/donations: Order public donations by updatedAt field (#520)
* src/donations: Order public donations by updatedAt property When automatically importing bank transfers they are all created at the same time. As we currently order public donations by createdAt field, and the query is ran on every page change, this may cause unexpected behavior such as repeating of some bank donations in different pages, or some donations not being shown. Instead use the updatedAt property which represents the exact time, donation record was added to database, or the last time its status has been updated. This should give us good approximation time of the donation itself Tests: Call the endpoint responsible for listing donations: API_URL/api/v1/donation/listPublic/?campaignId=campaignId where campaignId, is the id of the campaign in local enviroment. Public donations should be ordered by their updatedAt property * src/donations: Don't update updateAt on person/billing email changes If we are to order the donation payments by their updateAt property, it should only be changed on payment status change. Tests: Go to admin panel->Donations, Click F12 go to Network, and find the API response for the listed donations. Expand the first record and see its updatedAt property Change donor field of the first record, of listed donations. The updatedAt property of the first record, should be the same as in the previous API response. Repeat the same for the billingEmail field * src/donations: Adjusting tests
- Loading branch information