-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix(lib-classifier): record classification times between the first and last annotation #6449
base: master
Are you sure you want to change the base?
fix(lib-classifier): record classification times between the first and last annotation #6449
Conversation
const userLanguage = getRoot(self)?.locale | ||
if (userLanguage) { | ||
self.update({ userLanguage }) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't related to the timestamps bug but fixes the store error in #6448.
9d9cc4a
to
616ece1
Compare
c46b663
to
d6fbdbe
Compare
Tests are passing but |
Figured it out: A new, empty annotation is created when the subject first loads, so the code needs to wait until EDIT: for a survey task, annotation starts when |
function _onAnnotationsChange () { | ||
// set started at when inProgress changes from false to true | ||
if (self.inProgress) { | ||
self.setStartedAt() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you comment this out, the tests should fail.
837a0bd
to
9cf45c4
Compare
get inProgress() { | ||
let inProgress = false | ||
self.annotations.forEach(annotation => { | ||
inProgress ||= annotation._inProgress || annotation._choiceInProgress |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_choiceInProgress
is used by the survey task. All other tasks use _inProgress
.
0d754ca
to
de95e8e
Compare
- [x] Add tests for classification `started_at` and `finished_at` timestamps. - [ ] fix the failing test for classification start times.
A new, empty annotation is created when the subject first loads, so wait until `annotation._inProgress` is true before setting the classification start time.
de95e8e
to
8bed133
Compare
started_at
andfinished_at
timestamps, to catch Classification started_at is off by hours (or days) for continuous sessions in the same tab. #6447.started_at
when a volunteer first interacts with a task eg. making a choice selection for a survey, choosing an answer to a question etc. If they go straight to Done, without updating an annotation,started_at
will fall back to the old value.Please request review from
@zooniverse/frontend
team or an individual member of that team.Package
Linked Issue and/or Talk Post
How to Review
classification.metadata.started_at
should now record the time that you started a classification, proxied as the time that you first annotate a subject. You should be able to test by waiting between downloading a subject and starting a classification.It should fix cases, mentioned by Peter Mason on Talk, where project teams are finding classifications that seem to have taken hours or days, but really only took minutes.
The new tests for classification start time and duration should fail when run with the old code for
classification.metadata.started_at
.https://github.com/zooniverse/front-end-monorepo/actions/runs/11720164440/job/32644906423#step:9:5027
I've got a staging project with a variety of workflows and tasks, including drawing tasks, which now record
started_at
when you first draw on the subject:https://localhost:8080/?project=eatyourgreens/-project-testing-ground&workflow=3370
Checklist
PR Creator - Please cater the checklist to fit the review needed for your code changes.
PR Reviewer - Use the checklist during your review. Each point should be checkmarked or discussed before PR approval.
General
yarn panic && yarn bootstrap
ordocker-compose up --build
and FEM works as expectedGeneral UX
Example Staging Project: i-fancy-cats
Bug Fix