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

Represents an instance of a custom field (with values). This object is used as a member of Issue objects.

The structure of this class resembles JIRA::FieldValue, it is different in that @values will always be stored as an Array of String objects for custom fields and a field value is more flexible. You can expect the classes to merge in the near future.

Instance Attribute Summary collapse

Attributes inherited from DynamicEntity

#id

Instance Method Summary collapse

Methods inherited from Entity

add_attributes, #initialize_with_xml, new_with_xml

Instance Attribute Details

#keyString

Returns:

  • (String)


17
18
19
# File 'lib/jiraSOAP/entities/custom_field_value.rb', line 17

def key
  @key
end

#values[String]

Returns:

  • ([String])


20
21
22
# File 'lib/jiraSOAP/entities/custom_field_value.rb', line 20

def values
  @values
end

Instance Method Details

#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)


26
27
28
29
30
31
32
# File 'lib/jiraSOAP/entities/custom_field_value.rb', line 26

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