ZT-558 · Permitting: revised plans reach an open Permitting block
| Status | Done (2026-11-10); first real revision still to be watched |
| Ticket | ZT-558 |
| Requested by | Michael Lowry (Permitting chat review, Oct 14 – Nov 6; Natalie's Oct 16 report); scope extended by KAJ Jacobs's Permitting click review (2026-11-06, items 5 and 9) |
| Made by | KAJ Jacobs (Albatross audit data: field 2026-11-09 18:13 UTC; controls 20:45–22:51 UTC). Asked by Michael Lowry. |
| Date made | 2026-11-09 |
| Sections affected | 07 · Permitting; 05 · Design and engineering (Plan Set, Engineering Stamps) |
| Project types | Residential and Battery Only (both use the Permitting block). R&R has its own Permitting block and isn't affected (see ZT-563). |
Decisions (KAJ Jacobs, 2026-11-06)
- Why the Oct 16 autos were archived: Resurface Permitting Block (auto) and Revision Received – Ready to Resubmit (auto), built Oct 16 on the Permit Submission task and archived Oct 19, were archived because KAJ likely just wanted to use different controls. There was no deeper problem with them to design around. They tried to bring revisions back to Permitting while a permit was pending. No other control covers this; ZT-558 replaces them at block level (Flag Revision for Open Permitting (auto) and Revised Plans Received (auto)).
- Landing status confirmed: a revision lands at Review Revision and Resubmit, or Review As-Built and Resubmit once installation has started. Natalie's confirmation is no longer needed.
- Keep the as-built branch: Revised As-Built Plans Received (auto) and the Engineering Stamps / Plan Set Flag autos cover Open As-Built (auto) / Open As-Built Permit (auto) too, not only revisions.
- Open Permit Submission tasks after Reject Plan Set: leave them as they are. They wait in their task queue for the new plans.
- Build order: build after ZT-573 (its new Populate Revision (auto) / Populate As-Built (auto) conditions).
Request
When Engineering finishes revised plans while the job's Permitting block is still open, nothing reaches Permitting: no block opens, the open block doesn't move and nobody is told. Natalie's team finds out from a tech or the AHJ. KAJ moves the block by hand today (28324: restamp completed Oct 7, block moved by hand Oct 16).
Separately, Reject Plan Set sends the job back to Engineering but leaves the Permitting block in its submission queue, so the team keeps seeing a job that's with Engineering.
Proposed solution
- Plan Set and Engineering Stamps stamp a new project date, Revised Plans Ready for Permitting, when revised plans are done and a Permitting block is already open (the "else" branch of the four creators).
- A new Permitting auto, Revised Plans Received (auto), moves the open block to Review Revision and Resubmit and clears the date. A banner is the fallback.
- Reject Plan Set also parks the block at Pending Permit Revision, and step 2 releases it from there (click review, item 5).
Review
Checked against production through Phoenix on 2026-11-06 (see the click review, items 5 and 9, and the ZT-558 evidence). No new Phoenix queries were made for this record.
- Why revisions are dropped: all four creators of a revision Permitting block include
not [There is an Active Permitting Block]:- Engineering Stamps: Reopen Permitting (auto) (549) and Open As-Built (auto) (548).
- Plan Set: Reopen Permitting (auto) (311) and Open As-Built Permit (auto) (331).
- The guard stops duplicate blocks (ZT-503), but there is no "else". Pending All Permits Approved is ON HOLD, and 28324 shows the guard still blocks at that status, so the rule counts ON HOLD blocks as active. That means a block parked at Pending Permit Revision also counts, which this design relies on (Open Phoenix check 1).
- KAJ's Oct 16 attempt: Resurface Permitting Block (auto) (1338) and Revision Received – Ready to Resubmit (auto) (1339) were built on the Permit Submission task and archived Oct 19 (Untracked in the changelog). A task-level auto fires once per task, and a block with no open task can't host it. This design puts the trigger on the Permitting block and uses a project date as the hand-off, so it works whatever tasks exist. KAJ confirmed there was no deeper problem: he likely just wanted to use different controls (decision 1).
- Statuses and controls (Permitting block):
- Pending Permit Revision is an existing ON HOLD status on the Permitting Hold queue (7-day SLA). 2 live blocks (8856 and 16047, both on Finalized projects and handled by ZT-562). No control sets or leaves it today.
- Reject Plan Set (591): condition is Plan Set Rejected by Permitting, Permit Rejection Reason and Permit Rejection Notes filled, with no status check. Actions: project → Pending Engineering Review; creates Scope Review at Ready for Rework Review. Block unchanged. Once it parks the block, the three fields stay filled, so the button stays enabled and a second click would create a second Scope Review. The checklist adds "not at Pending Permit Revision".
- Section doc 07 (generated before Oct 29) lists Reject Plan Set as not placed on any screen section, but the team uses it. Open Phoenix check 4.
- The new autos move a block that already exists. The Begin … Permit (auto) controls have already fired on it, so no new Permit Submission tasks are created. The team uses the open task or adds one by hand, as they do after Permit Rejected - Resubmit today. Clicking Submitted on a task moves the block back to Pending All Permits Approved.
- Set Ready for Permit (auto) and Create PPCR Task (auto) run on block creation, so moving an existing block doesn't re-send "Engineering Complete" or create another PPCR task. That's better than opening a second block.
- Rework Type (overlap with ZT-573):
- ZT-573 changes Populate Revision (auto) so it fills Rework Type = Post-Approval Revision on any open block once the project's All Permits Approved is filled and Installation Started is empty (and Populate As-Built (auto) = As-Built once installation has started).
- A block moved to Review Revision and Resubmit by this change is therefore handled correctly: a first-time block (project All Permits Approved still empty) keeps Rework Type blank and finishes as a first-time approval; a block on a project that already had permits approved gets Post-Approval Revision. That's right.
- If this were built before ZT-573, today's Populate Revision (auto) (condition: block at Review Revision and Resubmit only) could fire on a first-time block. Rework Type = Post-Approval Revision then disables Permits Complete, and Post-Approval Revision Approved only sets the Permitting date, so the project All Permits Approved (OSC 666) and the closer/setter "Permit Approved" notice would be missed. Build after ZT-573 (decision 5).
- Downstream blocks: none created. Plan Set and Engineering Stamps gain one auto each that only sets a project date. Open Inspection after As-Built Approved (auto) and Create Install into NRTBS (auto) are unchanged.
- Go-live risk (auto controls on existing blocks): a new auto has never fired on any existing Plan Set or Engineering Stamps block. If its condition is loose, it fires on every old block that matches the next time the project is saved. Reopen Permitting (auto) 311 and 549 have no status rule (doc 05 notes), so a straight copy would fire on old QC Passed / Complete blocks of every project with an open Permitting block and a past rework to Permitting, and move those blocks to review. The checklist therefore adds a status rule: Engineering Stamps at Restamp (as 548 has) and Plan Set at Ready for Revision QC (as 331 has). Open Phoenix check 2 counts what would match at go-live.
- Once per block: each new auto fires once per block. A second revision on the same open Permitting block needs the run flag reset. The checklist has Revised Plans Received (auto) reset itself as its last action; the ZT-531 test showed a reset that didn't re-fire, so the banner is the fallback and step 15 tests a second revision. Plan Set and Engineering Stamps have the same limit: Open Phoenix check 3.
- Fields: one new project Date field, Revised Plans Ready for Permitting, on Project Milestones. Nothing reads it today. Rules to create: it IS NOT NULL, and two block-status IN rules.
There is an Active Permitting Blockand(Project) Custom Field: Project Milestones-Installation Started IS NOT NULLare global.(Project) Custom Field: Project Milestones-Installation Started IS NULLis local to Permitting, which is where it's used. - Work queues:
- A moved block shows in Review Revision and Resubmit or Review As-Built and Resubmit (2-day SLA).
- A rejected plan set shows in Permitting Hold (7-day SLA) instead of the submission queue. Reject Plan Set also sets the project to Pending Engineering Review; Permitting queues only show projects whose status base is ACTIVE (ZT-565), so the block may not show in Permitting Hold while it's with Engineering. That's acceptable: Engineering owns it then.
- Open Permit Submission tasks are unaffected and stay in their task queues (decision 4).
- Customer and rep messages: none added. When the team resubmits, SMS - Permit Submitted (auto) doesn't re-send (it skips if All Permits Approved is filled or the text was already sent).
- Projects in flight: the new date is empty on every project at go-live, so nothing moves until the next revision, apart from the go-live risk above. Revisions already dropped (like 28324) are not caught retroactively. Open Phoenix check 5 lists any that are still waiting. The 2 blocks at Pending Permit Revision are on Finalized projects and are closed by ZT-562.
- Money and integrations: none directly. Through Rework Type, the build order matters for the project All Permits Approved milestone (see above). No NetSuite, Enphase, Vivint or Send to… actions.
- Reporting: Review Revision and Resubmit counts go up (revisions that were invisible are now counted). Pending Permit Revision starts being used. Revised Plans Ready for Permitting gives a date to measure Engineering-to-Permitting hand-off time.
- Other observation (not in scope): Revision QC Passed - No Stamps (546), a Plan Set button, creates Permitting at Review Revision and Resubmit; doc 05 doesn't list the active-Permitting guard on it. If it has none, it creates a duplicate block (ZT-503). Open Phoenix check 6.
Admin checklist
Before you start
- Decided (KAJ, 2026-11-06): a revision lands at Review Revision and Resubmit, or Review As-Built and Resubmit once installation has started.
- Build after ZT-573 (its new Populate Revision (auto) / Populate As-Built (auto) conditions). Otherwise a first-time block moved here can get Rework Type = Post-Approval Revision and lose the project All Permits Approved stamp.
- Run Open Phoenix check 2 (ask Claude) to confirm the new Plan Set and Engineering Stamps autos won't fire on old blocks at go-live. Done 2026-11-06: 0 matches. Re-check just before the build if it's more than a week later.
Field
- Create project field Revised Plans Ready for Permitting (Date) and add it to the Project Milestones section, read-only.
Rules
- Create rule
(Project) Custom Field: Project Milestones-Revised Plans Ready for Permitting IS NOT NULL(global). - Create rule
(Process Block: Permitting) System Data: Process Block Object Status IN Submission Prep, Ready to Submit Permit, Not Ready to Submit, Pending All Permits Approved, Pending Permit Revision, Review Revision and Resubmit (Fail if none exist = false). - Create rule
(Process Block: Permitting) System Data: Process Block Object Status EQUAL Pending Permit Revision (Fail if none exist = false).
Engineering Stamps
- Create auto control Flag Revision for Open Permitting (auto). Condition: copy the rules of Open As-Built (auto) without
(Project) Custom Field: Project Milestones-Installation Started IS NOT NULL, and withThere is an Active Permitting Blocktrue (not negated). Keep(Process Block: Engineering Stamps) System Data: Process Block Object Status EQUAL Restamp (Fail if none exist = false),(Process Block: Scope Review) Custom Field: Rework-Post-Rework Flow IN Permittingand the stamps-uploaded group. Action: set Revised Plans Ready for Permitting (new field, OSC assigned when created) = now. Place it in Automatic Controls.
Plan Set
- Create auto control Flag Revision for Open Permitting (auto). Condition: copy the rules of Open As-Built Permit (auto) (Ready for Revision QC, Post-Rework Flow = Permitting, QC pass, stamps not required, not holding for install) without the top-level
(Project) Custom Field: Project Milestones-Installation Started IS NOT NULL(keep the copy inside the "not holding for install" group), and withThere is an Active Permitting Blocktrue. Action: set Revised Plans Ready for Permitting (new field) = now. Place it in Automatic Controls.
Permitting
- Create auto control Revised Plans Received (auto), tick Allow Reset Run Flag. Condition: step 5 rule AND step 6 rule AND
(Project) Custom Field: Project Milestones-Installation Started IS NULL. Actions, in order: (a) block status → Review Revision and Resubmit; (b) clear Revised Plans Ready for Permitting (new field); (c) Reset Other Control: Revised Plans Received (auto). - Create auto control Revised As-Built Plans Received (auto), tick Allow Reset Run Flag. Condition: step 5 rule AND step 6 rule AND
(Project) Custom Field: Project Milestones-Installation Started IS NOT NULL. Actions, in order: (a) block status → Review As-Built and Resubmit; (b) clear Revised Plans Ready for Permitting; (c) Reset Other Control: Revised As-Built Plans Received (auto). - Edit Reject Plan Set: add action block status → Pending Permit Revision (after the existing actions), and add the step 7 rule to its condition as NOT. Place it on Permit Details: it isn't on any screen section today.
- Create a Banner Revised plans received on Permitting. Condition: step 5 rule. Text: "Engineering finished revised plans on [date]. If this block hasn't moved to Review Revision / Review As-Built, post in the Permitting chat so KAJ can move it." Place it at the top of Permit Details. Place the two autos from steps 10 and 11 in Automatic Controls.
Test on 28349 (no staging run: Michael Lowry, 2026-11-06)
- With the Permitting block at Pending All Permits Approved and installation not started, complete a revision restamp on Engineering Stamps. The date is stamped, the block moves to Review Revision and Resubmit and the date is cleared. Rework Type stays blank if the project's All Permits Approved is empty.
- Do a second revision on the same project. The block moves again. If it doesn't, the banner shows: tell Claude (the reset doesn't re-fire, as in ZT-531).
- Click Reject Plan Set: the block goes to Pending Permit Revision and the button turns grey. Complete the revised plan set in Plan Set: the block moves to Review Revision and Resubmit.
- Cancel the test Scope Review, Plan Set / Engineering Stamps blocks and tasks created on 28349, and clear the test date.
New SOP
Permitting team
- Revised plans from Engineering now land in Review Revision and Resubmit (or Review As-Built and Resubmit after installation) even when the job's permit is still pending. Work them from that queue.
- The block keeps its existing Permit Submission tasks. Use the open task for the resubmission, or add one if the permit was already approved, then click Submitted as usual.
- When the plan set is wrong, click Reject Plan Set. The block moves to Pending Permit Revision (Permitting Hold queue) and leaves your submission queue. Leave any open Permit Submission task as it is. When Engineering sends the new plans, the block comes back to Review Revision and Resubmit by itself.
- If you see the Revised plans received banner on a block that didn't move, post in the Permitting chat.
Engineering: no change. Finish revisions as today.
KAJ: moving blocks by hand for revised plans should stop; only banner cases need a hand move.
Rollback
- Archive the two Flag Revision for Open Permitting (auto) controls, Revised Plans Received (auto), Revised As-Built Plans Received (auto) and the banner.
- On Reject Plan Set, remove the Pending Permit Revision action and the NOT rule. Move any block left at Pending Permit Revision back by hand.
- The field and rules can stay; they do nothing when unused.
Open Phoenix checks
Checked against production through Phoenix on 2026-11-06.
- Answered: yes.
There is an Active Permitting Block(rule 689, global) is a block-status IN rule on Permitting (not R&R Permitting) over Submission Prep, Not Ready to Submit, Pending All Permits Approved, Pending Permit Revision, Pending Stamps, Ready to Submit Permit, Review As-Built and Resubmit and Review Revision and Resubmit. All three ON HOLD statuses count. Only All Permits Approved, No Permit Required and Canceled don't. - Answered: 0 at go-live. Only one Engineering Stamps block is at Restamp (28125, Finalization) and two Plan Sets are at Ready for Revision QC (17416 and 27202, both Canceled projects). None of them has an active Permitting block, so neither Flag auto matches anything today.
- Answered: none of 311, 549, 331 or 548 has Allow Reset Run Flag, and no control resets them. There's nothing to copy. Each revision normally opens a new Plan Set and Engineering Stamps block (the projects in check 5 have 3 to 8 Scope Reviews each), so once per block is enough for the Flag autos.
- Answered: Reject Plan Set (591) is not placed on any screen section, and it's not repeatable. Step 12 must place it.
- Answered: 5 projects have an open Permitting block at Pending All Permits Approved whose Plan Set reached QC Passed and Engineering Stamps reached Complete after the block last moved: 26513 (done Nov 4; block last moved Oct 26), 26684 (Nov 3; Oct 28), 27501 (Oct 28; Sep 29), 28247 (Nov 4; Oct 30), 28954 (Nov 5; Oct 29). Each had a recent Scope Review, so they look like dropped revisions. Post-Rework Flow wasn't readable on those Scope Reviews, so KAJ should confirm each before moving it by hand.
- Answered: no guard. Revision QC Passed - No Stamps (546) has no
There is an Active Permitting Blockrule. Its actions are Plan Set → QC Passed, create Permitting at Review Revision and Resubmit, and create NEM Application at Resubmit. Clicked while a Permitting block is open, it creates a duplicate. That belongs to ZT-503; not changed here. - Answered (all local to their block, so usable on the new controls there):
- Stamps uploaded (548, Engineering Stamps): (NOT
(Process Block: Scope Review) Custom Field: Review Details-Engineering Stamps Required IN ElectricalOR (that rule AND(Process Block: Engineering Stamps) Custom Field: Plan Set Stamps-Electrical Firm IS NOT NULL,…-Electrical Stamp Uploaded IS NOT NULL,…-Electrical Stamp Provided By IS NOT NULL)) AND (NOT(Process Block: Scope Review) Custom Field: Review Details-Engineering Stamps Required IN StructuralOR (that rule AND…-Structural Firm IS NOT NULL,…-Structural Stamp Uploaded IS NOT NULL,…-Structural Engineering Letter Uploaded IS NOT NULL,…-Structural Stamp Provided By IS NOT NULL)). Status rule:(Process Block: Engineering Stamps) System Data: Process Block Object Status EQUAL Restamp (Fail if none exist = false); flow rule:(Process Block: Scope Review) Custom Field: Rework-Post-Rework Flow IN Permitting. - QC pass (331, Plan Set):
(Process Block: Plan Set) Custom Field: Quality Control Details-All Bill of Materials Verified IS NOT NULLAND…-All Bill of Materials Verified By IS NOT NULLAND…-Quality Control Completed IS NOT NULLAND…-Quality Control Completed By IS NOT NULLAND…-Quality Control Result IS NOT NULLAND (…-Quality Control Result EQUAL PassOR (…-Quality Control Result EQUAL Pass with FeedbackAND…-Quality Control Feedback IS NOT NULLAND…-Quality Control Feedback Category IS NOT NULL)). Also on 331:(Process Block: Plan Set) System Data: Process Block Object Status EQUAL Ready for Revision QC (Fail if none exist = false),(Process Block: Scope Review) Custom Field: Rework-Post-Rework Flow EQUAL Permitting, NOT(Process Block: Scope Review) Custom Field: Review Details-Engineering Stamps Required IN Structural, Electrical(stamps not required), and the "not holding for install" group NOT (All Permits ApprovedAND (NEM Application ApprovedORNEM Pre-Approval) AND NOTInstallation VerifiedANDInstallation StartedAND NOTSent to Permitting EarlyAND (NOTElectrical Service Change RequiredORESC Complete)). The Installation Started rule to drop is(Project) Custom Field: Project Milestones-Installation Started IS NOT NULL(it appears once outside that group; keep the copy inside the group).
- Stamps uploaded (548, Engineering Stamps): (NOT
Checklist changed by the Phoenix check: step 3 is answered (0 matches at go-live). Step 9 now says to keep the Installation Started rule inside the "not holding for install" group and drop only the top-level one. Step 12 now places Reject Plan Set on Permit Details (it isn't placed today). (Step numbers above are after the renumbering below.)
Checklist changed by KAJ's decisions (2026-11-06): step 1 is decided (landing statuses); the old step 2 (record why the Oct 16 autos were archived) is removed, since the reason was only a preference for different controls; the build-order step now says "after ZT-573". Steps 3 onwards moved up by one.
Config check
- Build change, 2026-11-09 (KAJ): the four new autos (steps 8–11) are built auto + timed and placed in each block's Automatic Controls. On 11/09, new auto-only controls on Permitting didn't fire on a click or a save (ZT-573). ZT-565's auto + timed alert did fire on the nightly run. So revised plans reach Permitting by the next morning instead of instantly. Tests 14–16 are replaced by a next-day check of the new field, the banner and real revisions. Field Revised Plans Ready for Permitting created 2026-11-09.
- Built 2026-11-09 (KAJ via Chrome), checked in Phoenix.
- Field Revised Plans Ready for Permitting is on Project Milestones, read-only.
- Rules for steps 5–7 exist.
- Flag Revision for Open Permitting (auto) exists on Engineering Stamps and on Plan Set: auto + timed, placed. Their conditions match Open As-Built (auto) and Open As-Built Permit (auto), with the active-Permitting check flipped.
- Revised Plans Received (auto) and Revised As-Built Plans Received (auto) exist: auto + timed + Allow Reset, placed.
- Reject Plan Set now also parks the block at Pending Permit Revision and is placed on Permit Details.
- The Revised plans received banner exists.
- Not built: the self-reset steps 10(c) and 11(c). A control can't reset itself, so a second revision on the same block only shows the banner.
- Left for KAJ: drag the banner to the top of Permit Details. Rename the unused duplicate rule (same description as step 6, built with R&R statuses) to "DO NOT USE".
- Go-live check, 2026-11-09: only 28954 has an Engineering Stamps or Plan Set block at a revision status alongside an open Permitting block, so tonight's run can move at most that one block. 28954 is on this ticket's dropped-revision list. Move the others (26513, 26684, 27501, 28247) by hand if they're still waiting.
- Pre-existing gap: Open As-Built Permit (auto) on Plan Set isn't placed on any section. Left as is.
- Overnight check, 2026-11-10: nothing to act on yet. 28954's Plan Set is at Restamp, not Ready for Revision QC, so it didn't qualify (the 11/09 go-live count was too broad). The autos are timed and placed. Confirm on the first real revision.
- Duplicate rules not renamed (2026-11-10): the Global Requirements page doesn't show rule ids, so the unused copies can't be told apart from the ones in use. Left as is. They're unused and harmless, but when picking these rules in the builder, check the id in Phoenix afterwards.
- Proven on 28349, 2026-11-10 (SOP screenshot run): a revision QC pass on Plan Set filled Revised Plans Ready for Permitting. Revised Plans Received (auto) then opened the Permitting block at Review Revision and Resubmit and cleared the date in the same save. Later Revised As-Built Plans Received (auto) moved it to Review As-Built and Resubmit. So the Revised plans received banner only shows when those autos fail, as designed. The test blocks were canceled and 28349 was restored; the original Permitting block stays the main one.
Config check, 2026-11-10 (Claude, Phoenix): pass, with one intended difference.
- Field (step 4): pass. Revised Plans Ready for Permitting (Date, OSC 9568) is on Project Milestones, read-only.
- Rules (steps 5–7): pass. All three exist as global rules.
- Engineering Stamps, Flag Revision for Open Permitting (auto) (1633, step 8): pass. Auto + timed. Restamp status, Post-Rework Flow = Permitting, There is an Active Permitting Block (not negated) and the stamps-uploaded group; no Installation Started rule. Sets OSC 9568 = now. In Automatic Controls.
- Plan Set, Flag Revision for Open Permitting (auto) (1634, step 9): pass. Auto + timed. Same rules as Open As-Built Permit (auto) with the top-level Installation Started rule dropped (the copy inside "not holding for install" kept) and There is an Active Permitting Block true. Sets OSC 9568 = now. In Automatic Controls.
- Revised Plans Received (auto) (1635) and Revised As-Built Plans Received (auto) (1636), steps 10–11: pass except (c). Auto + timed, Allow Reset Run Flag ticked, conditions as written, actions (a) status → Review Revision and Resubmit / Review As-Built and Resubmit and (b) clear OSC 9568. Placed in Automatic Controls.
- Intended difference (KAJ, 2026-11-10): action (c), Reset Other Control on itself, isn't built, because a control can't reset itself (see above). Each auto moves a given Permitting block once; a second revision on the same block falls back to the Revised plans received banner.
- Reject Plan Set (591, step 12): pass. Adds block → Pending Permit Revision after the existing actions and NOT the step 7 rule. Now placed on Permit Details.
- Banner Revised plans received (1637, step 13): pass. Condition: the step 5 rule. At the top of Permit Details. Text says to see the field on Project Milestones in place of "[date]".
- Knock-on: since go-live the new autos have been evaluated on saves and the nightly run (1633: 11 projects, 1634: 16, 1635/1636: 36) with no unexpected fires. 1636 fired once, on test project 28349 (2026-11-10 19:01 UTC). The 5 projects from check 5 (26513, 26684, 27501, 28247, 28954) aren't caught retroactively; KAJ to confirm and move them by hand.
- Extras in the same window, not part of this ticket: Scope Review Site Visit Canceled - Return to Engineering (auto) (Brendan Fillmore, 11/09 19:34 UTC) and R&R | Roof Contract Contract Signed / Missing Fields for R&R (KAJ, 11/10). Left out of this record at KAJ's request.