Skip to content

Commit

Permalink
Merge pull request #272 from Opetushallitus/feature/OPHKIOS-96
Browse files Browse the repository at this point in the history
Add is_transfered to participant
  • Loading branch information
lket authored Dec 18, 2024
2 parents 79ee8fb + e5e7417 commit c61393b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion resources/yki/queries.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,8 @@ SELECT
r.kind,
r.original_exam_session_id,
oed.exam_date AS original_exam_date,
(r.state = 'COMPLETED' AND (r.original_exam_session_id IS NULL OR current_date < '2025-01-01'::date)) AS is_transferable
(r.state = 'COMPLETED' AND (r.original_exam_session_id IS NULL OR current_date < '2025-01-01'::date)) AS is_transferable,
(r.original_exam_session_id IS NOT NULL) AS is_transfered
FROM exam_session es
INNER JOIN registration r ON es.id = r.exam_session_id
LEFT JOIN exam_session oes ON oes.id = r.original_exam_session_id
Expand Down
4 changes: 4 additions & 0 deletions test/resources/participants.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"participants": [
{
"is_transferable": true,
"is_transfered": false,
"form": {
"post_office": "Ankkalinna",
"ssn": "301079-900U",
Expand All @@ -26,6 +27,7 @@
},
{
"is_transferable": true,
"is_transfered": false,
"form": {
"post_office": "Ankkalinna",
"ssn": "010199-9012",
Expand All @@ -51,6 +53,7 @@
},
{
"is_transferable": true,
"is_transfered": false,
"form": {
"post_office": "Ankkalinna",
"ssn": "301079-083N",
Expand All @@ -75,6 +78,7 @@
},
{
"is_transferable": false,
"is_transfered": false,
"form": {
"post_office": "Ankkalinna",
"ssn": "301079-900U",
Expand Down

0 comments on commit c61393b

Please sign in to comment.