Skip to main content
Skip table of contents

zAgileConnect API Reference (Beans)

ZCBeans Classes

ZCBeans.ApiOptions Class


global class ApiOptions
Defines options for API operations

Properties

userImpersonate

global Boolean userImpersonate

Methods


global ApiOptions()

Constructor for ApiOptions

ZCBeans.AttachmentRequestResult Class

global class AttachmentRequestResult
The result of attaching a file on Issue operation returned by a ZC API method

Methods


global AttachmentRequestResult(String errorMessage)

Constructor when the result is not successful


global AttachmentRequestResult()

Constructor when the result is successful


global String getErrorMessage()

Returns error message

Return Value

error message


global Boolean hasError()

Indicate whether the given response has any errors.

Return Value

true if the response indicates an error; false otherwise

ZCBeans.AvailableTransitionsResult Class


global class AvailableTransitionsResult
The result of retrieving available transitions

Methods


global AvailableTransitionsResult(Map<String, Object> transitionsData, String errorMessage)

Constructor, builds result using the transition data pulled from Jira.


global TransitionIssueBean buildIssueTransitionFromName(String transitionName)

Returns a TransitionIssueBean with a given transition name

Return Value

TransitionIssueBean with transitions data available


global List<String> getAvailableTransitionsNames()

Returns available Transition names

Return Value

List possible Transitions Issue can take


global String getErrorMessage()

Error Returns error message from Jira.

Return Value

error message


global Map<String, Object> getTransitionsData()

Returns Transitions metadata

Return Value

Map with raw data about transitions returned by JIRA Service


global Boolean hasError()

Returns if there was a problem pulling available transitions

Return Value

True if exists any error message

ZCBeans.GenericErrorMessage Class


global class GenericErrorMessage
Error message object used to post API errors on Salesforce Entity (Supports Case only)

Methods


global void addErrorMessage(String errorMessage)

Adds error message

Parameters

String  errorMessage


global GenericErrorMessage(Id entityId, String errorMessage)

Constructor for a single error message

Parameters

Id entityId Salesforce object ID where the error will be posted
String  errorMessage


global GenericErrorMessage(Id entityId, List<String> errorMessages)

Constructor for a list of error messages

Parameters

Id entityId Salesforce object ID where the errors will be posted
List<String>  errorMessages


global List<String> getErrorMessages()

Returns the error messages

Return Value

error messages

ZCBeans.IdIssueFieldValue Class


global class IdIssueFieldValue implements NameOrIdIssueFieldValue, KeyOrIdIssueFieldValue
Issue field value represented by <b>ID</b> attribute

Methods


global String getId()

Returns ID

Return Value

String Id


global IdIssueFieldValue(String id)

Contructor for object that represents a Jira field of type Id.


global void setId(String id)

Sets ID value

Parameters

String  id


global override String toString()

returns the representation of the field in String

Return Value

the string representation.

ZCBeans.IssueCommentResult Class


global class IssueCommentResult
The result of comment on Issue operation returned by a ZC API method

Properties

issueKeyOrId

global String issueKeyOrId

Methods


global String getErrorMessage()

Returns error message

Return Value

error message


global String getIssueCommentId()

Returns Issue comment ID

Return Value

issue comment Id


global Boolean hasError()

Indicate whether the given response has any errors.

Return Value

true if the response indicates an error; false otherwise


global IssueCommentResult(String issueKeyOrId, String issueCommentId)

Constructor, it builds a result with successful and relevant information


global IssueCommentResult(String issueKeyOrId, String issueCommentId, String errorMessage)

Constructor, it builds a bean when the result is not successful

ZCBeans.IssueDeleteResult Class

global class IssueDeleteResult extends IssueLinkUnlinkDeleteResult
The result of delete Issue operation returned by a ZC API method

Methods


global IssueDeleteResult(String issueKey)

Constructor, it builds a bean when the result is successful


global IssueDeleteResult(String issueKey, String errorMessage)

Constructor, it builds a bean when the result is not successful

ZCBeans.IssueLinkUnlinkDeleteResult Class


global virtual class IssueLinkUnlinkDeleteResult
The result of link, unlink or delete Issue operation returned by a ZC API method

Properties

errorMessage

global String errorMessage

issueKey

global String issueKey

Methods

  • hasError()
    Indicate whether the given response has any errors.

global Boolean hasError()

Indicate whether the given response has any errors.

Return Value

true if the response indicates an error; false otherwise

ZCBeans.IssueLinkUnlinkResult Class

global class IssueLinkUnlinkResult extends IssueLinkUnlinkDeleteResult
The result of link or unlink Issue operation returned by a ZC API method

Methods


global IssueLinkUnlinkResult(String issueKey)

Constructor, it builds a bean when the result is successful


global IssueLinkUnlinkResult(String issueKey, String errorMessage)

