Closes #21168: Fix Application Service cloning to preserve parent object #429

Closed
opened 2026-04-05 16:32:06 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @pheus on 2/2/2026

Fixes: #21168

Thanks for taking the time to review this PR!

When creating multiple application services from a parent object context, the parent fields are pre-filled on the initial form, but clicking Create & Add another clears them. This makes adding several services to the same parent unnecessarily repetitive.

This change adds parent_object_type and parent_object_id to the service form’s clone_fields, so the parent context is preserved between consecutive creations and object cloning behaves more consistently for models that reference a parent object.

*Originally created by @pheus on 2/2/2026* ### Fixes: #21168 Thanks for taking the time to review this PR! When creating multiple application services from a parent object context, the parent fields are pre-filled on the initial form, but clicking **Create & Add another** clears them. This makes adding several services to the same parent unnecessarily repetitive. This change adds `parent_object_type` and `parent_object_id` to the service form’s `clone_fields`, so the parent context is preserved between consecutive creations and object cloning behaves more consistently for models that reference a parent object.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#429