ZT-564 · Request Permit Extension: close tasks that aren't needed, and stop Inspection getting stuck

Status Done (2026-11-10); overnight auto check due 2026-11-11
Ticket ZT-564
Requested by Michael Lowry (Permitting chat review, Oct 14 – Nov 6); scope extended by KAJ Jacobs's Permitting click review (2026-11-06, item 8)
Made by KAJ Jacobs (Albatross audit data: 2026-11-09 23:53 UTC – 2026-11-10 15:57 UTC). Asked by Michael Lowry.
Date made 2026-11-09 to 2026-11-10
Sections affected 01 · Project level (Permit Expiring (auto), Request Permit Extension task); 09 · Inspection; 12 · R&R Inspection; 07 · Permitting (one rule on Permits Complete, built under ZT-573)
Project types Residential and Battery Only (project-level task and Inspection block). R&R through R&R Inspection (same task, its own Needs Permit Extension and auto).

Decisions (KAJ Jacobs, 2026-11-06)

  1. Queue for Pending Permit Extension: Not Ready to Schedule Final Inspection (14-day SLA), for both Inspection and R&R Inspection.
  2. Permit Expiring (auto) guard: use (Project) Custom Field: Project Milestones-All Permits Approved IS NOT NULL , not not There is an Active Permitting Block, so warnings carry on while a revision or as-built block is open.
  3. Close - Permit Already Finaled: a required reason is enough. All Inspections Passed isn't required.
  4. 30 days confirmed: Permits Complete needs Permit Expiration Date more than 30 days out on every approval, first-time, revision and as-built alike (ZT-573 decision 6). About 1% of recent approvals would have been blocked (Open Phoenix check 6); those need an extension first.
  5. AHJ Research note (24024): the AHJ Research task's Update Database button marks the task Complete; that's how a job leaves the AHJ research queue. Note text: "When you've updated the AHJ record, click Update Database. It completes this task and removes it from the queue." Open Phoenix check 10 found the button is called Database Updated; Conduct Research and Update Database and Review Notes and Update Database are the task's statuses, not buttons. Step 16 uses the real name.

Request

Stop extension tasks staying open when nobody needs them, stop the wrong close button from being used, and stop Inspection from being stranded at Pending Permit Extension, a status no queue shows.

Proposed solution (click review, item 8)

  1. Permit Expiring (auto): don't fire while the permit is still being worked.
  2. New task auto Expiration Date Updated (auto) closes the task once the date is more than 21 days out.
  3. Give Not Needed - Permit Finaled/Closed a condition and a clearer name.
  4. Extension Not Needed - Ready to Submit As-Built also closes the task.
  5. Put Pending Permit Extension in a queue, and let Permit Extension Complete (auto) release Inspection when the task is closed for any reason (Inspection and R&R Inspection).
  6. Permits Complete requires the expiration date more than 30 days out (task 01 builds it).
  7. Clean up the 9 parked Inspection blocks by hand.
  8. AHJ Research: a one-line note about the "updated database" button.

Review

Checked against production through Phoenix on 2026-11-06 (see the click review, item 8). No new Phoenix queries were made for this record.

Admin checklist

Before you start

  1. Check the 9 Inspection blocks at Pending Permit Extension. Cancel the Inspection block on 2303, 19789, 7397 (Canceled projects) and 12415 (Finalized). For 7746 and 21617 (task already closed), decide with the Inspection team whether the extension was granted; if so, move Inspection to Ready to Schedule Final Inspection by hand. Leave 968, 21206 and 4062 to the normal task path.
  2. Decided (KAJ, 2026-11-06): Pending Permit Extension goes in Not Ready to Schedule Final Inspection (Inspection and R&R Inspection).

