Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emails for My Annotation may have some records which do not have comments(annotations) #346

Open
qifeng-bai opened this issue Dec 20, 2024 · 6 comments
Assignees
Milestone

Comments

@qifeng-bai
Copy link
Contributor

However, it always shows the "verified" annotations.

Reason:
The diffService of MyAnnotation and Annotation share the same algorithm at this moment. It detect different type of annotations, including: 'open_assertions', 'verified_assertions', 'corrected_assertions'

However, MyAnnotation only asks and displays 'verfied_assertions', so if 'I' make an 'open' or 'corrected' assertions on a record, the record will be collected and put it into the alerts email.

todo:
Modify the diffService of MyAnnotation to find only 'verified_assertions'

@qifeng-bai qifeng-bai self-assigned this Dec 20, 2024
@qifeng-bai qifeng-bai added this to the 4.4.0 milestone Dec 20, 2024
@qifeng-bai
Copy link
Contributor Author

qifeng-bai commented Dec 20, 2024

Based on this query:
https://api.ala.org.au/occurrences/occurrences/search?fq=assertion_user_id:953&dir=desc&pageSize=300

Assume A and B both subscribe MyAnnotation alerts

Case 1: fixed
If A flag a record (not verification), A will receive an alert email with empty comment

Case 2: fixed
If A flag a record (not verification), and B verified, B will receive an alert email with B's verified comment.

Case 3: fixed
A will also receive the alert email which contains this record without comments
because 1), A flagged an issue which is collected by diffService.
2), Someone else's comment are filtered out by method: filterMyAssertions(assertions, userId)

Proposal:
A should receive an alert email when someone verifies A's flag

@qifeng-bai
Copy link
Contributor Author

Test cases have been built

@kylie-m
Copy link

kylie-m commented Jan 8, 2025

Thanks Bai, I'll do a final run through on test and let you know how it goes

@qifeng-bai
Copy link
Contributor Author

qifeng-bai commented Jan 9, 2025

A potential bug on multiple annotations:
Case:
User A made one Assertion - called it "Assertion_1" on a record, User B verified it - called it as "Verification_1", the record will be identified and email will be sent to User A

And then
User A made another Assertion - called it "Assertion_2" on a record, User B verified it - called it as "Verification_2", the record will also be identified. In this case, current algorithm will find "two" verified assertions.

The current algorithm does not have the ability identify whether those 'verified assertions' have been notified to User A

Current solution:
Sorted verified assertions with created date (Latest is first), and then only show the first verified assertions

@kylie-m
Copy link

kylie-m commented Jan 9, 2025

Confirming I just received a scheduled hourly My Annotations on test with a second verification comment (Verification_2) on the first (and only) flag. The verification 2 comment shows in the My Annotations email, and also the regular Annotations email.

Next test case I'll try: a second flag, with verification

@kylie-m
Copy link

kylie-m commented Jan 9, 2025

Confirming I just received the My Annotations email with the first verification on a second flag.

Screenshot 2025-01-10 at 10 56 00 am

for reference, the flagged record is: https://biocache-test.ala.org.au/occurrences/e52f68ea-a058-45a2-bc2c-0feca9ac2e7a

qifeng-bai added a commit that referenced this issue Jan 12, 2025
qifeng-bai added a commit that referenced this issue Jan 12, 2025
Thus, my annotation email always displays the latest assertions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants