Created
April 13, 2016 13:18
-
-
Save zindel/e67d95bc63866d133f573273a50d554c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upgrade-enrollment: | |
type: form | |
entity: study_enrollment | |
title: Upgrade Enrollment | |
submit_button: Upgrade | |
input: | |
- study_enrollment[has-new-version] | |
value: | | |
{ | |
current := top(study_enrollment.filter(id()=$study_enrollment)) | |
.study_version.__title__, | |
new := top(study_enrollment.filter(id()=$study_enrollment)) | |
.study_version.study | |
.active_version.__title__ | |
} | |
fields: | |
- value_key: current | |
label: Current Version | |
read_only: true | |
- value_key: new | |
label: New Version | |
read_only: true | |
query: | | |
/do( | |
$new := top(study_enrollment.filter(id()=$study_enrollment)) | |
.study_version.study | |
.active_version.id(), | |
$id := migrate_study_enrollment($study_enrollment, $new), | |
{id := $id} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment