Class: IssueScheduler::IssueTemplate
- Inherits:
-
Object
- Object
- IssueScheduler::IssueTemplate
- Includes:
- ActiveModel::Validations::Callbacks, ActiveModelPersistence::Persistence
- Defined in:
- lib/issue_scheduler/issue_template.rb
Overview
A template for an issue
Instance Attribute Summary collapse
-
#component ⇒ String
The JIRA component name.
-
#cron ⇒ String
A cron string that specifies when the issue should be created.
-
#description ⇒ String
The JIRA issue description.
-
#due_date ⇒ Date?
The JIRA issue due date.
-
#due_date_before_type_cast ⇒ Date, ...
readonly
private
The due_date supplied by the user since ActiveModel sets it to nil of invalid.
-
#name ⇒ String
The template name.
-
#project ⇒ String
The JIRA project name.
-
#summary ⇒ String
The JIRA issue summary.
-
#type ⇒ String
The name of the JIRA issue type.
Class Method Summary collapse
-
.primary_key ⇒ Symbol
private
Sets the primary key to ‘:name`.
Instance Attribute Details
#component ⇒ String
The JIRA component name
-
component is optional and defaults to nil
-
component may be nil but not an empty string
The component name is optional and will be set to nil if not given.
114 |
# File 'lib/issue_scheduler/issue_template.rb', line 114 attribute :component, :string, default: nil |
#cron ⇒ String
A cron string that specifies when the issue should be created
-
cron must be present
-
cron must be a valid cron string
73 |
# File 'lib/issue_scheduler/issue_template.rb', line 73 attribute :cron, :string |
#description ⇒ String
The JIRA issue description
-
description is optional and defaults to nil
-
description may be nil but not an empty string
145 |
# File 'lib/issue_scheduler/issue_template.rb', line 145 attribute :description, :string, default: nil |
#due_date ⇒ Date?
The JIRA issue due date
-
due_date is optional and defaults to nil
-
If non-nil, due_date must be a Date object or parsable by Date.parse
177 |
# File 'lib/issue_scheduler/issue_template.rb', line 177 attribute :due_date, :date |
#due_date_before_type_cast ⇒ Date, ... (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
The due_date supplied by the user since ActiveModel sets it to nil of invalid
200 201 202 |
# File 'lib/issue_scheduler/issue_template.rb', line 200 def due_date_before_type_cast @due_date_before_type_cast end |
#name ⇒ String
The template name
-
name must not be present
-
name must be unique across all IssueTemplate objects
54 |
# File 'lib/issue_scheduler/issue_template.rb', line 54 attribute :name, :string |
#project ⇒ String
The JIRA project name
-
project must be present
-
project is upcased
92 |
# File 'lib/issue_scheduler/issue_template.rb', line 92 attribute :project, :string |
#summary ⇒ String
The JIRA issue summary
-
summary must be present
129 |
# File 'lib/issue_scheduler/issue_template.rb', line 129 attribute :summary, :string |
#type ⇒ String
The name of the JIRA issue type
-
type is optional and defaults to nil
-
type may be nil but not an empty string
161 |
# File 'lib/issue_scheduler/issue_template.rb', line 161 attribute :type, :string, default: nil |
Class Method Details
.primary_key ⇒ Symbol
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Sets the primary key to ‘:name`
193 194 195 |
# File 'lib/issue_scheduler/issue_template.rb', line 193 def self.primary_key :name end |