Skip to content

Commit

Permalink
squash to test data patch
Browse files Browse the repository at this point in the history
  • Loading branch information
ammopt committed Nov 13, 2024
1 parent e803074 commit 74f1cda
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion code/web/sys/DBMaintenance/community_engagement_updates.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,30 @@ function getCommunityEngagementUpdates() {
('Campaign 3: Past', 'This is a test campaign', '2022-01-01 00:00:00', '2022-01-31 00:00:00'),
('Campaign 4: Long future', 'This is a test campaign in the long future ', '2026-01-01 00:00:00', '2028-01-31 00:00:00'),
('Campaign 5: Active', 'This is a test campaign', '2022-01-01 00:00:00', '2028-01-31 00:00:00'),
('Campaign 6: Upcoming', 'This is an upcoming test campaign (as of Nov 2024)', '2024-11-30 00:00:00', '2024-12-30 00:00:00')",
('Campaign 6: Upcoming', 'This is an upcoming test campaign (as of Nov 2024)', '2024-11-30 00:00:00', '2024-12-30 00:00:00'),
('Campaign 7: Not accessible to CPL', 'Campaign not accessible to CPL', '2024-11-02 00:00:00', '2026-12-30 00:00:00')",
# Enroll user 3 (ktd cardnumber: 42) to some campaigns
"INSERT INTO ce_user_campaign (userId, campaignId, enrollmentDate) VALUES
(3, 5, '2024-11-06 16:55:26'),
(3, 2, '2024-11-06 16:55:26')",
# Grant library access to campaigns (libraryId: 2 = Koha's Centerville)
"INSERT INTO ce_campaign_library_access (campaignId, libraryId) VALUES
(1, 2),
(2, 2),
(3, 2),
(4, 2),
(5, 2),
(6, 2),
(7, 3)",
# Grant patron type access to campaigns (patronTypeId: 8 = 'S' Koha's Staff category)
"INSERT INTO ce_campaign_patron_type_access (campaignId, patronTypeId) VALUES
(1, 8),
(2, 8),
(3, 8),
(4, 8),
(5, 8),
(6, 8),
(7, 3)",
# Insert milestones
"INSERT INTO ce_milestone (name, conditionalField, conditionalValue, conditionalOperator, milestoneType, campaignId) VALUES
('Milestone 1: checkout with condition', 'title_display', 'Title', 'equals', 'user_checkout', 1),
Expand Down

0 comments on commit 74f1cda

Please sign in to comment.