Class: LWS::Ticket::Ticket

Inherits:
Generic::Model show all
Defined in:
lib/lws/apps/ticket.rb

Overview

The ticket class

Instance Attribute Summary collapse

Attributes inherited from Generic::Model

#created_at, #id, #updated_at, #url, #url_html

Method Summary

Methods inherited from Generic::Model

#deep_dup, #dig, #reload, #rollback, #save

Instance Attribute Details

#accountLWS::Auth::Account

Returns the account of the user that created the ticket.

Returns:



178
# File 'lib/lws/apps/ticket.rb', line 178

belongs_to :account, class_name: "LWS::Auth::Account"

#account_idInteger

Returns the ID of the account of the user that created the ticket.

Returns:

  • (Integer)

    the ID of the account of the user that created the ticket



183
# File 'lib/lws/apps/ticket.rb', line 183

attribute :account_id

#assigneeLWS::Auth::Account?

Returns the account of the user that the ticket is assigned to.

Returns:



188
189
# File 'lib/lws/apps/ticket.rb', line 188

belongs_to :assignee, class_name: "LWS::Auth::Account",
uri: "accounts/:id"

#assignee_idInteger?

Returns the ID of the account of the user that the ticket is assigned to.

Returns:

  • (Integer, nil)

    the ID of the account of the user that the ticket is assigned to



194
# File 'lib/lws/apps/ticket.rb', line 194

attribute :assignee_id

#companyLWS::Auth::Company

Returns the company of the user that created the ticket.

Returns:



199
# File 'lib/lws/apps/ticket.rb', line 199

belongs_to :company, class_name: "LWS::Auth::Company"

#company_idInteger

Returns the ID of the company of the user that created the ticket.

Returns:

  • (Integer)

    the ID of the company of the user that created the ticket



204
# File 'lib/lws/apps/ticket.rb', line 204

attribute :company_id

#descriptionString?

Returns the description (body) of the ticket.

Returns:

  • (String, nil)

    the description (body) of the ticket



208
# File 'lib/lws/apps/ticket.rb', line 208

attribute :description

#display_nameString

Returns the name of the object the ticket is created for.

Returns:

  • (String)

    the name of the object the ticket is created for



212
# File 'lib/lws/apps/ticket.rb', line 212

attribute :display_name

#due_dateString?

Returns the timestamp of when the ticket is due.

Returns:

  • (String, nil)

    the timestamp of when the ticket is due



216
# File 'lib/lws/apps/ticket.rb', line 216

attribute :due_date

#groupGroup

Returns the group (e.g. department/ticket type) the ticket belongs to.

Returns:

  • (Group)

    the group (e.g. department/ticket type) the ticket belongs to



221
# File 'lib/lws/apps/ticket.rb', line 221

belongs_to :group

#group_idInteger

Returns the ID of the group the ticket belongs to.

Returns:

  • (Integer)

    the ID of the group the ticket belongs to



225
# File 'lib/lws/apps/ticket.rb', line 225

attribute :group_id

#messagesArray<Message>

Returns the messages associated with the ticket.

Returns:

  • (Array<Message>)

    the messages associated with the ticket



229
# File 'lib/lws/apps/ticket.rb', line 229

has_many :messages

#ownerLWS::Auth::Company

Returns the company that is currently handling the ticket.

Returns:



234
235
# File 'lib/lws/apps/ticket.rb', line 234

belongs_to :owner, class_name: "LWS::Auth::Company",
uri: "companies/:id"

#owner_idInteger

Returns the ID of the company that is currently handling the ticket.

Returns:

  • (Integer)

    the ID of the company that is currently handling the ticket



240
# File 'lib/lws/apps/ticket.rb', line 240

attribute :owner_id

#priority"low", ...

Returns the priority of the ticket.

Returns:

  • ("low", "medium", "high")

    the priority of the ticket



244
# File 'lib/lws/apps/ticket.rb', line 244

attribute :priority

#status"success", ...

Returns the current ticket status.

Returns:

  • ("success", "open", "closed", "in_progress", 'solved"feedback"ck", "priority", "reassign")

    the current ticket status



249
# File 'lib/lws/apps/ticket.rb', line 249

attribute :status

#tagsArray<Tag>

Returns the tags associated with the ticket.

Returns:

  • (Array<Tag>)

    the tags associated with the ticket



253
# File 'lib/lws/apps/ticket.rb', line 253

has_many :tags

#targetString

The target is a string that consists of three parts joined by a dot. It is the name of the app, followed by the model name, followed by the model ID. This can be resolved into the object the ticket is created for/on.

Returns:

  • (String)

    the target of the ticket



262
# File 'lib/lws/apps/ticket.rb', line 262

attribute :target

#titleString

Returns the title (short description) of the ticket.

Returns:

  • (String)

    the title (short description) of the ticket



266
# File 'lib/lws/apps/ticket.rb', line 266

attribute :title