Skip to main content
Skip table of contents

zAgileConnect API Reference (Beans)

ZCBeans Classes

ZCBeans Class

global abstract class ZCBeans

Common Beans for zAgileConnect API

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

String errorMessage


global Boolean hasError()

Returns true if there is at least one error message

Return Value

Boolean

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

String errorMessage


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.CascadeFieldValue Class

global class CascadeFieldValue

Representation of the Cascade type Issue field

Methods


global CascadeFieldValue(String value, String childValue)

Constructor for object that represents a Cascade Jira field.

ZCBeans.GenericErrorMessage Class

global class GenericErrorMessage

Error message object used to post API errors on Salesforce Record (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

List<String> errorMessages

ZCBeans.IdIssueFieldValue Class

global class IdIssueFieldValue implements NameOrIdIssueFieldValue, KeyOrIdIssueFieldValue

Issue field value represented by Id 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

String errorMessage


global String getIssueCommentId()

Returns Issue comment Id

Return Value

String issueCommentId


global Boolean hasError()

Returns true if there is at least one error message

Return Value

Boolean


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)

@deprecated Don't use this constructor in ZC. It stays here only for global use, since some implemmentations might have unit tests that depend on it.


global IssueDeleteResult(String issueKey, Id recordId)

Constructor, it builds a bean when the result is successful


global IssueDeleteResult(String issueKey, String errorMessage)

@deprecated Don't use this constructor in ZC. It stays here only for global use, since some implemmentations might have unit tests that depend on it.


global IssueDeleteResult(String issueKey, Id recordId, String errorMessage)

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

ZCBeans.IssueLinksFieldValue Class

global class IssueLinksFieldValue

Represents the value for issue links field in Jira

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

recordId

global Id recordId

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)

@deprecated Don't use this constructor in ZC. It stays here only for global use, since some implemmentations might have unit tests that depend on it.


global IssueLinkUnlinkResult(String issueKey, Id recordId)

Constructor, it builds a bean when the result is successful


global IssueLinkUnlinkResult(String issueKey, String errorMessage)

@deprecated Don't use this constructor in ZC. It stays here only for global use, since some implemmentations might have unit tests that depend on it.


