Class: JIRA::CustomFieldValue

Inherits:
DynamicEntity show all
Defined in:
lib/jiraSOAP/entities/custom_field_value.rb

Overview

TODO:

See if @key is always nil from the server, maybe we can remove it

Note:

There are no API methods that directly create objects of this class, they are only created as an attribute of Issue objects.

Represents an instance of a custom field (with values).

Instance Method Summary collapse

Methods inherited from Entity

add_attribute, inherited, #initialize_with_xml, new_with_xml

Constructor Details

#initialize(custom_field_id = nil, *custom_values) ⇒ CustomFieldValue

You can optionally initialize a custom field value with new

Parameters:

  • custom_field_id (String) (defaults to: nil)


22
23
24
25
# File 'lib/jiraSOAP/entities/custom_field_value.rb', line 22

def initialize custom_field_id = nil, *custom_values
  @id     = custom_field_id
  @values = custom_values
end

Instance Method Details

#idString

Returns:

  • (String)


10
# File 'lib/jiraSOAP/entities/custom_field_value.rb', line 10

add_attribute :id, 'customfieldId', :content

#keyString

Returns Used with cascading select fields.

Returns:

  • (String)

    Used with cascading select fields



13
# File 'lib/jiraSOAP/entities/custom_field_value.rb', line 13

add_attribute :key, 'key', :content

#soapify_for(msg, label = 'customFieldValues') ⇒ Handsoap::XmlMason::Element

Generate a SOAP message fragment for the object.

Parameters:

  • msg (Handsoap::XmlMason::Node)

    SOAP message to add the object to

  • label (String) (defaults to: 'customFieldValues')

    tag name used in wrapping tags

Returns:

  • (Handsoap::XmlMason::Element)


33
34
35
36
37
38
39
# File 'lib/jiraSOAP/entities/custom_field_value.rb', line 33

def soapify_for msg, label = 'customFieldValues'
  msg.add label do |submsg|
    submsg.add 'customfieldId', @id
    submsg.add 'key', @key
    submsg.add_simple_array 'values', @values
  end
end

#valuesArray<String>

Returns:



16
# File 'lib/jiraSOAP/entities/custom_field_value.rb', line 16

add_attribute :values, 'values', :contents_of_children