Replace DurationChoices by JobIntervalChoices #10599

Closed
opened 2025-12-29 21:33:32 +01:00 by adam · 3 comments
Owner

Originally created by @alehaa on GitHub (Dec 31, 2024).

Originally assigned to: @alehaa on GitHub.

NetBox version

v4.2-beta1

Feature type

Change to existing functionality

Triage priority

I volunteer to perform this work (if approved)

Proposed functionality

During the implementation of #17716, I added the JobIntervalChoices to simplify job scheduling. At the time of writing this PR, I wasn't aware that there was already a DurationChoices in the extras module used by the script form.

I suggest replacing it with the new JobIntervalChoices and also integrating its missing choices for "12 hours" and "30 days".

Use case

Code deduplication and increasing maintainability.

Database changes

None.

External dependencies

DurationChoices has never been part of a public API, so I think there are no side effects.

Originally created by @alehaa on GitHub (Dec 31, 2024). Originally assigned to: @alehaa on GitHub. ### NetBox version v4.2-beta1 ### Feature type Change to existing functionality ### Triage priority I volunteer to perform this work (if approved) ### Proposed functionality During the implementation of #17716, I added the `JobIntervalChoices` to simplify job scheduling. At the time of writing this PR, I wasn't aware that there was already a `DurationChoices` in the extras module used by the script form. I suggest replacing it with the new `JobIntervalChoices` and also integrating its missing choices for "12 hours" and "30 days". ### Use case Code deduplication and increasing maintainability. ### Database changes None. ### External dependencies `DurationChoices` has never been part of a public API, so I think there are no side effects.
adam added the status: acceptedtype: featurecomplexity: low labels 2025-12-29 21:33:32 +01:00
adam closed this issue 2025-12-29 21:33:32 +01:00
Author
Owner

@arthanson commented on GitHub (Feb 13, 2025):

@alehaa do you want me to assign this to you?

@arthanson commented on GitHub (Feb 13, 2025): @alehaa do you want me to assign this to you?
Author
Owner

@alehaa commented on GitHub (Feb 13, 2025):

@arthanson you can assign this to me, thanks.

@alehaa commented on GitHub (Feb 13, 2025): @arthanson you can assign this to me, thanks.
Author
Owner

@arthanson commented on GitHub (Feb 13, 2025):

@alehaa assigned.

@arthanson commented on GitHub (Feb 13, 2025): @alehaa assigned.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10599