Argus icon indicating copy to clipboard operation
Argus copied to clipboard

Discussion: How to open/close issues

Open johannaengland opened this issue 3 years ago • 1 comments

After an discussion with @lunkwill42 it was discovered that the bulk-event endpoint and the single-event endpoint have two different ways of dealing with reopening/closing incidents.

There are the functions set_open and set_closed on Incident, but they were not used at all. #579 will make the bulk-event endpoint use them.

But we will have to have a discussion on how to proceed with the single-event endpoint. The way that one currently works is first post an event and if that event is of the type close or reopen to then change the end time of the incident manually accordingly.

johannaengland avatar Feb 02 '23 10:02 johannaengland

Actually, for bulk-events it makes more sense to have a method on the queryset, and when you have that method, it is trivial to also use it for single events provided bulk has no extra magic:

Incident.objects.filter(id__in=[1,2,3, ..]).set_closed()
Incident.objects.filter(id=1).set_closed()

hmpf avatar Feb 07 '23 07:02 hmpf