Module: Central::Support::StoryConcern::Validations

Extended by:
ActiveSupport::Concern
Defined in:
lib/central/support/concerns/story_concern/validations.rb

Instance Method Summary collapse

Instance Method Details

#bug_chore_estimationObject



37
38
39
40
41
# File 'lib/central/support/concerns/story_concern/validations.rb', line 37

def bug_chore_estimation
  if !ESTIMABLE_TYPES.include?(story_type) && estimated?
    errors.add(:estimate, :cant_estimate)
  end
end

#estimable?Boolean Also known as: estimable

Returns true if this story can have an estimate made against it

Returns:

  • (Boolean)


32
33
34
# File 'lib/central/support/concerns/story_concern/validations.rb', line 32

def estimable?
  feature? && !estimated?
end

#estimated?Boolean Also known as: estimated

Returns true or false based on whether the story has been estimated.

Returns:

  • (Boolean)


26
27
28
# File 'lib/central/support/concerns/story_concern/validations.rb', line 26

def estimated?
  !estimate.nil?
end