-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathtestdata.sql
More file actions
114 lines (94 loc) · 6.44 KB
/
Copy pathtestdata.sql
File metadata and controls
114 lines (94 loc) · 6.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
-- some test data to get started developing quickly
--
-- activities
--
INSERT INTO `activities` (`id`, `name`, `needs_ticket`, `factor`) VALUES
(1, 'Backen', 0, 1),
(2, 'Kneten', 0, 1),
(3, 'Hacken', 0, 1),
(4, 'Urlauben', 0, 1);
--
-- users
--
INSERT INTO `users` (`id`, `username`, `abbr`, `type`, `jira_token`, `show_empty_line`, `suggest_time`, `show_future`, `locale`) VALUES
(1, 'i.myself', 'IMY', 'PL', NULL, 0, 1, 1, 'de'),
(2, 'tony.teamleiter', 'TTE', 'PL', NULL, 0, 1, 1, 'de'),
(3, 'sandy.supporter', 'SSU', 'DEV', NULL, 0, 1, 1, 'de'),
(4, 'eddy.entwickler', 'EEN', 'DEV', NULL, 0, 1, 1, 'de'),
(5, 'harry.hacker', 'HHA', 'DEV', NULL, 0, 1, 1, 'de');
--
-- user contracts
--
INSERT INTO `contracts` (`id`, `user_id`, `start`, `end`, `hours_0`, `hours_1`, `hours_2`, `hours_3`, `hours_4`, `hours_5`, `hours_6`) VALUES
(1, 5, '2020-01-01', NULL, 0, 8, 8, 8, 8, 8, 0),
(2, 4, '2020-01-01', NULL, 0, 7, 7, 7, 7, 7, 0),
(3, 3, '2020-01-01', NULL, 0, 8, 8, 8, 8, 6, 0),
(4, 2, '2020-01-01', NULL, 0, 6, 6, 6, 6, 4, 0);
--
-- teams
--
INSERT INTO `teams` (`id`, `name`, `lead_user_id`) VALUES
(1, 'Kuchenbäcker', 2),
(2, 'Hacker', 2);
--
-- users-to-teams
--
INSERT INTO `teams_users` (`id`, `team_id`, `user_id`) VALUES
(2, 1, 3),
(3, 1, 4),
(4, 2, 5),
(5, 1, 2),
(6, 2, 2),
(7, 1, 1),
(8, 2, 1);
--
-- customers
--
INSERT INTO `customers` (`id`, `name`, `active`, `global`) VALUES
(1, 'Der Bäcker von nebenan', 1, 0),
(2, 'Freizeit', 1, 1),
(3, 'Dark Net Society', 1, 0);
--
-- customers-to-teams
--
INSERT INTO `teams_customers` (`id`, `team_id`, `customer_id`) VALUES
(1, 2, 3),
(2, 1, 1);
--
-- projects
--
INSERT INTO `projects` (`id`, `customer_id`, `name`, `jira_id`, `ticket_system`, `active`, `global`, `estimation`, `offer`, `billing`, `cost_center`, `internal_ref`, `external_ref`, `project_lead_id`, `technical_lead_id`, `invoice`, `additional_information_from_external`, `internal_jira_project_key`, `internal_jira_ticket_system`) VALUES
(1, 3, 'Server attack', 'SA', NULL, 1, 0, 0, '0', 0, NULL, NULL, NULL, 2, 5, NULL, 0, '', 0),
(2, 1, 'Lebkuchen', 'LK', NULL, 1, 0, 0, '0', 0, NULL, NULL, NULL, 2, 3, NULL, 0, '', 0),
(3, 1, 'Donauwelle', 'DW', NULL, 1, 0, 0, '0', 0, NULL, NULL, NULL, 2, 3, NULL, 0, '', 0),
(4, 2, 'Frei haben', 'FH', NULL, 1, 1, 0, '0', 0, NULL, NULL, NULL, 2, NULL, NULL, 0, '', 0),
(5, 1, 'Bienenstich', 'BS', NULL, 1, 0, 0, '0', 0, NULL, NULL, NULL, 2, 2, NULL, 0, '', 0),
(6, 1, 'Sandkuchen', 'SK', NULL, 0, 0, 0, '0', 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, '', 0),
(7, 3, 'Phreaking', 'PHR', NULL, 1, 0, 0, '0', 0, NULL, NULL, NULL, 2, 5, NULL, 0, '', 0),
(8, 2, 'Urlaub', '', NULL, 0, 0, 0, '0', 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, '', 0);
--
-- presets
--
INSERT INTO `presets` (`id`, `name`, `customer_id`, `project_id`, `activity_id`, `description`) VALUES
(1, 'Urlaub', 2, 8, 4, 'Urlaub'),
(2, 'Kindkrank', 2, 4, 4, 'Kindkrank'),
(3, 'Sonderurlaub', 2, 8, 4, 'Sonderurlaub');
--
-- activity entries for first user
-- Using fixed date 2024-01-15 (Monday) for deterministic E2E tests
-- Server and browser time should be frozen to this date via APP_FROZEN_TIME
--
INSERT INTO `entries` (`id`, `day`, `start`, `end`, `customer_id`, `project_id`, `activity_id`, `ticket`, `worklog_id`, `description`, `duration`, `user_id`, `class`, `synced_to_ticketsystem`, `internal_jira_ticket_original_key`) VALUES
(1, '2024-01-15', '08:00:00', '08:50:00', 3, 1, 3, 'SA-1', NULL, 'Angriff auf Google', 50, 1, 1, 0, ''),
(2, '2024-01-15', '09:00:00', '10:00:00', 3, 1, 3, 'SA-2', NULL, 'Angriff auf die NSA', 60, 1, 1, 0, ''),
(3, '2024-01-15', '07:30:00', '08:00:00', 1, 2, 2, 'LK-12', NULL, 'Lebkuchen kneten und in den Ofen schieben', 30, 1, 2, 0, ''),
(4, '2024-01-15', '08:50:00', '09:00:00', 1, 2, 2, 'LK-12', NULL, 'Lebkuchen aus dem Ofen holen', 10, 1, 1, 0, ''),
(5, '2024-01-15', '10:00:00', '10:30:00', 2, 4, 4, '', NULL, 'Powernap', 30, 1, 1, 0, ''),
(6, '2024-01-15', '10:30:00', '12:00:00', 1, 5, 2, 'BS-40', NULL, 'Kuchenboden kneten', 90, 1, 1, 0, ''),
(7, '2024-01-15', '12:30:00', '15:10:00', 3, 7, 3, 'PHR-23', NULL, 'Captain Crunch tracken', 160, 1, 4, 0, ''),
-- Additional entries for January 2026 to test export with current year
(8, '2026-01-05', '09:00:00', '12:00:00', 1, 2, 1, 'LK-50', NULL, 'Lebkuchen für 2026', 180, 1, 1, 0, ''),
(9, '2026-01-05', '13:00:00', '17:00:00', 3, 1, 3, 'SA-100', NULL, 'Server hardening 2026', 240, 1, 1, 0, ''),
(10, '2026-01-10', '08:00:00', '10:00:00', 1, 5, 2, 'BS-99', NULL, 'Neuer Bienenstich', 120, 1, 1, 0, ''),
(11, '2026-01-10', '10:30:00', '12:30:00', 2, 4, 4, '', NULL, 'Ausruhen', 120, 1, 1, 0, ''),
(12, '2026-01-15', '09:00:00', '11:00:00', 3, 7, 3, 'PHR-50', NULL, 'Phreaking session', 120, 1, 1, 0, '');