Skip to content

Commit 2abf9e0

Browse files
committed
Merge branch 'develop' into SWAP-5408-invite-DAU
Resolves a conflict in getInvitedProposal. develop (#1655) fixed the null handling with .first(); this branch had widened the query to cover data_access_claims alongside co_proposer_claims. Kept both: the union subquery from this branch, returning through .first().then(...) as on develop.
2 parents 511cb82 + c943ca8 commit 2abf9e0

113 files changed

Lines changed: 4946 additions & 1415 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test-build.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -424,30 +424,12 @@ jobs:
424424
path: apps/frontend/build
425425
key: frontend-build-${{ github.sha }}-${{ github.run_id }}
426426

427-
# TODO: See how to proceed with e2e caching because there is some error:
428-
# - You're caching 'node_modules' but are not caching this path: /home/runner/.cache/Cypress
429-
# - You ran 'npm install' at an earlier build step but did not persist: /home/runner/.cache/Cypress
430-
# For now it doesn't take so much time to install node_modules in the e2e because there are only few.
431-
# - name: Cache e2e node_modules
432-
# env:
433-
# CYPRESS_CACHE_FOLDER: cache/Cypress
434-
# id: cached-node-modules-e2e
435-
# uses: actions/cache@v5
436-
# with:
437-
# path: apps/e2e/node_modules
438-
# key: node-modules-${{ hashFiles('apps/e2e/package-lock.json') }}-${{ env.NODE_VERSION }}
439-
440427
- name: Install e2e dependencies
441428
env:
442429
CYPRESS_CACHE_FOLDER: .cache/Cypress
443430
if: steps.cached-node-modules-e2e.outputs.cache-hit != 'true'
444431
run: npm run install:e2e
445432

446-
- name: Download required repositories
447-
run: |
448-
cd "$GITHUB_WORKSPACE/.."
449-
git clone --depth 1 --branch "${{ needs.resolve_dep.outputs.FACTORY_TAG }}" https://github.com/UserOfficeProject/user-office-factory.git
450-
451433
- name: Login to GitHub Container Registry
452434
uses: docker/login-action@v4
453435
with:
@@ -540,6 +522,15 @@ jobs:
540522
541523
npm run e2e:after:start -- --dns-result-order=ipv4first
542524
525+
- name: Factory logs
526+
if: failure()
527+
run: |
528+
cd apps/backend
529+
echo "===== factory logs (stfc) ====="
530+
docker compose -f docker-compose-stfc.e2e.yml logs --no-color factory || true
531+
echo "===== factory logs ====="
532+
docker compose -f docker-compose.e2e.yml logs --no-color factory || true
533+
543534
- name: Upload cypres screenshots
544535
if: failure()
545536
uses: actions/upload-artifact@v6
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
DO
2+
$$
3+
DECLARE
4+
exp_safety_review_template_id_var int;
5+
BEGIN
6+
IF register_patch(
7+
'ActivateExperimentSafetyReviewTemplate.sql',
8+
'Yoganandan Pandiyan',
9+
'Mark an experiment safety review template as active when none is active.',
10+
'2026-06-08'
11+
) THEN
12+
13+
SELECT template_id
14+
INTO exp_safety_review_template_id_var
15+
FROM templates
16+
WHERE group_id = 'EXPERIMENT_SAFETY_REVIEW_TEMPLATE'
17+
AND NOT EXISTS (
18+
SELECT 1
19+
FROM active_templates
20+
WHERE group_id = 'EXPERIMENT_SAFETY_REVIEW_TEMPLATE'
21+
)
22+
ORDER BY template_id
23+
LIMIT 1;
24+
25+
IF exp_safety_review_template_id_var IS NOT NULL THEN
26+
INSERT INTO active_templates(group_id, template_id)
27+
VALUES (
28+
'EXPERIMENT_SAFETY_REVIEW_TEMPLATE',
29+
exp_safety_review_template_id_var
30+
)
31+
ON CONFLICT (group_id) DO NOTHING;
32+
END IF;
33+
34+
END IF;
35+
END;
36+
$$
37+
LANGUAGE plpgsql;

apps/backend/db_patches/db_seeds/0001_ProposalForScheduling.sql

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ BEGIN
8080
, comment_for_management
8181
, comment_for_user
8282
, notified
83-
, management_decision_submitted
83+
, management_decision_submitted
8484
, submitted
8585
)
8686
VALUES
@@ -98,11 +98,11 @@ BEGIN
9898
, NULL
9999
, NULL
100100
, true
101-
, true
102-
, true
101+
, true
102+
, true
103103
);
104104

105-
INSERT INTO instrument_has_proposals(instrument_id, proposal_pk) VALUES (1, 1);
105+
INSERT INTO instrument_has_proposals(instrument_id, proposal_pk, management_time_allocation) VALUES (1, 1, 100);
106106

107107
INSERT INTO technical_review(proposal_pk, comment, time_allocation, status, public_comment, reviewer_id, technical_review_assignee_id, instrument_id, questionary_id)
108108
VALUES (1, '', 2, 0, '', 0, 0, 1, technical_review_questionary_id_var);
@@ -122,7 +122,7 @@ BEGIN
122122
, comment_for_management
123123
, comment_for_user
124124
, notified
125-
, management_decision_submitted
125+
, management_decision_submitted
126126
, submitted
127127
)
128128
VALUES
@@ -140,11 +140,11 @@ BEGIN
140140
, NULL
141141
, NULL
142142
, true
143-
, true
144-
, true
143+
, true
144+
, true
145145
);
146146

147-
INSERT INTO instrument_has_proposals(instrument_id, proposal_pk) VALUES (2, 2);
147+
INSERT INTO instrument_has_proposals(instrument_id, proposal_pk, management_time_allocation) VALUES (2, 2, 100);
148148

149149
END;
150150
$DO$

0 commit comments

Comments
 (0)