Constructor, it builds a bean when the result is not successful

ZCBeans.IssueTemplate Class


global class IssueTemplate
The template to create or update an Issue

Methods


global void addAffectVersion(NameOrIdIssueFieldValue version)

Adds an Issue affects version value

Parameters

NameOrIdIssueFieldValue  version


global void addComponent(NameOrIdIssueFieldValue component)

Adds an Issue component

Parameters

NameOrIdIssueFieldValue  component


global void addCustomField(String field, Object value)

Adds an Issue custom field

Parameters

String  field
Object value of the custom field with the structure as expected by the JIRA REST API


global void addFixVersion(NameOrIdIssueFieldValue fixVersion)

Adds an Issue fix version value

Parameters

NameOrIdIssueFieldValue  fixVersion


global void addLabel(String label)

Adds an Issue label

Parameters

String  label


global List<NameOrIdIssueFieldValue> getAffectVersions()

Returns Issue affects versions

Return Value

issue affect versions


global NameIssueFieldValue getAssignee()

Returns Issue assignee

Return Value

issue assignee


global List<NameOrIdIssueFieldValue> getComponents()

Returns Issue components

Return Value

issue components


global Map<String, Object> getCustomFields()

Returns Issue custom fields

Return Value

issue custom fields


global String getDescription()

Returns Issue description

Return Value

issue description


global String getDuedate()

Returns due date

Return Value

issue dueDate


global String getEnvironment()

Returns Issue environment

Return Value

issue environment


global List<NameOrIdIssueFieldValue> getFixVersions()

Returns Issue fix versions

Return Value

issue fixVersions


global NameOrIdIssueFieldValue getIssueType()

Returns the JIRA issue type Name or ID

Return Value

NameOrIdIssueFieldValue issueType


global List<String> getLabels()

Returns Issue labels

Return Value

issue labels


global NameOrIdIssueFieldValue getPriority()

Returns the Issue priority

Return Value

issue priority


global KeyOrIdIssueFieldValue getProject()

Returns the JIRA project key or ID

Return Value

KeyOrIdIssueFieldValue project


global NameIssueFieldValue getReporter()

Returns Issue reporter

Return Value

issue reporter


global String getSummary()

Returns Issue summary

Return Value

issue summary


global IssueTemplate(String issueKey)

Constructor to create an Issue template for issue update from scratch

Parameters

issueKey issue key


global IssueTemplate(Id entityId)

Constructor to create an Issue template for issue create from scratch

Parameters

entityId Salesforce object entity ID. The created issue will be linked to this entity.


global void setAffectVersions(List<NameOrIdIssueFieldValue> versions)

Sets Issue affects versions

Parameters

List<NameOrIdIssueFieldValue>  versions


global void setAssignee(NameIssueFieldValue assignee)

Sets Issue assignee

Parameters

NameIssueFieldValue assignee name field value


global void setComponents(List<NameOrIdIssueFieldValue> components)

Sets issue components

Parameters

List<NameOrIdIssueFieldValue>  components


global void setCustomFields(Map<String, Object>customFields)

Sets Issue custom fields using a Map of field values

Parameters

Map<String,Object>  customFields


global void setDescription(String description)

Sets Issue description

Parameters

String  description


global void setDuedate(Date duedate)

Sets Issue due date

Parameters

Date  dueDate


global void setDuedateString(String duedate)

Sets Issue due date

Parameters

String  dueDate


global void setEntityId(Id entityId)

Sets the Salesforce object entity ID. The created issue will be linked to this entity.

Parameters

Id  entityId


global void setEnvironment(String environment)

Sets Issue environment

Parameters

String  environment


global void setFixVersions(List<NameOrIdIssueFieldValue> fixVersions)

Sets Issue fix versions

Parameters

List<NameOrIdIssueFieldValue>  fixVersions


global void setIssueType(NameOrIdIssueFieldValue issueType)

Sets the JIRA issue type Name or ID

Parameters

NameOrIdIssueFieldValue  issueType


global void setLabels(List<String>labels)

Sets Issue labels

Parameters

List<String>  labels


global void setPriority(NameOrIdIssueFieldValue priority)

Sets the Issue priority

Parameters

NameOrIdIssueFieldValue  priority


global void setProject(KeyOrIdIssueFieldValue project)

Sets the JIRA project key or ID

Parameters

KeyOrIdIssueFieldValue  project


global void setReporter(NameIssueFieldValue reporter)

Sets Issue reporter

Parameters

NameIssueFieldValue  reporter


global void setSummary(String summary)

Sets Issue summary

Parameters

String  summary

ZCBeans.IssueUpsertResult Class


global class IssueUpsertResult
The result of create or update Issue operation returned by a ZC API method

