You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would refrain from adding it within StudyProtocolSnapshot, because protocol snapshots right now carry an "identity" which shouldn't change if the version tag changes. However, that thinking may be a bit obsolete, I'm not 100% certain about this.
Coming to think of it. The main reason not to add anything ProtocolVersion-related to StudyProtocolSnapshot is because this object is passed to the deployments subsystem, which should be agnostic about "protocols subsystem" things like that. Lifting out tag or data from ProtocolVersion, or the full object, and adding that into StudyProtocolSnapshot introduces coupling which was intentionally decoupled.
But, I understand the need. Maybe ProtocolService.getAllForOwner should return a VersionedStudyProtocol, which contains StudyProtocolSnapshot and ProtocolVersion.
That said, with a simple additional request to ProtocolService.getVersionHistoryFor, you can currently get the tag. But, I agree that gets unnecessarily chatty if you have a lot of protocols. So the request is still valid.
I think it should be possible to make changes like this with a minor version upgrade and using JSON API migration.
In order to show it to the user in the web portal, we also need the version tag - which currently is not part of the snapshot.
See >> https://github.com/cph-cachet/carp.core-kotlin/blob/develop/carp.protocols.core/src/commonMain/kotlin/dk/cachet/carp/protocols/application/StudyProtocolSnapshot.kt
The text was updated successfully, but these errors were encountered: