We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Related to onaio/reveal-frontend#1624
The text was updated successfully, but these errors were encountered:
Tasks affected were updated using query
WITH tasksToUpdate AS (SELECT DISTINCT task_metadata.identifier, nextVal('core.task_server_version_seq') as new_server_version FROM core.task_metadata INNER JOIN core.event ON event.json->'details'->>'taskIdentifier' = task_metadata.identifier INNER JOIN core.task ON (task_metadata.task_id = task.id AND task.json->>'status' = 'Ready' AND task.json->>'businessStatus' = 'Not Visited') WHERE task_metadata.code = 'Blood Screening'), updatedTasks AS (UPDATE core.task SET server_version = tasksToUpdate.new_server_version, json = (json || '{ "status": "Completed", "businessStatus": "Complete" }'::jsonb || json_build_object('serverVersion', tasksToUpdate.new_server_version)::jsonb) FROM tasksToUpdate WHERE tasksToUpdate.identifier = task.json->>'identifier' RETURNING task.* ) UPDATE core.task_metadata SET server_version = updatedTasks.server_version FROM updatedTasks WHERE updatedTasks.id = task_metadata.task_id RETURNING *;
Sorry, something went wrong.
Rkareko
No branches or pull requests
Related to onaio/reveal-frontend#1624
The text was updated successfully, but these errors were encountered: