Open kylie-m opened 2 months ago
first draft designs ready for review; to share link in Slack
The template migrated for Biosecurity is not compatible with other queries.
Here is an example:
"Occurrence records have been updated since 22 Jul 2024."
This line works well for Biosecurity since Biosecurity searches records from the given check date
to today
. In this context, the value of since
is the given check date.
However, other queries have a frequency
parameter. For example, if the frequency is weekly, the query searches for records from one week before the given check date
to the given check date
. In this case, the value of since
should be one week before the given check date
.
Unfortunately, this required value is not yet stored in our database.
Additionally, some queries do not have specific start
and end
dates. Instead, they compare the current and previous check results to identify new records. In these cases, we need an alternative way to determine the value of since
.
Current "Annotation" shares the same template with 'Biocache'. "Annotation" template requires different fields with 'Biocache'.
Todo: create a new template
Issue related Biocache:
https://api.test.ala.org.au/occurrences/occurrences/search?fq=assertion_user_id:48604&dir=desc&pageSize=300
It returns my annotation, but only the annotator, but the annotation is not included
Two issues in Annotation template: 1, Cannot collect 'since when' for all queries, except Biosecurity. In other words, 'since when' is correct for Biosecurity, but for annotation, it should a week/day/month before that day, depends on the frequency.
2, Cannot collect assertion details from the query.
Thanks for flagging Bai, happy to chat more about what info we can possibly pull, and update the design/wording to suit
Confirming following our team discussion I've removed the '...since 22 Jul 2024' text
Regarding with "MyAnnotation", at this moment, we only include and check three statuses:
QA_OPEN_ISSUE = 50001; //open and unresolved issue with the data - but confirmed as a problem
QA_VERIFIED = 50002; //record has been verified by collection manager as being correct to the best of their knowledge.
QA_CORRECTED = 50003; //the record has been corrected by data custodian - the update may or may not be visible yet
Question 1: Shall we include and check the other two ? Answered: No
static final public Integer QA_NONE = 50004; //status of a record with no user assertions ??
static final public Integer QA_UNCONFIRMED = 50005;//open issue
For example, when we create a new annotation, the status code is 50005, which is not used for diff check at this moment
Question 2: Does 'My annotation' only send emails when my own annotations change? What about changes to someone else's annotations? No
Question 3: Are "My annotation" and "Annotation" using the same logic? Yes**
Whose comment should be displayed?
This record which is being used for testing
https://biocache-test.ala.org.au/occurrences/539bd9f9-95bd-47b6-b50f-bf75089b9521
Here is the annotations:
I created an annotation, and then verified by someone (myself in this case), whose comment should be displayed
https://api.test.ala.org.au/occurrences/occurrences/539bd9f9-95bd-47b6-b50f-bf75089b9521/assertions
[
{
uuid: "340d3c4e-4979-45a3-934d-77f7cc1e9b53",
dataResourceUid: "dr21662",
referenceRowKey: "539bd9f9-95bd-47b6-b50f-bf75089b9521",
name: "userAssertionOther",
code: 20019,
qaStatus: 50005,
comment: "Alert test",
userId: "48604",
userDisplayName: "Qifeng Bai",
created: "2023-11-14T04:43:35Z",
problemAsserted: false
},
{
uuid: "ebea3d0b-ac77-48fd-b599-ed919027ccee",
dataResourceUid: "dr21662",
referenceRowKey: "539bd9f9-95bd-47b6-b50f-bf75089b9521",
code: 50000,
relatedUuid: "340d3c4e-4979-45a3-934d-77f7cc1e9b53",
qaStatus: 50002,
comment: "Confirmed for alert test purpose",
userId: "48604",
userDisplayName: "Qifeng Bai",
created: "2024-10-17T03:55:43Z",
problemAsserted: false
}
]
How to test My Annotations:
Find a record - > flag an issue -> verify this issue.
Alerts only is sent after the issue has been verified
Hi Bai, the comment shown in the email should be from the second user who verifies
Here is a complicated case about My annotation (Bai's)
Bai created an annotation, Kylie verified it Kylie created another, Bai verified it
Which annotations should be presented in Alerts email:
Here is a real example in our test:
https://api.test.ala.org.au/occurrences/occurrences/539bd9f9-95bd-47b6-b50f-bf75089b9521/assertions
Current version:
@kylie-m Shall we only keep Date only in Annotation?
Looks good so far Bai, thanks for your work on this!
My thoughts - (TLDR, yes remove time, keep only date) - reasoning - If it will take a long time to format the time, or there might be usability issues with different user time zones (ie. if we pick one to display, it will exclude everyone else), then perhaps it's best to not include the time, at least for this first iteration.
Task 3: Build a template for Annotation on Data Resource****
Record for testing: ID: 1085 [New annotations on records for ClimateWatch]
It queries for: user_assertions:50005, 50003, or 50002, which differ from annotation and myAnnotation checks which query on the code is 50000 and the qaStatus values are 50001 or 50002 or 50003.
We also have other annotations for collections, occurrences, layers, etc. Some of them check the assertion codes, while others do not. Should they follow the same rules as 'Annotation' and 'MyAnnotation'?
@adam-collins Can you confirm this?
One of flagged record:
https://biocache.ala.org.au/occurrences/cc39304e-9019-42bc-b7db-51c7f6ad405d
https://biocache-ws.ala.org.au/ws/occurrences/cc39304e-9019-42bc-b7db-51c7f6ad405d
Email was sent since it has an assertion:
qaStatus: 50005,
problemAsserted: false,
code: 10007,
referenceRowKey: "cc39304e-9019-42bc-b7db-51c7f6ad405d",
created: "2024-09-25T03:36:26Z",
name: "identificationIncorrect",
userDisplayName: "Nxxxxxxx",
comment: "Wrong species",
uuid: "5384305f-99ce-45ad-8012-d6c448a0a2a1",
userId: "xxxxx"
Current Email for Annotations for records on Data Resource:
Task 4
Todo
Center the 'No images' text.
Task 5:
Issues:
[ Solved ] 1. Fetching 15 records takes 20s
Thanks Bai, as mentioned in standup, happy for you to remove the 'Show all new datasets' button (and similar buttons on other alerts) where they're not possible to implement
8: Layers
@kylie-m Using italic fonts makes the content look nicer
9. Images
Some datasets may only have 1 or two images
Tasks: [Done] 1, Build a template for MyAnnotation. Implement the algorithm for fetching and comparing annotations.
[Done] 2, Build a template for Annotation. Implement the algorithm for fetching and comparing annotations.
[Done] 3, Build a template for Annotation on Data Resource. Update query of an annotation on a species, Implement the algorithm for fetching and comparing annotations
[Done] 4, Build a template for Biocollect records, Update type of Query
[Done] 5, Build a template for Biocache records, Update type of Query
6, Build a template for Images
[ Done ] 7, Build a template for Datasets, Lists and Data resource
[ Done ]8, Build a template for Layers