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

Classification started_at can be off by hours or days #7215

Open
eatyourgreens opened this issue Nov 8, 2024 · 0 comments · May be fixed by #7216
Open

Classification started_at can be off by hours or days #7215

eatyourgreens opened this issue Nov 8, 2024 · 0 comments · May be fixed by #7216

Comments

@eatyourgreens
Copy link
Contributor

eatyourgreens commented Nov 8, 2024

Expected behavior

Classification started_at times should record when a volunteer starts the first workflow task.

Current behavior

From Peter Mason on Talk:

I have seen differences in the start time (started classifying by the volunteer) and finished times (completed classification received by zooniverse) of many hours, even days.

Steps to replicate

This is pretty easy to replicate if you classify regularly on the same workflow over several days. Do some classifications on a workflow, leave the page for a few hours or days, then return to the same tab and continue classifying. Your first classification in the new session will start when your previous session ended (several hours or days ago.)

Additional information

Classification start times are set when a subject first loads in the browser. If you leave the classify page and return, the started_at time will be off by however much time elapsed between loading the subject and returning to classify it.

function createNewClassification(project, workflow, subject, goldStandardMode, lastInterventionUUID) {
// Record whether this subject was received from Sugar or from the Panoptes API.
const source = subject.metadata.intervention ? 'sugar' : 'api';
// Delete the metadata key because we don't want volunteers to see it.
subject.update({ 'metadata.intervention': undefined });
const newMetadata = {
workflow_version: workflow.version,
started_at: (new Date()).toISOString(),
user_agent: navigator.userAgent,
user_language: counterpart.getLocale(),
utc_offset: ((new Date()).getTimezoneOffset() * 60).toString(), // In seconds
subject_dimensions: (subject.locations.map(() => null)),
source
};
// record if this classification had an intervention payload directly before it
if (lastInterventionUUID) {
newMetadata.interventions = newMetadata.interventions || {};
newMetadata.interventions.uuid = lastInterventionUUID;
}
const classification = apiClient.type('classifications').create({
annotations: [],
metadata: newMetadata,
links: {
project: project.id,
workflow: workflow.id,
subjects: [subject.id]
}
});

This issue is the same issue as zooniverse/front-end-monorepo#6447. I've tried to fix it in zooniverse/front-end-monorepo#6449 by updating started_at when a volunteer starts to annotate a subject eg. by selecting a radio button for a question task or clicking a choice button for a survey task.

An alternative strategy might be to reload the subject queue, or reset the started_at time, if the queue is stale after a visibilityChange event..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant