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


global class ApiOptions
Defines options for API operations

Properties

userImpersonate

global Boolean userImpersonate
Deprecated, from ZC-1.13 onwards it is not possible to impersonate users.

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

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

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)

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

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 String getSummary()

Returns Issue summary

Return Value

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


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

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.

Return Value



global void setComment(String comment)

Sets Transition comment

Return Value



global void setFieldById(String fieldId, Object fieldValue)

Sets Transition screen field value by id.

Return Value



global void setFieldByName(String fieldName, Object fieldValue)

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

Return Value



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.

Return Value



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.