The bulk line-number and DHCP option-tag error helpers live in one shared place each #197

Closed
opened 2026-10-31 12:42:24 -04:00 by claude · 0 comments
Owner
  • Draft: BUG-14
  • Priority: low (duplicated code that must change together)
  • Agent: mechanic
  • Depends on: none
  • Decisions: none

Why

U-7 duplicated two helpers to stay inside its file list:

  • assignBulkLineNumbers in src/angular/src/app/features/filter-lists/filter-list.model.ts:146 and src/angular/src/app/features/forwarders/forwarder.model.ts:991.
  • optionTagError in dhcp-scope-form.component.ts:287 and dhcp-tag-rule-form.component.ts:327.

What changes

  • Move assignBulkLineNumbers to a new src/angular/src/app/shared/bulk-create/bulk-line-numbers.util.ts with its spec.
  • Move the tag-error text into src/angular/src/app/features/dhcp/shared/dhcp-option-rules.util.ts as a pure function taking the control errors and the protocol. The components call it.

Acceptance

  • Spec count is unchanged or higher, and all specs pass.
  • Lint and format are clean. Grep finds one definition of each.

Source

u-design.md:318 (U-7 notes).

- **Draft:** BUG-14 - **Priority:** low (duplicated code that must change together) - **Agent:** mechanic - **Depends on:** none - **Decisions:** none ### Why U-7 duplicated two helpers to stay inside its file list: - `assignBulkLineNumbers` in `src/angular/src/app/features/filter-lists/filter-list.model.ts:146` and `src/angular/src/app/features/forwarders/forwarder.model.ts:991`. - `optionTagError` in `dhcp-scope-form.component.ts:287` and `dhcp-tag-rule-form.component.ts:327`. ### What changes - Move `assignBulkLineNumbers` to a new `src/angular/src/app/shared/bulk-create/bulk-line-numbers.util.ts` with its spec. - Move the tag-error text into `src/angular/src/app/features/dhcp/shared/dhcp-option-rules.util.ts` as a pure function taking the control errors and the protocol. The components call it. ### Acceptance - [ ] Spec count is unchanged or higher, and all specs pass. - [ ] Lint and format are clean. Grep finds one definition of each. ### Source `u-design.md:318` (U-7 notes).
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lantea-one/ninlil#197
No description provided.