Argus icon indicating copy to clipboard operation
Argus copied to clipboard

Should all the bulk magic work the same for different types of bulk changes?

Open hmpf opened this issue 1 year ago • 0 comments

BulkTicketUrlViewSet uses IncidentQuerySet.update_ticket_url() which returns a queryset of updated incidents. The viewset returns the changed ticket along with status-code and "errors" which is always None.

BulkAcknowledgementViewSet uses IncidentQyerySet.create_acks which returns a queryset of new acknowledgments. The viewset returns the ack object along with status-code and "errors" which is always None.

BulkEventViewSet uses IncidentQyerySet.create_events which returns a queryset of new events. The viewset returns the event object along with status-code and "errors" which is always None.

None of these use the "errors" for anything.

All of these make events. If we wanted to add another bulk mechanism, for instance for changing levels, should it send back a list of incidents or a list of events?

The BulkEventViewSet can be used to set any event, without any requisite changes in the incident. It can be used to create a changevent for ticket_urls, without updating the actual ticket url.

All of this is a bit of a mess.

hmpf avatar Aug 30 '24 07:08 hmpf