Class: Types::WorkItemType

Inherits:
BaseObject
  • Object
show all
Defined in:
app/graphql/types/work_item_type.rb

Instance Method Summary collapse

Methods inherited from BaseObject

accepts, assignable?, authorization, authorization_scopes, authorize, authorized?, #current_user, #id

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Instance Method Details

#archivedObject



85
86
87
88
89
# File 'app/graphql/types/work_item_type.rb', line 85

def archived
  return false if object.project.blank?

  object.project.archived?
end

#create_note_emailObject



81
82
83
# File 'app/graphql/types/work_item_type.rb', line 81

def create_note_email
  object.creatable_note_email_address(context[:current_user])
end

#web_urlObject



77
78
79
# File 'app/graphql/types/work_item_type.rb', line 77

def web_url
  Gitlab::UrlBuilder.build(object)
end

#work_item_typeObject



71
72
73
74
75
# File 'app/graphql/types/work_item_type.rb', line 71

def work_item_type
  context.scoped_set!(:resource_parent, object.resource_parent)

  object.work_item_type
end