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

Activity Definition Upsert #438

Merged
merged 4 commits into from
Nov 20, 2024
Merged

Activity Definition Upsert #438

merged 4 commits into from
Nov 20, 2024

Conversation

milt
Copy link
Member

@milt milt commented Nov 18, 2024

This PR illustrates a bug with SQL LRS where certain activity definition fields can be "forgotten" when multiple instances of an activity enter the LRS, one without a definition and one with. While the name and description fields appear to be preserved, the type field does not.

I've modified stmt-1 in the lrs tests to have an activity type to show the issue. Note that when stmt-0 (without a definition) precedes stmt-1 (with a definition), the resulting activity query is missing the type field. When it is the other way around, stmt-1 preceding stmt-0, the type field shows up.

The issue is resolved by updating the lrs lib's merge-activity function to allow updates to all definition fields, and to atomically update interaction activity fields.

@milt milt marked this pull request as ready for review November 19, 2024 12:53
@milt milt requested a review from kelvinqian00 November 20, 2024 14:33
@milt milt merged commit 11f496e into main Nov 20, 2024
16 checks passed
@milt milt deleted the activity_definition_upsert_bug branch November 20, 2024 15:20
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 this pull request may close these issues.

2 participants