Follow-up from "Add mutation for AlertManagementAlert status"
The following discussions from !30576 (merged) should be addressed:
-
@splattael commented on a discussion: (+1 comment) Note, we are moving away from
statuses
tostate_machine
in !30505 (merged).We could use
status_keys
here then:return error_response('Invalid status') unless AlertManagement::Alert.status_keys.include? (status.to_s)
-
@splattael started a discussion: Just double-checking if this still will work after !30505 (merged) is merged.
🤔 I wonder if we should use the transitions (e.g
alert.resolve
) rather than the setting the status directly?/cc @ck3g for visibility
-
@splattael started a discussion: Non-blocking: We should pass
current_user
here and check their permission again - just to be safe.
Edited by Peter Leitzen