Methods

  • getEntityId()
    Returns the Id of the Salesforce Object referenced by this Result
  • getErrorMessages()
    Returns create or update Issue error messages. An error message prevents the Issue from being created or updated
  • getIssueId()
    Returns the Issue ID for the Issue created or updated
  • getIssueKey()
    Returns the Issue Key for the Issue created or updated
  • getWarningMessages()
    Returns create or update Issue warning messages. A warning message does not prevent the Issue to be created or updated
  • hasError()
    Returns true if there is at least one error message
  • hasWarnings()
    Returns true if there is at least one warning message

global Id getEntityId()

Returns the Id of the Salesforce Object referenced by this Result

Return Value

Id EntityId


global List<String> getErrorMessages()

Returns create or update Issue error messages. An error message prevents the Issue from being created or updated

Return Value

List<String> a list of error messages


global String getIssueId()

Returns the Issue ID for the Issue created or updated

Return Value

id of the Jira Issue


global String getIssueKey()

Returns the Issue Key for the Issue created or updated

Return Value

key of the Jira Issue


global List<String> getWarningMessages()

Returns create or update Issue warning messages. A warning message does not prevent the Issue to be created or updated

Return Value

List<String> WarningMessages


global Boolean hasError()

Returns true if there is at least one error message

Return Value

true if the response indicates an error; false otherwise


global Boolean hasWarnings()

Returns true if there is at least one warning message

Return Value

true if the response indicates a warning; false otherwise

ZCBeans.KeyIssueFieldValue Class


global class KeyIssueFieldValue implements KeyOrIdIssueFieldValue
Issue field value represented by <b>Key</b> attribute

Methods


global String getKey()

Returns key

Return Value

the key value


global KeyIssueFieldValue(String key)

Constructor for object that represents a Jira field of type key.


global void setKey(String key)

Sets key value

Parameters

String  key


global override String toString()

returns the representation of the field in String

Return Value

the string representation.

ZCBeans.NameIssueFieldValue Class


global class NameIssueFieldValue implements NameOrIdIssueFieldValue
Issue field value represented by <b>Name</b> attribute

Methods


global String getName()

Returns name

Return Value

String name



global NameIssueFieldValue(String name)

global void setName(String name)

Sets name value

Parameters

String  name


global override String toString()

returns the representation of the field in String

Return Value

the string representation.

ZCBeans.SalesforceAttachment Class


global class SalesforceAttachment
The Salesforce Attachment used as input by a ZC API method

Methods



global SalesforceAttachment(Id salesforceFileID, String issueKey)

ZCBeans.TransitionIssueBean Class


global class TransitionIssueBean
A transition to be executed

Methods


global String getComment()

Returns Transition comment

Return Value

comment


global Object getFieldById(String fieldId)

Get field object by Id.

Return Value

Field Value


global Object getFieldByName(String fieldName)

Get field object by name.

Return Value

Transition Field value


global Map<String, Object> getFieldDataByName(String fieldName)

Retrieves a Transition screen field metadata (type, allowed values, required)

Return Value

Map<String, Object> Field Metadata by Name


global Map<String, Object> getFields()

Returns Transition screen fields

Return Value

Map<String, Object> fields


global List<String> getFieldsNames()

Retrieves the Transition screen field names (requires transition metadata)

Return Value

fields Names


global List<String> getRequiredFieldsNames()

Retrieves the Transition screen required field names (requires transition metadata)

Return Value

Required Fields Names


global Integer getTransitionId()

Returns Transition Id

Return Value

transition Id


global void populateFieldsWith(IssueTemplate issueTemplate)

Populates transition screen fields from an issue template.


global void setComment(String comment)

Sets Transition comment


global void setFieldById(String fieldId, Object fieldValue)

Sets Transition screen field value by id.


global void setFieldByName(String fieldName, Object fieldValue)

Sets Transition screen field value by name(requires transition metadata)


global String toJSON()

returns a JSON compatible with JIRA REST API request.

Return Value

Issue Transition request as JSON


global TransitionIssueBean(Integer transitionId)

Constructor receives Transition Id. Use this constructor when you do not have the metadata of the transition. Please note, you can not use validateAndSanitize if you build the bean this way.

Return Value

TransitionIssueBean without transitions metadata available


global String validateAndSanitize()

Validates if the TransitionBean has all required fields set and remove all fields that do not exist in metadata; If any required field is not set it will return a warning message (requires transition metadata)

Return Value

Warning Message

ZCBeans.TransitionIssueResult Class


global class TransitionIssueResult
The result of executing a transition.

Methods


global String getErrorMessage()

Returns Error Message

Return Value

Error Message


global String getIssueKey()

Returns Issue Key

Return Value

Issue Key


global Boolean hasError()

Returns true if there was an error performing the transition.


global TransitionIssueResult(String issueKey, String errorMessage)

Constructor, it builds the result bean.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.