Skip to content

Closes #85, #120: Add module support to SupportContractAssignment#125

Merged
DanSheps merged 2 commits into
DanSheps:mainfrom
jsenecal:feature/85-120-module-assignment
Dec 11, 2025
Merged

Closes #85, #120: Add module support to SupportContractAssignment#125
DanSheps merged 2 commits into
DanSheps:mainfrom
jsenecal:feature/85-120-module-assignment

Conversation

@jsenecal
Copy link
Copy Markdown
Collaborator

Summary

  • Add module FK to SupportContractAssignment model, allowing support contracts to be assigned to hardware modules (linecards)
  • Form uses TabbedGroups with "Hardware" (device + module) and "License" tabs
  • Module filters device choices dynamically via query_params
  • Auto-populate device from module.device or license.device when applicable
  • Validate device matches module.device and license.device when both are set

Changes

  • Model: Add module FK with on_delete=SET_NULL
  • Form: TabbedGroups UI, DynamicModelChoiceField for module with device filtering
  • Migration: 0015_supportcontractassignment_module.py
  • API: Add module to serializer with nested ModuleSerializer
  • GraphQL: Add module field to SupportContractAssignmentType
  • Filterset: Add module_id and module (by serial) filters
  • Table: Add module_name and module_serial columns
  • Filter Form: Add module_id field
  • Template: Removed custom template, using NetBox's native fieldset/TabbedGroups rendering
  • Tests: Added module assignment tests for API and filtersets

@DanSheps DanSheps enabled auto-merge December 11, 2025 15:17
@DanSheps DanSheps self-requested a review December 11, 2025 15:17
@jsenecal

This comment was marked as resolved.

…ctAssignment

Add ability to assign support contracts to hardware modules (linecards),
extending the existing device assignment functionality.

Changes:
- Add `module` FK to SupportContractAssignment model
- Form uses TabbedGroups with "Hardware" (device + module) and "License" tabs
- Module filters device choices via query_params
- Auto-populate device from module.device or license.device
- Validate device matches module.device and license.device when both set
- Add module to API serializer, GraphQL type, filterset, table, and filter form
- Remove custom template in favor of NetBox's native fieldset rendering
auto-merge was automatically disabled December 11, 2025 15:42

Head branch was pushed to by a user without write access

@jsenecal jsenecal force-pushed the feature/85-120-module-assignment branch from 87d6a19 to 3e9a351 Compare December 11, 2025 15:42
@DanSheps DanSheps merged commit b0bdaec into DanSheps:main Dec 11, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants