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

When time traveling, Quality-time only shows historical measurements for metrics in the current report #3722

Closed
fniessink opened this issue Apr 15, 2022 · 0 comments · Fixed by #3735
Assignees
Labels
Bug Something isn't working

Comments

@fniessink
Copy link
Member

The endpoint /api/v3/subject/<subject_uuid>/measurements calls metrics_of_subject() which doesn't look at the report date passed:

def metrics_of_subject(database: Database, subject_uuid: SubjectId) -> list[MetricId]:
    """Return all metric uuid's for one subject, without the entities, except for the most recent one."""
    report_filter: dict = {f"subjects.{subject_uuid}": DOES_EXIST, "last": True}
    projection: dict = {"_id": False, f"subjects.{subject_uuid}.metrics": True}
    report = database.reports.find_one(report_filter, projection=projection)
    return list(report["subjects"][subject_uuid]["metrics"].keys())
@fniessink fniessink added the Bug Something isn't working label Apr 15, 2022
@fniessink fniessink self-assigned this Apr 15, 2022
fniessink added a commit that referenced this issue Apr 20, 2022
…ltiple dates, Quality-time would use the latest report to decide which metrics to retrieve the measurements for, instead of the report at the date shown. Fixes #3722.
fniessink added a commit that referenced this issue Apr 21, 2022
…ltiple dates, Quality-time would use the latest report to decide which metrics to retrieve the measurements for, instead of the report at the date shown. Fixes #3722.
fniessink added a commit that referenced this issue Apr 21, 2022
…u… (#3735)

When showing a historic report in combination with measurements at multiple dates, Quality-time would use the latest report to decide which metrics to retrieve the measurements for, instead of the report at the date shown. Fixes #3722.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant