You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cb645f9
Browse filesBrowse the repository at this point in the historyBrowse files
Merged steps-history: every step gets the person history rows Rock's step save hook writes, in Rock's Steps history category, with a new invariant that checks them (decision 134). All three packages pass verify on Rock 21.0.2
Copy file name to clipboardExpand all lines: docs/decisions.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,6 +175,7 @@ The design is in [Steps](steps.md). The adult Discipleship Path and the Student
175
175
| 117 | 2026-10-22 | A student's baptism (decision 87) is planned with the Student Path. 60% of the students with a Follow Jesus decision are baptized here on the first baptism Sunday at least two weeks after it, when that Sunday has come by the install day. 10% of the other students are baptized here on a baptism Sunday after they started coming to the student service. A student is 12 or older when baptized, and a Baptism Date in a Cast file is kept. Both rates are shares, counted as in decision 116. The adult rates in decision 107 are unchanged and count only adults. | A decision and a baptism tell one story, with time between them to talk with a leader. A recent decision waits for the next baptism Sunday, as it does in a real church. Students are not adults, so the adults' 60% stays where it was. |
176
176
| 118 | 2026-10-22 | A child whose household file sets a graduation keeps that graduation year in the loader past age 17, so attendance checks them in by grade until they graduate. Jasmine Washington's file now says she graduated this past May, as a relative date, so she checks in to the student service through her senior year and has completed the Student Path. | The loader derived a grade only for ages 5 to 17, so Jasmine had no graduation year in the loader and no check-ins, though her notes say she sang on the student worship team. A relative date keeps "this past May" true on any install day. Only a file that sets a graduation keeps it, so no one else changes. |
177
177
| 119 | 2026-10-22 | A Cast story can name the student events a person went to, by season and by how many years back from the latest one held by the install day, or say they took a step and let the usual rules date it. The load fails when a story cannot hold. A Cast person's step expectations name the programs they must have completed, by key (`programCompletions`), in place of a yes or no for one program. | "Last summer's camp" must stay true on any install day. With two programs, a yes or no cannot say which program a person completed. |
178
+
| 134 | 2026-10-23 | Every step has the person history Rock's step save hook writes. One "Added" row with the step's name and campus is dated the day the step started. A step that started In Progress and was completed later also has its status change and completion date on the day it was completed, and a step that ended has its end date on the day it ended. | The person's History tab shows each step the way a church that recorded it in Rock sees it, so person pages look real in demos. |
Copy file name to clipboardExpand all lines: docs/roadmap.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,11 +78,10 @@ Ideas we agreed on but set aside for later. Move an item into "Next" when we pic
78
78
79
79
Both step programs are built (see [Steps](steps.md)). These ideas from its "Later" section wait for other work or a reason to pick them up. Keep the two lists in step.
80
80
81
-
1.**Person history.** Rock's step save hook adds a line to the person's History tab for each new step. The loader does not write those yet, as it does not for group memberships.
82
-
2.**eRA steps** in Rock's Core Steps program, from the attendance the data already has.
83
-
3.**Links to learning and events.** Foundations links to a learning class, and Student Camp and Mission Trip to a registration, once learning (LMS) and event registrations are built.
84
-
4.**Student small groups,** which would add a group step to the Student Path.
85
-
5.**Step workflows,** such as a follow-up after a baptism.
81
+
1.**eRA steps** in Rock's Core Steps program, from the attendance the data already has.
82
+
2.**Links to learning and events.** Foundations links to a learning class, and Student Camp and Mission Trip to a registration, once learning (LMS) and event registrations are built.
83
+
3.**Student small groups,** which would add a group step to the Student Path.
84
+
4.**Step workflows,** such as a follow-up after a baptism.
Copy file name to clipboardExpand all lines: docs/steps.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,9 +139,10 @@ A student's baptism goes on the Discipleship Path's Baptism step, with the Bapti
139
139
-**Other students.** 10% of the other students are baptized here on a baptism Sunday after they started coming to the student service.
140
140
-**Rules.** A student is 12 or older when baptized. A Baptism Date in a Cast file is kept as it is. The adult rates above are unchanged, because students are not adults.
141
141
142
-
## Campus and program completions
142
+
## Campus, history, and program completions
143
143
144
144
-**Campus.** Every step's campus is the person's campus, and every step is on their primary alias.
145
+
-**Person history.** Every step has the History tab line Rock's step save hook writes: "Added" with the step's name and campus on the day it started (decision 134). A step that started In Progress and was completed later (a class, or a Pending volunteer who became Active) also has its status change and completion date on the day it was completed. A step that ended has its end date on the day it ended.
145
146
-**Program completions.** A person whose Complete steps cover every step type in a program gets a completion for that program, the way Rock's Update Step Program Completions job records it: from their earliest Complete step's start to their latest Complete step's completion. Every step of theirs in the program, In Progress ones too, points at it. Rock's job finds nothing to add after install, in either program.
146
147
147
148
## How many
@@ -222,4 +223,3 @@ Jasmine's household file now sets her graduation as a relative date, this past M
222
223
-**Links to learning and events.** When learning (LMS) and event registrations are built, Foundations can link to a learning class, and Student Camp and Mission Trip to a registration.
223
224
-**Student small groups,** which would add a group step to the Student Path.
224
225
-**Step workflows,** such as a follow-up after a baptism.
225
-
-**Person history.** Rock's step save hook adds a line to the person's History tab for each new step. The loader does not write those yet, as it does not for group memberships.
Copy file name to clipboardExpand all lines: docs/verification.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -137,6 +137,7 @@ It runs the checks below for every dataset. A full run takes about 5 minutes.
137
137
|`baptism-step-agrees-with-baptism-date`| The Baptism step and the Baptism Date attribute always agree, and Baptized Here matches on the step and the person. |
138
138
|`serve-step-follows-starting-point`| Rock's prerequisite: every Serve step has a Starting Point Class completed before it. |
139
139
|`give-step-agrees-with-journey-stage`| A giver Rock shows as Consistent has an open Give step, and an open Give step belongs to a Consistent or Occasional giver. |
140
+
|`step-has-its-person-history`| Every step has one "Added" line on its person's History tab, dated the day it started, and a step completed after it started has its status change. Every step history line points at a step of that person. |
140
141
|`program-completions-follow-rocks-rule`| Rock's Update Step Program Completions job finds nothing to add or fix after install, in any program the dataset has steps in. |
141
142
|`student-step-belongs-to-a-student`| Every Student Path step belongs to someone in grades 7 to 12 on its start who had checked in to the student service by then. Mission Trip is high school only, and Student Leader is juniors and seniors only. |
142
143
|`student-path-decisions-and-leaders`| Follow Jesus and Student Leader happen at most once per person. Student Leader ends at graduation in May, or stays open while the student is still in school. |
Copy file name to clipboardExpand all lines: validation/invariants.sql
+29Lines changed: 29 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -275,6 +275,35 @@ WHERE [s].[ForeignKey] = @ForeignKey
275
275
OR ISNULL( [s].[CampusId], 0 ) <> ISNULL( [p].[PrimaryCampusId], 0 )
276
276
OR [s].[PersonAliasId] <> [p].[PrimaryAliasId] );
277
277
278
+
-- check: step-has-its-person-history
279
+
-- why: Rock's step save hook writes person history: one "Added" row per step on the day it was made, and a status change on the day a step that started In Progress was completed. The person's History tab shows each step.
280
+
WITH [StepHistory] AS (
281
+
SELECT [h].*
282
+
FROM [History] AS [h]
283
+
INNER JOIN [Category] AS [c] ON [c].[Id] = [h].[CategoryId]
284
+
WHERE [h].[ForeignKey] = @ForeignKey AND [c].[Guid] ='517BB2D3-0A50-4132-818E-63BB3C81EAE9'
285
+
)
286
+
SELECT ( SELECTCOUNT(*)
287
+
FROM [Step] AS [s]
288
+
INNER JOIN [StepType] AS [st] ON [st].[Id] = [s].[StepTypeId]
289
+
INNER JOIN [PersonAlias] AS [pa] ON [pa].[Id] = [s].[PersonAliasId]
290
+
WHERE [s].[ForeignKey] = @ForeignKey
291
+
AND ( SELECTCOUNT(*) FROM [StepHistory] AS [h]
292
+
WHERE [h].[RelatedEntityId] = [s].[Id] AND [h].[EntityId] = [pa].[PersonId] AND [h].[Verb] ='STEPADDED'
293
+
AND [h].[ValueName] = [st].[Name] AND [h].[CreatedDateTime] = [s].[StartDateTime] ) <>1 )
294
+
+ ( SELECTCOUNT(*)
295
+
FROM [Step] AS [s]
296
+
INNER JOIN [PersonAlias] AS [pa] ON [pa].[Id] = [s].[PersonAliasId]
297
+
WHERE [s].[ForeignKey] = @ForeignKey AND [s].[CompletedDateTime] > [s].[StartDateTime]
298
+
AND NOT EXISTS ( SELECT1FROM [StepHistory] AS [h]
299
+
WHERE [h].[RelatedEntityId] = [s].[Id] AND [h].[EntityId] = [pa].[PersonId] AND [h].[Verb] ='MODIFY'
300
+
AND [h].[ValueName] ='Step Status'AND [h].[CreatedDateTime] = [s].[CompletedDateTime] ) )
301
+
+ ( SELECTCOUNT(*)
302
+
FROM [StepHistory] AS [h]
303
+
WHERE NOT EXISTS ( SELECT1FROM [Step] AS [s]
304
+
INNER JOIN [PersonAlias] AS [pa] ON [pa].[Id] = [s].[PersonAliasId]
305
+
WHERE [s].[Id] = [h].[RelatedEntityId] AND [pa].[PersonId] = [h].[EntityId] ) );
306
+
278
307
-- check: baptism-step-agrees-with-baptism-date
279
308
-- why: The Baptism step and Rock's Baptism Date person attribute always agree, and the step's Baptized Here matches the person's.
0 commit comments