====== #156 — Task-Created Installations Default to Fiber as Installation Type (Resolved) ====== [[wiki:manara:bugs|← Back to Manara Bugs]] · [[https://mantis.matrixdn.net/view.php?id=156|View issue #156 in MantisBT]] ---- **Reported by:** Khaled Tarabay on 2026-08-01T08:53:58+01:00\\ **Assigned to:** Claude\\ **Resolved by:** Claude on 2026-08-01T10:13:54+01:00\\ **Severity:** major\\ **Priority:** normal\\ **Reproducibility:** always\\ **Category:** General **Description:** right now when you create a task with a job type as installation the installation entry in the installation tab defaults to installation type as fiber, right now there is no other option in the task creation when your job type is installation to choose installation type whether it is fiber or wireless, so what you should do right now is that you should add an option that when the job type in the task creation form is installation, you add an installation job type exclusive field which is "Installation Type" which should be required and the options are Fiber or Wireless, and it shouldn't appear when the job type is maintenance **Resolution:** FIXED (verified live). WHAT: Creating a task with Job type = Installation always produced an installation whose type was Fiber, with no way to choose Wireless. WHERE: app/views/tasks/form.php; public/assets/js/main.js; app/controllers/TaskController.php (validate + createLinkedFieldJob + formOptions). WHY: createLinkedFieldJob() set the auto-created installation's type via InstallationType::defaultId() (the lowest id = Fiber), and the task form had no field to pick it. FIX: Added a required "Installation Type" (Fiber / Wireless) select to the task create form, shown only when Job type = Installation (a main.js toggle keyed on the Job type select; server-side validation requires it only for a new installation task, so a maintenance task never shows or needs it). The chosen installation_type_id is threaded into createLinkedFieldJob(), which now uses it instead of the Fiber default (falling back to the default only if somehow absent). installation_types was already seeded exactly Fiber + Wireless. VERIFIED (throwaway MySQL): a task installation created with Wireless chosen produced an installation with the Wireless type (not Fiber), customer-backed as expected. PHPUnit 29/29. DEPLOY: no schema change for this item on its own (installation_types already seeded); it ships in the same batch as migration 079 (required for #154/#155). ===== Activity / Notes ===== * **2026-08-01T10:13:52+01:00 - Claude:** FIXED (verified live). WHAT: Creating a task with Job type = Installation always produced an installation whose type was Fiber, with no way to choose Wireless. WHERE: app/views/tasks/form.php; public/assets/js/main.js; app/controllers/TaskController.php (validate + createLinkedFieldJob + formOptions). WHY: createLinkedFieldJob() set the auto-created installation's type via InstallationType::defaultId() (the lowest id = Fiber), and the task form had no field to pick it. FIX: Added a required "Installation Type" (Fiber / Wireless) select to the task create form, shown only when Job type = Installation (a main.js toggle keyed on the Job type select; server-side validation requires it only for a new installation task, so a maintenance task never shows or needs it). The chosen installation_type_id is threaded into createLinkedFieldJob(), which now uses it instead of the Fiber default (falling back to the default only if somehow absent). installation_types was already seeded exactly Fiber + Wireless. VERIFIED (throwaway MySQL): a task installation created with Wireless chosen produced an installation with the Wireless type (not Fiber), customer-backed as expected. PHPUnit 29/29. DEPLOY: no schema change for this item on its own (installation_types already seeded); it ships in the same batch as migration 079 (required for #154/#155). ===== Full History ===== ^ Date ^ User ^ Field ^ Change ^ | 2026-08-01T08:53:59+01:00 | Khaled Tarabay | issue-new | New Issue | | 2026-08-01T10:13:47+01:00 | Claude | Assigned To | => Claudine | | 2026-08-01T10:13:50+01:00 | Claude | tag-added | Tag Attached: done-by-claude | | 2026-08-01T10:13:52+01:00 | Claude | note-added | Note Added: 0000114 | | 2026-08-01T10:13:54+01:00 | Claude | Status | new => resolved | ---- Synced automatically from MantisBT issue #156.