global IssueLinkUnlinkResult(String issueKey, Id recordId, 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 void addUpdateField(String field, Object value)

Adds an Issue update field

Parameters

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


global List<NameOrIdIssueFieldValue> getAffectVersions()

Returns Issue affects versions

Return Value

List<NameOrIdIssueFieldValue> versions


global NameIssueFieldValue getAssignee()

Returns Issue assignee. Deprecated, If it is being used accountId for assignee representation use getIssueAssignee instead

Return Value

NameIssueFieldValue assignee


global List<NameOrIdIssueFieldValue> getComponents()

Returns Issue components

Return Value

List<NameOrIdIssueFieldValue> components


global Map<String, Object> getCustomFields()

Returns Issue custom fields

Return Value

Map<String,Object> customFields


global String getDescription()

Returns Issue description

Return Value

String description


global String getDuedate()

Returns due date

Return Value

String dueDate


global String getEnvironment()

Returns Issue environment

Return Value

String environment


global List<NameOrIdIssueFieldValue> getFixVersions()

Returns Issue fix versions

Return Value

List<NameOrIdIssueFieldValue> fixVersions


global NameOrIdIssueFieldValue getIssueAssignee()

Returns Issue assignee

Return Value

NameOrIdIssueFieldValue assignee


global NameOrIdIssueFieldValue getIssueReporter()

Returns Issue reporter

Return Value

NameOrIdIssueFieldValue reporter


global NameOrIdIssueFieldValue getIssueType()

Returns the Jira Issue type Name or Id

Return Value

NameOrIdIssueFieldValue issueType


global List<String> getLabels()

Returns Issue labels

Return Value

List<String> labels


global NameOrIdIssueFieldValue getPriority()

Returns the Issue priority

Return Value

NameOrIdIssueFieldValue priority


global KeyOrIdIssueFieldValue getProject()

Returns the Jira project key or Id

Return Value

KeyOrIdIssueFieldValue project


global NameIssueFieldValue getReporter()

Returns Issue reporter. Deprecated, If it is being used accountId for reporter representation use getIssueReporter instead

Return Value

NameIssueFieldValue reporter


global NameOrIdIssueFieldValue getSecurity()

Returns the Issue security

Return Value

NameOrIdIssueFieldValue security


global String getSummary()

Returns Issue summary

Return Value

String summary


global TimeTrackingFieldValue getTimeTracking()

Returns Issue TimeTracking

Return Value

TimeTracking timeTracking


global Map<String, Object> getUpdateFields()

Returns Issue update fields

Return Value

Map<String,Object> updateFields


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 record Id. The created Issue will be linked to this record.


global void setAffectVersions(List<NameOrIdIssueFieldValue> versions)

Sets Issue affects versions

Parameters

List<NameOrIdIssueFieldValue>  versions


global void setAssignee(NameIssueFieldValue assignee)

Sets Issue assignee. Deprecated, If it is being used accountId for assignee representation use setIssueAssignee instead

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 record Id. The created Issue will be linked to this record.

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 setIssueAssignee(NameOrIdIssueFieldValue assignee)

Sets Issue assignee

Parameters

NameOrIdIssueFieldValue assignee name field value


global void setIssueReporter(NameOrIdIssueFieldValue reporter)

Sets Issue reporter with user account Id

Parameters

NameOrIdIssueFieldValue  reporter


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 with user name. Deprecated, If it is being used accountId for reporter representation use setIssueReporter instead

Parameters

NameIssueFieldValue  reporter


global void setSecurity(NameOrIdIssueFieldValue security)

Sets the Issue security

Parameters

NameOrIdIssueFieldValue  security


global void setSummary(String summary)

Sets Issue summary

Parameters

String  summary


global void setTimeTracking(TimeTrackingFieldValue timeTracking)

Sets Issue TimeTracking

Parameters

ZFlowIssueTimeTrackingValue  timeTracking


global void setUpdateFields(Map<String, Object>updateFields)

Sets Issue update fields using a Map of field values

Parameters

Map<String,Object>  updateFields

ZCBeans.IssueUpsertResult Class

global class IssueUpsertResult

Constructor for IssueLinksFieldValue @param linkTypeName The Name of the link type @param outIssueKey The key of the outward issue @param inIssueKey The key of the inward issue /** Represents an item to add to the issue link field /** Constructor for AddItem @param linkTypeName The Name of the link type @param outIssueKey The key of the outward issue @param inIssueKey The key of the inward issue /** The result of create or update Issue operation returned by a ZC API method

Methods


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> ErrorMessages


global String getIssueId()

Returns the Issue Id for the Issue created or updated

Return Value

IssueId


global String getIssueKey()

Returns the Issue Key for the Issue created or updated

Return Value

String IssueKey


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

Boolean


global Boolean hasWarnings()

Returns true if there is at least one warning message

Return Value

Boolean


global IssueUpsertResult(IssueTemplate referencedTemplate)


global void setErrorMessages(List<String>errorMessages)


global void setWarningMessages(List<String>warningMessages)

ZCBeans.KeyIssueFieldValue Class

global class KeyIssueFieldValue implements KeyOrIdIssueFieldValue

Issue field value represented by Key attribute

Methods


global String getKey()

Returns key

Return Value

String key


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.KeyOrIdIssueFieldValue Class

global interface KeyOrIdIssueFieldValue

Methods


String toString()

ZCBeans.NameIssueFieldValue Class

global class NameIssueFieldValue implements NameOrIdIssueFieldValue, NameOrValueIssueFieldValue

Issue field value represented by Name 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.NameOrIdIssueFieldValue Class

global interface NameOrIdIssueFieldValue

Methods


String toString()

ZCBeans.NameOrValueIssueFieldValue Class

global interface NameOrValueIssueFieldValue

Methods


String toString()

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.TimeTrackingFieldValue Class

global class TimeTrackingFieldValue

Constructor for object that represents a Child Option of the Cascade Jira field. /** Representation of the Time Tracking field in a Jira issue. This class holds time estimates for the original and remaining work.

Methods


global TimeTrackingFieldValue(String originalEstimate, String remainingEstimate)

Constructor for creating an object that represents time tracking estimates.

Parameters

originalEstimate The original estimated time for the issue.
remainingEstimate The remaining estimated time for the issue.

ZCBeans.TransitionIssueBean Class

global class TransitionIssueBean

A transition to be executed

Methods


global String getComment()

Returns Transition comment

Return Value

String Comment


global Object getFieldById(String fieldId)

Get field object by Id.

Return Value

Object Field Value


global Object getFieldByName(String fieldName)

Get field object by name.

Return Value

Object 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

List<String> Fields Names


global List<String> getRequiredFieldsNames()

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

Return Value

List<String> Required Fields Names


global Integer getTransitionId()

Returns Transition Id

Return Value

Integer 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

String Error Message


global String getIssueKey()

Returns Issue Key

Return Value

String 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.

ZCBeans.ValueIssueFieldValue Class

global class ValueIssueFieldValue implements NameOrValueIssueFieldValue

Issue field value represented by value attribute

Methods


global String getValue()

Returns value

Return Value

String value


global void setValue(String value)

Sets value

Parameters

value value to be assigned


global override String toString()

returns the representation of the field in String

Return Value

the string representation.


global ValueIssueFieldValue(String value)

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

Parameters

value value to be assigned

JavaScript errors detected

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

If this problem persists, please contact our support.