Class: Gitlab::BackgroundMigration::FixVulnerabilitiesTransitionedFromDismissedToResolved::StateTransition

Inherits:
SecApplicationRecord show all
Defined in:
lib/gitlab/background_migration/fix_vulnerabilities_transitioned_from_dismissed_to_resolved.rb

Constant Summary

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Constants included from HasCheckConstraints

HasCheckConstraints::NOT_NULL_CHECK_PATTERN

Constants included from ResetOnColumnErrors

ResetOnColumnErrors::MAX_RESET_PERIOD

Instance Method Summary collapse

Methods inherited from SecApplicationRecord

backup_model

Methods inherited from ApplicationRecord

===, cached_column_list, #create_or_load_association, current_transaction, declarative_enum, default_select_columns, delete_all_returning, #deleted_from_database?, id_in, id_not_in, iid_in, nullable_column?, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, sharding_keys, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order

Methods included from ResetOnColumnErrors

#reset_on_union_error, #reset_on_unknown_attribute_error

Methods included from SensitiveSerializableHash

#serializable_hash

Instance Method Details

#created_before_issue_first_appeared?Boolean

Returns:

  • (Boolean)


47
48
49
# File 'lib/gitlab/background_migration/fix_vulnerabilities_transitioned_from_dismissed_to_resolved.rb', line 47

def created_before_issue_first_appeared?
  created_at.before?(FIRST_APPEARANCE_DATE)
end

#transitioned_from_dismissed_to_resolved?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/gitlab/background_migration/fix_vulnerabilities_transitioned_from_dismissed_to_resolved.rb', line 51

def transitioned_from_dismissed_to_resolved?
  from_state == 2 && to_state == 3
end