Rules (create global unless noted)

  1. Create global rule (Event: Request Permit Extension) System Data: Project Event Object Status EQUAL To Do (Fail if none exist = false).
  2. Create a global copy of (Process Block: Inspection) System Data: Process Block Object Status EQUAL Pending Permit Extension (Fail if none exist = false), and of (Process Block: R&R Inspection) System Data: Process Block Object Status EQUAL Pending Permit Extension (Fail if none exist = false). The existing ones are local to Inspection and R&R Inspection.
  3. The Request Permit Extension task has no notes or reason field: create field Extension Not Needed Reason (Text) and add it to the task's Task Details section, above the buttons. Then create rule (Event: Request Permit Extension) Custom Field: Task Details-Extension Not Needed Reason IS NOT NULL .

Permit Expiring (auto) (project level)

  1. Edit Permit Expiring (auto): add (Project) Custom Field: Project Milestones-All Permits Approved IS NOT NULL (existing, global) with AND. Keep every existing rule.

Request Permit Extension task

  1. Create control Expiration Date Updated (auto) on the Request Permit Extension task: Button, auto, not timed, not repeatable. Condition: (Project) Custom Field: Project Milestones-Permit Expiration Date GREATER THAN 21 (existing, local to this task) AND the step 3 rule AND NOT the Inspection rule from step 4 AND NOT the R&R Inspection rule from step 4.
  2. Add its actions, in order: (a) set task status → Complete; (b) Reset Other Control → Permit Expiring (auto).
  3. Place it in the task's automatic-controls section (hidden from users, like other autos).
  4. Edit Not Needed - Permit Finaled/Closed: rename it Close - Permit Already Finaled, untick always-on, and set the condition to the step 3 rule AND the step 5 rule (or the existing reason/notes field's IS NOT NULL rule). Keep its action (task → Complete).
  5. Edit Extension Not Needed - Ready to Submit As-Built: add action set task status → Complete, after the existing Create block Permitting action.

Inspection and R&R Inspection

  1. Edit Permit Extension Complete (auto) on Inspection. New condition: (Process Block: Inspection) Process Block Object Status EQUAL Pending Permit Extension AND ( (Event: Request Permit Extension) Custom Field: Task Details-Permit Extension Granted IS NOT NULL OR ( NOT the step 3 rule AND NOT There is an Active Permitting Block ) ). Confirm Allow Reset Run Flag is ticked. Do the same on R&R Inspection's Permit Extension Complete (auto), with its own status rule and, in place of There is an Active Permitting Block (which only reads the Residential Permitting block), a new global rule There is an Active R&R Permitting Block: (Process Block: R&R Permitting) System Data: Process Block Object Status IN Submission Prep, Ready to Submit Permit, Pending All Permits Approved, Not Ready to Submit, Review Revision and Resubmit, Disposition Initial Work, Pending R&R Approval, Pending Roof Permit Approval, Pending Permit Revision, Fail if none exist ticked (as on rule 689).
  2. Add action Reset Other Control → Permit Extension Complete (auto) to each Needs Permit Extension: on the Inspection block, the Final Inspection event, the R&R Inspection block and the R&R Inspection event (each resets the auto on its own block).

Permits Complete (owned by ZT-573)

  1. Confirm ZT-573's checklist adds (Project) Custom Field: Project Milestones-Permit Expiration Date GREATER THAN 30 (new, global) to Permits Complete with AND, for every approval (decision 4). Don't edit Permits Complete from this ticket.

Queues and notes

  1. Add Pending Permit Extension (Inspection) and Pending Permit Extension (R&R Inspection) to the Not Ready to Schedule Final Inspection queue.
  2. On the AHJ Research task, add a Banner (no condition) next to the Database Updated button. Text: "When you've updated the AHJ record, fill in AHJ Database Fully Updated, then click Database Updated. It completes this task and removes it from the queue."

Test on 28349 (staging first, if you want, since steps 6, 7 and 12 change autos)

  1. With All Permits Approved empty, set Permit Expiration Date to 10 days out and save. No extension task is created. Clear the date.
  2. With All Permits Approved filled, set the date 10 days out: a task opens. Change the date to 60 days out and save: the task goes to Complete on its own. Set it to 10 days out again: a new task opens (proves the reset worked). If it doesn't, note it against the ZT-531 reset issue.
  3. Open Inspection, click Needs Permit Extension with the date 60 days out. The task stays open (Expiration Date Updated doesn't fire), Inspection sits at Pending Permit Extension and shows in the queue.
  4. Close - Permit Already Finaled is grey until the reason is filled. Fill it and click: task → Complete, and Inspection moves to Ready to Schedule Final Inspection.
  5. Click Needs Permit Extension again on the same block, then Permit Extension Granted on the new task: Inspection moves on again (proves step 13).
  6. Cancel the test tasks and blocks on 28349, and clear the dates you set.

New SOP

Permitting team (Request Permit Extension task)

  1. AHJ granted an extension: fill Requested, Requested By, Granted and the new Permit Expiration Date, then click Permit Extension Granted. Inspection moves on by itself.
  2. Permit is already finaled or closed by the AHJ: write the reason, then click Close - Permit Already Finaled. Don't use it if the permit still needs an extension; the job goes back to Inspection's schedule list.
  3. Installation is done and an as-built is needed instead: click Extension Not Needed - Ready to Submit As-Built. The task closes and an as-built Permitting block opens.
  4. Task opened by a typo, or after you entered a new permit: correct Permit Expiration Date. If it's more than 21 days out, the task closes by itself. You don't need to click anything.
  5. When approving a permit with Permits Complete (first-time, revision or as-built), the Permit Expiration Date must be more than 30 days out, or the button stays grey. If it expires sooner, get the extension first.

Inspection team

  1. Jobs waiting on an extension now show in Not Ready to Schedule Final Inspection at Pending Permit Extension. Chase Permitting if one sits there.
  2. When the extension task is closed, Inspection moves to Ready to Schedule Final Inspection by itself, unless an as-built permit is still in progress. Then it waits until that permit is approved.

AHJ Research (Deal Review / Permitting): when you've updated the AHJ record, fill in AHJ Database Fully Updated and click Database Updated. It completes the task and removes it from the queue (see the banner).

Reporting (heads-up, outside Albatross): about 9 Inspection jobs that were hidden at Pending Permit Extension will appear in the Not Ready to Schedule Final Inspection queue.

Rollback

  1. Remove the All Permits Approved rule from Permit Expiring (auto).
  2. Archive Expiration Date Updated (auto).
  3. Rename Close - Permit Already Finaled back to Not Needed - Permit Finaled/Closed, tick always-on and clear its condition.
  4. Remove the added task → Complete action from Extension Not Needed - Ready to Submit As-Built.
  5. Put both Permit Extension Complete (auto) conditions back to Granted AND Pending Permit Extension; remove the Reset actions from the four Needs Permit Extension buttons.
  6. Take Pending Permit Extension out of the queue. New rules and the reason field can stay; they do nothing unused.

Open Phoenix checks

Checked against production through Phoenix on 2026-11-06.

  1. Answered: Residential only. Permit Expiring (auto) (1203) is the only copy, on the Residential object type, and its two date rules are local to Residential. Battery Only and R&R have no expiry warning at all today. Not changed here; a copy for them would be a separate ticket.
  2. Answered: no reason field. Task Details has Permit Extension Requested, Requested By, Granted, two mirrors (one is the project Permit Expiration Date) and the three buttons. Step 5 applies: create Extension Not Needed Reason.
  3. Answered:
    • No status rule exists for the Request Permit Extension task. Albatross's wording for a project task status is (Event: <task>) System Data: Project Event Object Status EQUAL To Do (Fail if none exist = false) (e.g. rule 3944 on Enphase Access). Step 3 uses that wording.
    • (Process Block: Inspection) System Data: Process Block Object Status EQUAL Pending Permit Extension (Fail if none exist = false) (1363) is local to Inspection, and (Process Block: R&R Inspection) System Data: Process Block Object Status EQUAL Pending Permit Extension (Fail if none exist = false) (2332) is local to R&R Inspection. Step 4's global copies are needed.
    • There is an Active Permitting Block (689, global) reads only the Residential Permitting block, not R&R Permitting. The only R&R Permitting equivalent is (Process Block: R&R Permitting) Status IN Open Statuses (Submission Prep thru Review Revision and Resubmit, 9) (3822), local to R&R Inspection but with Fail if none exist off, so with no R&R Permitting block at all it may not read as "none active". R&R Inspection's step 12 uses a new global rule with Fail if none exist ticked instead (step 12 updated; ZT-563 needs the same rule).
    • (Project) Custom Field: Project Milestones-Permit Expiration Date GREATER THAN 21 (2977) is local to the Request Permit Extension task, as the Review says.
  4. Answered: yes. The task is in the Request Permit Extension queue (Permitting queue type, 3-day SLA, built 2026-03-19), with rows ACTIVE, ON HOLD, Finalized and To Do. So it's owned by Permitting. Pending Permit Extension (Inspection and R&R Inspection) is in no queue, as the Review says.
  5. Answered: 16 tasks are at To Do. None would close on its next save: the only one with a date more than 21 days out is 4062 (2027-02-25), and its Inspection is parked, so the NOT Inspection rule keeps it open. 21617 also still has an open task (opened Sep 10), not closed as the Review says. Open tasks on Canceled or Finalized projects: 2303, 7397, 19789, 28625, 28627 (Canceled); 2420, 4214, 12415, 19775 (Finalized). 6 Residential projects have Permit Expiration Date filled but All Permits Approved and All Inspections Passed empty (not Canceled or Finalized), and would lose the warning under step 6: 1136, 5895, 15639, 18658, 20084, 26148.
  6. Answered (90 days, not 12 months; 12 months timed out), and decided (30 days stands, decision 4): 515 Permitting blocks reached All Permits Approved in the last 90 days. Using today's Permit Expiration Date, 5 had it 30 days or less after the approval date (2 already past). So the 30-day rule would have blocked about 1%. Today's date may have been changed since, so this is an estimate.
  7. Answered (from block audit, not control history): Inspection or R&R Inspection was parked at Pending Permit Extension 110 times on 100 projects in the last 12 months, mostly a bulk move in March before Permit Expiration Date was filled. 19 of those projects now have a date more than 21 days after the park; in 1 case the date was set before the park and hasn't changed since, so it was clicked with the date already far out. The risk behind the NOT Inspection rules in step 7 is real but rare.
  8. Answered: both 247 and 1094 have Allow Reset Run Flag ticked. Only 247 is reset today (by Permit Extension Granted, which also resets 1203). Nothing resets 1094 (R&R Inspection), so a second extension on the same R&R Inspection block already strands it. Step 13's resets fix that too.
  9. Not checked (partly inferred): the rules that read the task (e.g. 1362, 2331) are set to read a project task with "order by ascending" off and "use local" off, which suggests they read the newest task, not any task. Phoenix can't confirm the behaviour; test 21 settles it.
  10. Answered: one button, Database Updated. Conduct Research and Update Database and Review Notes and Update Database are statuses of the AHJ Research task (event 67), set by Ready to Conduct Research (597) and Submit (594). The only button that sets the task to Complete is Database Updated (595), live and placed, enabled when (Event: AHJ Research) Custom Field: AHJ Details-AHJ Database Fully Updated IS NOT NULL . Step 16, the decision 5 note and the SOP now name Database Updated and say to fill AHJ Database Fully Updated first.

Checklist changed by the Phoenix check (check 10, 2026-11-06): step 16's banner names Database Updated (not the two status names) and tells the user to fill AHJ Database Fully Updated first; the SOP line matches.

Checklist changed by the Phoenix check: step 3 gives the exact wording; step 4 gives the exact descriptions; step 5 is no longer "if" (no reason field exists); step 12 adds a new global rule for an active R&R Permitting block, used on R&R Inspection.

Checklist changed by KAJ's decisions (2026-11-06): step 2 is decided (queue: Not Ready to Schedule Final Inspection) and steps 15 and the Inspection SOP name it; step 14 confirms the 30-day rule for every approval; step 16 has the AHJ Research note wording.

Config check

Config check, 2026-11-10 (Claude, Phoenix): pass.