-
Notifications
You must be signed in to change notification settings - Fork 258
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
Add Launch and Submission Timestamps to QR #2672
base: master
Are you sure you want to change the base?
Conversation
@@ -154,3 +159,21 @@ private fun unpackRepeatedGroups( | |||
listOf(questionnaireResponseItem) | |||
} | |||
} | |||
|
|||
/** Adds a launch timestamp as an extension to the Questionnaire Response */ |
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.
can you clarify in the doc that we only add the launch timestamp if there isn't one at the moment?
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.
or should we make this extension repeated so that each time you edit the questionnaire response it is recorded.
useful for audit purposes?
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.
OR if we really want to only keep one (to be a bit more consistent with the authored fied) we can rename this extension to lastLaunched
?
val launchTimestamp = questionnaireResponse.launchTimestamp | ||
assertThat(launchTimestamp).isNotNull() | ||
assertThat(dateTimeType).isEqualTo(launchTimestamp) |
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.
these 3 lines can be collapsed into 1. no need to check if it's not null if you're going to compare it anyway
val launchTimestamp = questionnaireResponse.launchTimestamp | ||
assertThat(launchTimestamp).isNull() |
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.
same here
val launchTimestamp = questionnaireResponse.launchTimestamp | ||
assertThat(launchTimestamp).isNotNull() | ||
assertThat(oldDateTimeType).isEqualTo(launchTimestamp) |
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.
same here
IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).
Fixes #2372
Description
Clear and concise code change description.
Alternative(s) considered
Have you considered any alternatives? And if so, why have you chosen the approach in this PR?
Type
Choose one: (Bug fix | Feature | Documentation | Testing | Code health | Builds | Releases | Other)
Screenshots (if applicable)
Checklist
./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the style guide of this project../gradlew check
and./gradlew connectedCheck
to test my changes locally.