Class: JIRA::FieldValue

Inherits:
Object
  • Object
show all
Defined in:
lib/jiraSOAP/remoteEntities.rb

Overview

A structure that is a bit of a hack. It is essentially just a key-value pair that is used mainly by RemoteAPI#update_issue.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idString

Returns:

  • (String)


605
606
607
# File 'lib/jiraSOAP/remoteEntities.rb', line 605

def id
  @id
end

#values[String,Time,URL,JIRA::*,nil]

Returns hard to say what the type should be.

Returns:

  • ([String,Time,URL,JIRA::*,nil])

    hard to say what the type should be



607
608
609
# File 'lib/jiraSOAP/remoteEntities.rb', line 607

def values
  @values
end

Class Method Details

.field_value_with_nil_values(id) ⇒ JIRA::FieldValue

Factory method that gives you a nil value for the given id.

Parameters:

  • id (String)

    name of the field for @values

Returns:



612
613
614
615
616
617
# File 'lib/jiraSOAP/remoteEntities.rb', line 612

def self.field_value_with_nil_values(id)
  fv = FieldValue.new
  fv.id = id
  fv.values = [nil]
  fv
end

Instance Method Details

#soapify_for(message, label = 'fieldValue') ⇒ Handsoap::XmlMason::Element

Generate the SOAP message fragment for a field value.

Parameters:

  • message (Handsoap::XmlMason::Node)

    the node to add the object to

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

    name for the tags that wrap the message

Returns:

  • (Handsoap::XmlMason::Element)


623
624
625
626
627
628
# File 'lib/jiraSOAP/remoteEntities.rb', line 623

def soapify_for(message, label = 'fieldValue')
  message.add label do |message|
    message.add 'id', @id
    message.add_simple_array 'values', @values
  end
end