Skip to main content
Skip table of contents

zAgileConnect API Reference (Operations)

ZC Classes

ZC.IssueApi Class


global with sharing virtual class IssueApi extends ZC

Methods


global List<ZCBeans.IssueUpsertResult> bulkCreateIssues(List<ZCBeans.IssueTemplate> lstIssues)

Creates multiple issues from a list of templates.

Parameters

List<ZCBeans.IssueTemplate> lstIssues List of templates representing the issues to be created.

Return Value

A list of results corresponding to each template in the input.

Example

CODE
List<zsfjira.ZCBeans.IssueTemplate>lstIssues = new List<zsfjira.ZCBeans.IssueTemplate>();
...
zsfjira.ZCBeans.IssueTemplate issue = new zsfjira.ZCBeans.IssueTemplate(Id.valueOf('500i000000weOJe'));
...
lstIssues.add(issue);
...
zsfjira.ZCBeans.IssueTemplate issue2 = new zsfjira.ZCBeans.IssueTemplate(Id.valueOf('500i000000weAjo'));
...
lstIssues.add(issue2);
...
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.bulkCreateIssues(lstIssues);

global virtual List<ZCBeans.IssueUpsertResult> bulkCreateIssues(String connectionId, List<ZCBeans.IssueTemplate> lstIssues)

Using a specific Jira connection id, It creates multiple issues from a list of templates.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
List<ZCBeans.IssueTemplate> lstIssues List of templates representing the issues to be created.

Return Value

A list of results corresponding to each template in the input.

Example

CODE
List<zsfjira.ZCBeans.IssueTemplate>lstIssues = new List<zsfjira.ZCBeans.IssueTemplate>();
...
zsfjira.ZCBeans.IssueTemplate issue = new zsfjira.ZCBeans.IssueTemplate(Id.valueOf('500i000000weOJe'));
...
lstIssues.add(issue);
...
zsfjira.ZCBeans.IssueTemplate issue2 = new zsfjira.ZCBeans.IssueTemplate(Id.valueOf('500i000000weAjo'));
...
lstIssues.add(issue2);
...
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.bulkCreateIssues('j01', lstIssues);

global List<ZCBeans.IssueUpsertResult> bulkUpdateIssues(List<ZCBeans.IssueTemplate> lstIssues)

Updates multiple Jira issues from a list of templates.

Parameters

List<ZCBeans.IssueTemplate> lstIssues List of templates representing the issues to be updated.

Return Value

A list of results corresponding to each template of the input.

Example

CODE
List<zsfjira.ZCBeans.IssueTemplate>lstIssues = new List<zsfjira.ZCBeans.IssueTemplate>();
...
zsfjira.ZCBeans.IssueTemplate issue = new zsfjira.ZCBeans.IssueTemplate('SEL-100');
...
lstIssues.add(issue);
...
zsfjira.ZCBeans.IssueTemplate issue2 = new zsfjira.ZCBeans.IssueTemplate('SEL-101');
...
lstIssues.add(issue);
...
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.bulkUpdateIssues(lstIssues);

global virtual List<ZCBeans.IssueUpsertResult> bulkUpdateIssues(String connectionId, List<ZCBeans.IssueTemplate> lstIssues)

Using a specific Jira connection id, It updates multiple Jira issues from a list of templates.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
List<ZCBeans.IssueTemplate> lstIssues List of templates representing the issues to be updated.

Return Value

A list of results corresponding to each template of the input.

Example

CODE
List<zsfjira.ZCBeans.IssueTemplate>lstIssues = new List<zsfjira.ZCBeans.IssueTemplate>();
...
zsfjira.ZCBeans.IssueTemplate issue = new zsfjira.ZCBeans.IssueTemplate('SEL-100');
...
lstIssues.add(issue);
...
zsfjira.ZCBeans.IssueTemplate issue2 = new zsfjira.ZCBeans.IssueTemplate('SEL-101');
...
lstIssues.add(issue);
...
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.bulkUpdateIssues('j01', lstIssues);

global ZCBeans.IssueUpsertResult createIssue(ZCBeans.IssueTemplate issue)

Creates an issue from a template. This method must only be used for creating a single issue. For creating multiple issues, please refer to bulkCreateIssues.

Parameters

ZCBeans.IssueTemplate issue Issue template representing the issue to be created.

Return Value

An object containing Issue key on successful execution or errors

Example

CODE
zsfjira.ZCBeans.IssueTemplate issue = new zsfjira.ZCBeans.IssueTemplate(Id.valueOf('500i000000wg9bS'));
...
zsfjira.ZCBeans.IssueUpsertResult iresult = zsfjira.ZC.Issues.createIssue(issue);
if(iresult.hasError()){
	for(String errorMessage:iresult.getErrorMessages()){
		System.debug(System.LoggingLevel.ERROR,errorMessage);
	}
}else{
	System.debug(System.LoggingLevel.INFO,iresult.getIssueKey());
}

global virtual ZCBeans.IssueUpsertResult createIssue(String connectionId, ZCBeans.IssueTemplate issue)

Using a specific Jira connection id, It creates an issue from a template. This method must only be used for creating a single issue. For creating multiple issues, please refer to bulkCreateIssues.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
ZCBeans.IssueTemplate issue Issue template representing the issue to be created.

Return Value

An object containing Issue key on successful execution or errors

Example

CODE
zsfjira.ZCBeans.IssueTemplate issue = new zsfjira.ZCBeans.IssueTemplate(Id.valueOf('500i000000wg9bS'));
...
zsfjira.ZCBeans.IssueUpsertResult iresult = zsfjira.ZC.Issues.createIssue('j01', issue);
if(iresult.hasError()){
	for(String errorMessage:iresult.getErrorMessages()){
		System.debug(System.LoggingLevel.ERROR,errorMessage);
	}
}else{
	System.debug(System.LoggingLevel.INFO,iresult.getIssueKey());
}

global ZCBeans.IssueCommentResult createJIRAIssueComment(String issueKeyOrId, String comment)

Create comment in Jira issue.

Parameters

String issueKeyOrId The Jira Issue key or Id
String comment Comment body.

Return Value

The result of the operation.

Example

CODE
ZCBeans.IssueCommentResult result = zsfjira.ZC.Issues.createJIRAIssueComment('SEL-118','Comment test');

global virtual ZCBeans.IssueCommentResult createJIRAIssueComment(String connectionId, String issueKeyOrId, String comment)

Using a specific Jira connection id, It creates a comment in Jira issue.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
String issueKeyOrId The Jira Issue key or Id
String comment Comment body.

Return Value

The result of the operation.

Example

CODE
ZCBeans.IssueCommentResult result = zsfjira.ZC.Issues.createJIRAIssueComment('j01', 'SEL-118','Comment test');

global ZCBeans.IssueDeleteResult deleteIssue(String issueKey, Id entityId)

Delete a Jira Issue created from a Salesforce entity.

Parameters

String issueKey The Jira issue key.
Id entityId The Salesforce entity Id

Return Value

Result of the Delete operation.

Example

CODE
zsfjira.ZC.Issues.deleteIssue('TP-1',Id.valueOf('5000H00000xLWAd'));

global virtual ZCBeans.IssueDeleteResult deleteIssue(String connectionId, String issueKey, Id entityId)

Using a specific Jira connection id, It deletes a Jira Issue created from a Salesforce entity.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
String issueKey The Jira issue key.
Id entityId The Salesforce entity Id

Return Value

Result of the Delete operation.

Example

CODE
zsfjira.ZC.Issues.deleteIssue('j01', 'TP-1',Id.valueOf('5000H00000xLWAd'));

global List<ZCBeans.IssueDeleteResult> deleteIssues(Set<String> selectedIssueKeys, Id entityId)

Delete a list of Jira Issues created from a Salesforce entity.

Parameters

Set<String> selectedIssueKeys The Jira issues to be deleted.
Id entityId The Salesforce entity Id.

Return Value

List of results of the Delete operation.

Example

CODE
Set<String> issueKeys=new Set<String>();
issueKeys.add('TP-1');
issueKeys.add('TP-6');
issueKeys.add('TP-7');
List<zsfjira.ZCBeans.IssueLinkUnlinkResult> results = zsfjira.ZC.Issues.deleteIssues(issueKeys,Id.valueOf('5000H00000xLWAd'));

global virtual List<ZCBeans.IssueDeleteResult> deleteIssues(String connectionId, Set<String> selectedIssueKeys, Id entityId)

Using a specific Jira connection id, It deletes a list of Jira Issues created from a Salesforce entity.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
Set<String> selectedIssueKeys The Jira issues to be deleted.
Id entityId The Salesforce entity Id.

Return Value

List of results of the Delete operation.

Example

CODE
Set<String> issueKeys=new Set<String>();
issueKeys.add('TP-1');
issueKeys.add('TP-6');
issueKeys.add('TP-7');
List<zsfjira.ZCBeans.IssueLinkUnlinkResult> results = zsfjira.ZC.Issues.deleteIssues('j01', issueKeys,Id.valueOf('5000H00000xLWAd'));

global ZCBeans.AvailableTransitionsResult getAvailableTransitions(String issueKey)

Retrieves available Issue Transitions

Parameters

IssueKey Issue Key

Return Value

ZCBeans.AvailableTransitionsResult

Example

CODE
ZCBeans.AvailableTransitionsResult availableTransitionsResult =  ZC.Issues.getAvailableTransitions('SEL-1019');

global virtual ZCBeans.AvailableTransitionsResult getAvailableTransitions(String connectionId, String issueKey)

Using a specific Jira connection id, It retrieves available Issue Transitions

Parameters

String connectionId An internal identifier for a specific Jira Connection.
IssueKey Issue Key

Return Value

ZCBeans.AvailableTransitionsResult

Example

CODE
ZCBeans.AvailableTransitionsResult availableTransitionsResult =  ZC.Issues.getAvailableTransitions('j01', 'SEL-1019');

global ZCBeans.IssueLinkUnlinkResult linkIssue(String issueKey, Id entityId)

Links an issue to a specified Salesforce entity.

Parameters

String issueKey The Jira issue key.
Id entityId The Salesforce entity Id.

Return Value

Result of the Link operation

Example

CODE
zsfjira.ZC.Issues.linkIssue('TP-1',Id.valueOf('5000H00000xLWAd'));

global virtual ZCBeans.IssueLinkUnlinkResult linkIssue(String connectionId, String issueKey, Id entityId)

Using a specific Jira connection id, It links an issue to a specified Salesforce entity.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
String issueKey The Jira issue key.
Id entityId The Salesforce entity Id.

Return Value

Result of the Link operation

Example

CODE
zsfjira.ZC.Issues.linkIssue('j01', 'TP-1',Id.valueOf('5000H00000xLWAd'));

global List<ZCBeans.IssueLinkUnlinkResult> linkIssues(Set<String> selectedIssueKeys, Id entityId)

Links a list of Jira Issues to a Salesforce entity.

Parameters

Set<String> selectedIssueKeys The Jira issues to be linked.
Id entityId The Salesforce entity Id.

Return Value

List of results of the Link operation.

Example

CODE
Set<String> issueKeys=new Set<String>();
issueKeys.add('TP-1');
issueKeys.add('TP-6');
issueKeys.add('TP-7');
List<zsfjira.ZCBeans.IssueLinkUnlinkResult> results = zsfjira.ZC.Issues.linkIssues(issueKeys,Id.valueOf('5000H00000xLWAd'));

global virtual List<ZCBeans.IssueLinkUnlinkResult> linkIssues(String connectionId, Set<String> selectedIssueKeys, Id entityId)

Using a specific Jira connection id, It links a list of Jira Issues to a Salesforce entity.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
Set<String> selectedIssueKeys The Jira issues to be linked.
Id entityId The Salesforce entity Id.

Return Value

List of results of the Link operation.

Example

CODE
Set<String> issueKeys=new Set<String>();
issueKeys.add('TP-1');
issueKeys.add('TP-6');
issueKeys.add('TP-7');
List<zsfjira.ZCBeans.IssueLinkUnlinkResult> results = zsfjira.ZC.Issues.linkIssues('j01', issueKeys,Id.valueOf('5000H00000xLWAd'));

global void postCreateIssueErrorMessage(String errorMessage, ZCBeans.IssueUpsertResult issue)

Post errors of a single issue creation event to its related Salesforce entity.

Parameters

String errorMessage A prefix concatenated with the error messages.
ZCBeans.IssueUpsertResult issue The result from a create or validate operation (only error messages will be posted)

Example

CODE
zsfjira.ZCBeans.IssueUpsertResult iresult = zsfjira.ZC.Issues.createIssue(issue);
zsfjira.ZC.Issues.postCreateIssueErrorMessage('Invalid Input',iresult);

global virtual void postCreateIssueErrorMessage(String connectionId, String errorMessage, ZCBeans.IssueUpsertResult issue)

Using a specific Jira connection id, It posts errors of a single issue creation event to its related Salesforce entity.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
String errorMessage A prefix concatenated with the error messages.
ZCBeans.IssueUpsertResult issue The result from a create or validate operation (only error messages will be posted)

Example

CODE
zsfjira.ZCBeans.IssueUpsertResult iresult = zsfjira.ZC.Issues.createIssue(issue);
zsfjira.ZC.Issues.postCreateIssueErrorMessage('j01','Invalid Input',iresult);

global void postCreateIssueErrorMessage(ZCBeans.IssueUpsertResult issue)

Post errors of a single issue create to its related Salesforce object.

Parameters

ZCBeans.IssueUpsertResult issue The result from a create or validate operation (only error messages will be posted)

Example

CODE
zsfjira.ZCBeans.IssueUpsertResult iresult = zsfjira.ZC.Issues.createIssue(issue);
zsfjira.ZC.Issues.postCreateIssueErrorMessage(iresult);

global void postCreateIssueErrorMessages(String errorMessage, List<ZCBeans.IssueUpsertResult> lstIssues)

Post errors of multiple issue creation events to their relates Salesforce entities.

Parameters

String errorMessage A prefix concatenated with the error messages.
List<ZCBeans.IssueUpsertResult> lstIssues The results from a bulk create or validate operation (only error messages will be posted)

Example

CODE
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.bulkCreateIssues(lstIssues);
zsfjira.ZC.Issues.postCreateIssueErrorMessages('Invalid Input',iresults);

global virtual void postCreateIssueErrorMessages(String connectionId, String errorMessage, List<ZCBeans.IssueUpsertResult> lstIssues)

Using a specific Jira connection id, It posts errors of multiple issue creation events to their relates Salesforce entities.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
String errorMessage A prefix concatenated with the error messages.
List<ZCBeans.IssueUpsertResult> lstIssues The results from a bulk create or validate operation (only error messages will be posted)

Example

CODE
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.bulkCreateIssues(lstIssues);
zsfjira.ZC.Issues.postCreateIssueErrorMessages('j01', 'Invalid Input',iresults);

global void postCreateIssueErrorMessages(List<ZCBeans.IssueUpsertResult> lstIssues)

Post errors of multiple issue creation events to their relates Salesforce entities.

Parameters

List<ZCBeans.IssueUpsertResult> lstIssues The results from a bulk create or validate operation (only error messages will be posted)

Example

CODE
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.bulkCreateIssues(lstIssues);
zsfjira.ZC.Issues.postCreateIssueErrorMessages(iresults);

global void postErrorMessage(Id entityId, ZCBeans.IssueLinkUnlinkDeleteResult iresults)

Post errors from the result of single link, unlink or delete operation to a target Salesforce entity.

Parameters

Id entityId The entity where the errors are going to be posted.
ZCBeans.IssueLinkUnlinkDeleteResult iresult Result from link, unlink or delete operation (only error messages will be posted)

Example

CODE
Id caseId = Id.valueOf('5000H00000zdi30');
zsfjira.ZCBeans.IssueLinkUnlinkResult result = zsfjira.ZC.Issues.linkIssue('JP-1',caseId);
zsfjira.ZC.Issues.postErrorMessages(caseId,result);

global virtual void postErrorMessage(String connectionId, Id entityId, ZCBeans.IssueLinkUnlinkDeleteResult iresults)

Using a specific Jira connection id, It posts errors from the result of single link, unlink or delete operation to a target Salesforce entity.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
Id entityId The entity where the errors are going to be posted.
ZCBeans.IssueLinkUnlinkDeleteResult iresult Result from link, unlink or delete operation (only error messages will be posted)

Example

CODE
Id caseId = Id.valueOf('5000H00000zdi30');
zsfjira.ZCBeans.IssueLinkUnlinkResult result = zsfjira.ZC.Issues.linkIssue('JP-1',caseId);
zsfjira.ZC.Issues.postErrorMessages('j01', caseId,result);

global void postErrorMessages(Id entityId, List<ZCBeans.IssueLinkUnlinkDeleteResult> iresults)

Post errors from results of link, unlink or delete operations to a target Salesforce entity.

Parameters

Id entityId The entity where the errors are going to be posted.
List<ZCBeans.IssueLinkUnlinkDeleteResult> iresults Results from link, unlink or delete operations (only error messages will be posted)

Example

CODE
List<zsfjira.ZCBeans.IssueLinkUnlinkResult> results = zsfjira.ZC.Issues.linkIssues(issueKeys,Id.valueOf('5000H00000xLWAd'));
zsfjira.ZC.Issues.postErrorMessages(Id.valueOf('5000H00000zdi30'),results);

global virtual void postErrorMessages(String connectionId, Id entityId, List<ZCBeans.IssueLinkUnlinkDeleteResult> iresults)

Using a specific Jira connection id, It posts errors from results of link, unlink or delete operations to a target Salesforce entity.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
Id entityId The entity where the errors are going to be posted.
List<ZCBeans.IssueLinkUnlinkDeleteResult> iresults Results from link, unlink or delete operations (only error messages will be posted)

Example

CODE
List<zsfjira.ZCBeans.IssueLinkUnlinkResult> results = zsfjira.ZC.Issues.linkIssues(issueKeys,Id.valueOf('5000H00000xLWAd'));
zsfjira.ZC.Issues.postErrorMessages('j01', Id.valueOf('5000H00000zdi30'),results);

global void postErrorMessages(List<ZCBeans.GenericErrorMessage> errorMessages)

Post errors from a List containing a list of ZCBeans.GenericErrorMessage built by the user.

Parameters

List<ZCBeans.GenericErrorMessage> errorMessages, the error messages, each element contains the error and the target(entity Id where it must be posted)

Example

CODE
List<ZCBeans.GenericErrorMessage> errorMessages = new List<ZCBeans.GenericErrorMessage>();
postErrorMessages

global virtual void postErrorMessages(String connectionId, List<ZCBeans.GenericErrorMessage> errorMessages)

Using a specific Jira connection id, It posts errors from a List containing a list of ZCBeans.GenericErrorMessage built by the user.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
List<ZCBeans.GenericErrorMessage> errorMessages, the error messages, each element contains the error and the target(entity Id where it must be posted)

Example

CODE
List<ZCBeans.GenericErrorMessage> errorMessages = new List<ZCBeans.GenericErrorMessage>();
postErrorMessages

global void postErrorMessagesToEntity(Id entityId, String errorMessage, List<ZCBeans.IssueUpsertResult> lstIssues)

Post errors of multiple issue update events to a target entity Id.

Parameters

Id entityId The target entity.
String errorMessage A prefix concatenated with the error messages.
List<ZCBeans.IssueUpsertResult> lstIssues The results from a bulk update or validate operation (only error messages will be posted)

Example

CODE
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.bulkUpdateIssues(lstIssues);
zsfjira.ZC.Issues.postErrorMessagesToEntity(Id.valueOf('500i000000weOJe'),'Invalid Input',iresults);

global virtual void postErrorMessagesToEntity(String connectionId, Id entityId, String errorMessage, List<ZCBeans.IssueUpsertResult> lstIssues)

Using a specific Jira connection id, It posts errors of multiple issue update events to a target entity Id.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
Id entityId The target entity.
String errorMessage A prefix concatenated with the error messages.
List<ZCBeans.IssueUpsertResult> lstIssues The results from a bulk update or validate operation (only error messages will be posted)

Example

CODE
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.bulkUpdateIssues(lstIssues);
zsfjira.ZC.Issues.postErrorMessagesToEntity('j01', Id.valueOf('500i000000weOJe'),'Invalid Input',iresults);

global void postErrorMessagesToEntity(Id entityId, List<ZCBeans.IssueUpsertResult> lstIssues)

Post errors of multiple issue update events to a target entity Id.

Parameters

Id entityId The target entity.
List<ZCBeans.IssueUpsertResult> lstIssues The results from a bulk update or validate operation (only error messages will be posted)

Example

CODE
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.bulkUpdateIssues(lstIssues);
zsfjira.ZC.Issues.postErrorMessagesToEntity(Id.valueOf('500i000000weOJe'),iresults);

global virtual void postErrorMessagesToEntity(String connectionId, Id entityId, List<ZCBeans.IssueUpsertResult> lstIssues)

Using a specific Jira connection id, It posts errors of multiple issue update events to a target entity Id.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
Id entityId The target entity.
List<ZCBeans.IssueUpsertResult> lstIssues The results from a bulk update or validate operation (only error messages will be posted)

Example

CODE
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.bulkUpdateIssues(lstIssues);
zsfjira.ZC.Issues.postErrorMessagesToEntity('j01', Id.valueOf('500i000000weOJe'),iresults);

global void postErrorMessageToEntity(Id entityId, String errorMessage, ZCBeans.IssueUpsertResult issue)

Post errors of a single issue update

Parameters

Id entityId The target entity.
String errorMessage A prefix concatenated with the error messages.
ZCBeans.IssueUpsertResult issue The result from an update or validate operation (only error messages will be posted)

Example

CODE
zsfjira.ZCBeans.IssueUpsertResult iresult = zsfjira.ZC.Issues.updateIssues(issue);
zsfjira.ZC.Issues.postErrorMessageToEntity(Id.valueOf('500i000000weOJe'),'Invalid Input',iresult);

global virtual void postErrorMessageToEntity(String connectionId, Id entityId, String errorMessage, ZCBeans.IssueUpsertResult issue)

Using a specific Jira connection id, It posts errors of a single issue update

Parameters

String connectionId An internal identifier for a specific Jira Connection.
Id entityId The target entity.
String errorMessage A prefix concatenated with the error messages.
ZCBeans.IssueUpsertResult issue The result from an update or validate operation (only error messages will be posted)

Example

CODE
zsfjira.ZCBeans.IssueUpsertResult iresult = zsfjira.ZC.Issues.updateIssues(issue);
zsfjira.ZC.Issues.postErrorMessageToEntity('j01', Id.valueOf('500i000000weOJe'),'Invalid Input',iresult);

global void postErrorMessageToEntity(Id entityId, ZCBeans.IssueUpsertResult issue)

Post errors of a single issue update

Parameters

Id entityId: the target entity
ZCBeans.IssueUpsertResult issue The result from an update or validate operation (only error messages will be posted)

Example

CODE
zsfjira.ZCBeans.IssueUpsertResult iresult = zsfjira.ZC.Issues.updateIssues(issue);
zsfjira.ZC.Issues.postErrorMessageToEntity(Id.valueOf('500i000000weOJe'),iresult);

global virtual void postErrorMessageToEntity(String connectionId, Id entityId, ZCBeans.IssueUpsertResult issue)

Using a specific Jira connection id, It posts errors of a single issue update

Parameters

String connectionId An internal identifier for a specific Jira Connection.
Id entityId: the target entity
ZCBeans.IssueUpsertResult issue The result from an update or validate operation (only error messages will be posted)

Example

CODE
zsfjira.ZCBeans.IssueUpsertResult iresult = zsfjira.ZC.Issues.updateIssues(issue);
zsfjira.ZC.Issues.postErrorMessageToEntity('j01', Id.valueOf('500i000000weOJe'),iresult);

global ZCBeans.AttachmentRequestResult sendAttachments(Id onErrorEntityID, List<ZCBeans.SalesforceAttachment> attachments)

Perform a request to Jira to download the given Salesforce file(s).

Parameters

Id onErrorEntityID The entity where the error messages will be posted.
List<ZCBeans.SalesforceAttachment> attachments A list of files.

Return Value

Result of the request (result of the download will be posted to the onErrorEntityID once the operation is completed)

Example

CODE
Id fileId = Id.valueOf('0690H00000392W8');
String issueKey = 'SEL-118';
zsfjira.ZCBeans.SalesforceAttachment attachment = new zsfjira.ZCBeans.SalesforceAttachment(fileId,issueKey);
...
zsfjira.ZCBeans.AttachmentRequestResult requestResult = zsfjira.ZC.Issues.sendAttachments(Id.valueOf('5000H00000xLWAd'), attachments);

global virtual ZCBeans.AttachmentRequestResult sendAttachments(String connectionId, Id onErrorEntityID, List<ZCBeans.SalesforceAttachment>attachments)

Using a specific Jira connection id, It performs a request to Jira to download the given Salesforce file(s).

Parameters

String connectionId An internal identifier for a specific Jira Connection.
Id onErrorEntityID The entity where the error messages will be posted.
List<ZCBeans.SalesforceAttachment> attachments A list of files.

Return Value

Result of the request (result of the download will be posted to the onErrorEntityID once the operation is completed)

Example

CODE
Id fileId = Id.valueOf('0690H00000392W8');
String issueKey = 'SEL-118';
zsfjira.ZCBeans.SalesforceAttachment attachment = new zsfjira.ZCBeans.SalesforceAttachment(fileId,issueKey);
...
zsfjira.ZCBeans.AttachmentRequestResult requestResult = zsfjira.ZC.Issues.sendAttachments('j01', Id.valueOf('5000H00000xLWAd'), attachments);

global void setApiOptions(ZCBeans.ApiOptions options)

Defines the global options to be applied in subsequent zAgileConnect API calls in the current transaction

Parameters

ZCBeans.ApiOptions options, object that holds the options

Example

CODE
zsfjira.ZCBeans.ApiOptions options= new zsfjira.ZCBeans.ApiOptions();
options.userImpersonate = false;
zsfjira.ZC.Issues.setApiOptions(options);

global ZCBeans.TransitionIssueResult transitionIssue(String issueKey, ZCBeans.TransitionIssueBean transitionIssueBean)

Performs an Issue transition

Parameters

IssueKey Issue Key
transitionIssueBean Transition and its fields and comment data

Return Value

ZCBeans.TransitionIssueResult

Example

CODE
ZCBeans.AvailableTransitionsResult availableTransitionsResult =  ZC.Issues.getAvailableTransitions('SEL-1019');
ZCBeans.TransitionIssueBean transitionIssueBean = availableTransitionsResult.buildIssueTransitionFromName('Stop Progress');
ZCBeans.TransitionIssueResult transitionIssueResult = ZC.Issues.transitionIssue('SEL-1019', transitionIssueBean);

global virtual ZCBeans.TransitionIssueResult transitionIssue(String connectionId, String issueKey, ZCBeans.TransitionIssueBean transitionIssueBean)

Using a specific Jira connection id, It performs an Issue transition

Parameters

String connectionId An internal identifier for a specific Jira Connection.
IssueKey  IssueKey
transitionIssueBean Transition and its fields and comment data

Return Value

ZCBeans.TransitionIssueResult

Example

CODE
ZCBeans.AvailableTransitionsResult availableTransitionsResult =  ZC.Issues.getAvailableTransitions('SEL-1019');
ZCBeans.TransitionIssueBean transitionIssueBean = availableTransitionsResult.buildIssueTransitionFromName('Stop Progress');
ZCBeans.TransitionIssueResult transitionIssueResult = ZC.Issues.transitionIssue('j01', 'SEL-1019', transitionIssueBean);

global ZCBeans.IssueLinkUnlinkResult unlinkIssue(String issueKey, Id entityId)

Unlink a Jira Issue from a Salesforce entity.

Parameters

String issueKey The Jira issue key.
Id entityId The Salesforce entity Id.

Return Value

The results of the Unlink operation.

Example

CODE
zsfjira.ZC.Issues.unlinkIssue('TP-1',Id.valueOf('5000H00000xLWAd'));

global virtual ZCBeans.IssueLinkUnlinkResult unlinkIssue(String connectionId, String issueKey, Id entityId)

Using a specific Jira connection id, It unlinks a Jira Issue from a Salesforce entity.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
String issueKey The Jira issue key.
Id entityId The Salesforce entity Id.

Return Value

The results of the Unlink operation.

Example

CODE
zsfjira.ZC.Issues.unlinkIssue('j01', 'TP-1',Id.valueOf('5000H00000xLWAd'));

global List<ZCBeans.IssueLinkUnlinkResult> unlinkIssues(Set<String> selectedIssueKeys, Id entityId)

Unlink a list of Jira Issues from a Salesforce entity.

Parameters

Set<String> selectedIssueKeys The Jira issues to be unlinked.
Id entityId The Salesforce entity Id.

Return Value

List of results of the Unlink operation.

Example

CODE
Set<String> issueKeys=new Set<String>();
issueKeys.add('TP-1');
issueKeys.add('TP-6');
issueKeys.add('TP-7');
List<zsfjira.ZCBeans.IssueLinkUnlinkResult> results = zsfjira.ZC.Issues.unlinkIssues(issueKeys,Id.valueOf('5000H00000xLWAd'));

global virtual List<ZCBeans.IssueLinkUnlinkResult> unlinkIssues(String connectionId, Set<String> selectedIssueKeys, Id entityId)

Using a specific Jira connection id, It unlinks a list of Jira Issues from a Salesforce entity.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
Set<String> selectedIssueKeys The Jira issues to be unlinked.
Id entityId The Salesforce entity Id.

Return Value

List of results of the Unlink operation.

Example

CODE
Set<String> issueKeys=new Set<String>();
issueKeys.add('TP-1');
issueKeys.add('TP-6');
issueKeys.add('TP-7');
List<zsfjira.ZCBeans.IssueLinkUnlinkResult> results = zsfjira.ZC.Issues.unlinkIssues('j01', issueKeys,Id.valueOf('5000H00000xLWAd'));

global ZCBeans.IssueUpsertResult updateIssue(ZCBeans.IssueTemplate issue)

Update an issue from a template. This method must only be used for updating a single issue. For updating multiple issues, please refer to bulkUpdateIssues.

Parameters

ZCBeans.IssueTemplate issue The issue template that represents the issue to be updated.

Return Value

An object containing success or error list.

Example

CODE
zsfjira.ZCBeans.IssueTemplate issue = new zsfjira.ZCBeans.IssueTemplate(Id.valueOf('500i000000wg9bS'));
...
zsfjira.ZCBeans.IssueUpsertResult iresult = zsfjira.ZC.Issues.updateIssue(issue);

global virtual ZCBeans.IssueUpsertResult updateIssue(String connectionId, ZCBeans.IssueTemplate issue)

Using a specific Jira connection id, It updates an issue from a template. This method must only be used for updating a single issue. For updating multiple issues, please refer to bulkUpdateIssues.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
ZCBeans.IssueTemplate issue The issue template that represents the issue to be updated.

Return Value

An object containing success or error list.

Example

CODE
zsfjira.ZCBeans.IssueTemplate issue = new zsfjira.ZCBeans.IssueTemplate(Id.valueOf('500i000000wg9bS'));
...
zsfjira.ZCBeans.IssueUpsertResult iresult = zsfjira.ZC.Issues.updateIssue(issue);

global ZCBeans.IssueCommentResult updateJIRAIssueComment(String issueKeyOrId, String issueCommentId, String comment)

Update a Jira Issue comment.

Parameters

String issueKeyOrId The Jira Issue key or Id.
String issueCommentId The Comment Id.
String comment: Comment body.

Return Value

The result of the operation.

Example

CODE
ZCBeans.IssueCommentResult result = ZC.Issues.updateJIRAIssueComment('SEL-118','12693','Comment test(edited)');

global virtual ZCBeans.IssueCommentResult updateJIRAIssueComment(String connectionId, String issueKeyOrId, String issueCommentId, String comment)

Using a specific Jira connection id, It updates a Jira Issue comment.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
String issueKeyOrId The Jira Issue key or Id.
String issueCommentId The Comment Id.
String comment: Comment body.

Return Value

The result of the operation.

Example

CODE
ZCBeans.IssueCommentResult result = ZC.Issues.updateJIRAIssueComment('j01', 'SEL-118','12693','Comment test(edited)');

global List<ZCBeans.IssueUpsertResult> validateAndSanitizeBulkCreateIssuesInput(List<ZCBeans.IssueTemplate> lstIssues)

Validates a list of issue templates to be created and sanitizes fields not referenced in the issue metadata.

Parameters

List<ZCBeans.IssueTemplate> lstIssues List of templates representing the issues to be created.

Return Value

A list of results for each template containing appropriate errors or warnings based on the validation.

Example

CODE
zsfjira.ZCBeans.IssueTemplate issue = new zsfjira.ZCBeans.IssueTemplate(Id.valueOf('500i000000weOJe'));
...
List<zsfjira.ZCBeans.IssueTemplate> lstIssues = new List<zsfjira.ZCBeans.IssueTemplate>();
lstIssues.add(issue);
...
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.validateAndSanitizeBulkCreateIssuesInput(lstIssues);

global virtual List<ZCBeans.IssueUpsertResult> validateAndSanitizeBulkCreateIssuesInput(String connectionId, List<ZCBeans.IssueTemplate> lstIssues)

Using a specific Jira connection id, It validates a list of issue templates to be created and sanitizes fields not referenced in the issue metadata.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
List<ZCBeans.IssueTemplate> lstIssues List of templates representing the issues to be created.

Return Value

A list of results for each template containing appropriate errors or warnings based on the validation.

Example

CODE
zsfjira.ZCBeans.IssueTemplate issue = new zsfjira.ZCBeans.IssueTemplate(Id.valueOf('500i000000weOJe'));
...
List<zsfjira.ZCBeans.IssueTemplate> lstIssues = new List<zsfjira.ZCBeans.IssueTemplate>();
lstIssues.add(issue);
...
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.validateAndSanitizeBulkCreateIssuesInput('j01', lstIssues);

global List<ZCBeans.IssueUpsertResult> validateAndSanitizeBulkUpdateIssuesInput(List<ZCBeans.IssueTemplate> lstIssues)

Validates a list of issues templates to be updated. Sanitizes fields not referenced in the issue metadata.

Parameters

List<ZCBeans.IssueTemplate> lstIssues List of templates representing the issues to be updated

Return Value

A list of results for each template; each result may contain errors or warnings as a result of the validation.

Example

CODE
zsfjira.ZCBeans.IssueTemplate issue = new zsfjira.ZCBeans.IssueTemplate('SEL-120');
...
List<zsfjira.ZCBeans.IssueTemplate>lstIssues = new List<zsfjira.ZCBeans.IssueTemplate>();
lstIssues.add(issue);
...
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.validateAndSanitizeBulkCreateIssuesInput(lstIssues);

global virtual List<ZCBeans.IssueUpsertResult> validateAndSanitizeBulkUpdateIssuesInput(String connectionId, List<ZCBeans.IssueTemplate> lstIssues)

Using a specific Jira connection id, It validates a list of issues templates to be updated. Sanitizes fields not referenced in the issue metadata.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
List<ZCBeans.IssueTemplate> lstIssues List of templates representing the issues to be updated

Return Value

A list of results for each template; each result may contain errors or warnings as a result of the validation.

Example

CODE
zsfjira.ZCBeans.IssueTemplate issue = new zsfjira.ZCBeans.IssueTemplate('SEL-120');
...
List<zsfjira.ZCBeans.IssueTemplate>lstIssues = new List<zsfjira.ZCBeans.IssueTemplate>();
lstIssues.add(issue);
...
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.validateAndSanitizeBulkCreateIssuesInput('j01', lstIssues);

global List<ZCBeans.IssueUpsertResult> validateBulkCreateIssuesInput(List<ZCBeans.IssueTemplate> lstIssues)

Validates a list of issues templates to be created.

Parameters

List<ZCBeans.IssueTemplate> lstIssues List of templates representing the issues to be created.

Return Value

A list of results for each template containing errors based on the validation.

Example

CODE
zsfjira.ZCBeans.IssueTemplate issue = new zsfjira.ZCBeans.IssueTemplate(Id.valueOf('500i000000weOJe'));
...
List<zsfjira.ZCBeans.IssueTemplate>lstIssues = new List<zsfjira.ZCBeans.IssueTemplate>();
lstIssues.add(issue);
...
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.validateBulkCreateIssuesInput(lstIssues);

global virtual List<ZCBeans.IssueUpsertResult> validateBulkCreateIssuesInput(String connectionId, List<ZCBeans.IssueTemplate> lstIssues)

Using a specific Jira connection id, It validates a list of issues templates to be created.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
List<ZCBeans.IssueTemplate> lstIssues List of templates representing the issues to be created.

Return Value

A list of results for each template containing errors based on the validation.

Example

CODE
zsfjira.ZCBeans.IssueTemplate issue = new zsfjira.ZCBeans.IssueTemplate(Id.valueOf('500i000000weOJe'));
...
List<zsfjira.ZCBeans.IssueTemplate>lstIssues = new List<zsfjira.ZCBeans.IssueTemplate>();
lstIssues.add(issue);
...
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.validateBulkCreateIssuesInput('j01', lstIssues);

global List<ZCBeans.IssueUpsertResult> validateBulkUpdateIssuesInput(List<ZCBeans.IssueTemplate> lstIssues)

Validates a list of issue templates to be updated.

Parameters

List<ZCBeans.IssueTemplate> lstIssues List of templates representing the issues to be updated.

Return Value

A list of results for each template, each result may contain errors as a result of the validation.

Example

CODE
zsfjira.ZCBeans.IssueTemplate issue = new zsfjira.ZCBeans.IssueTemplate('SEL-123');
...
List<zsfjira.ZCBeans.IssueTemplate>lstIssues = new List<zsfjira.ZCBeans.IssueTemplate>();
lstIssues.add(issue);
...
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.validateBulkUpdateIssuesInput(lstIssues);

global virtual List<ZCBeans.IssueUpsertResult> validateBulkUpdateIssuesInput(String connectionId, List<ZCBeans.IssueTemplate> lstIssues)

Using a specific Jira connection id, It Validates a list of issue templates to be updated.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
List<ZCBeans.IssueTemplate> lstIssues List of templates representing the issues to be updated.

Return Value

A list of results for each template, each result may contain errors as a result of the validation.

Example

CODE
zsfjira.ZCBeans.IssueTemplate issue = new zsfjira.ZCBeans.IssueTemplate('SEL-123');
...
List<zsfjira.ZCBeans.IssueTemplate>lstIssues = new List<zsfjira.ZCBeans.IssueTemplate>();
lstIssues.add(issue);
...
List<zsfjira.ZCBeans.IssueUpsertResult> iresults = zsfjira.ZC.Issues.validateBulkUpdateIssuesInput('j01', lstIssues);

ZC.IssueFactory Class

global with sharing virtual class IssueFactory extends ZC

Methods


global ZCBeans.IssueTemplate buildCreateTemplateFromMapping(Id entityId)

Builds an Issue template from an entity Id. The resulting template is populated based on the mapped fields.

Parameters

Id entityId Entity from where it will extract the fields for building the issue template.

Return Value

The template populated with the entity fields.

Example

CODE
zsfjira.ZCBeans.IssueTemplate issue = zsfjira.ZC.IssueFactory.buildCreateTemplateFromMapping(Id.valueOf('500i000000weOJe'));

global virtual ZCBeans.IssueTemplate buildCreateTemplateFromMapping(String connectionId, Id entityId)

Using a specific Jira connection id, It builds an Issue template from an entity Id. The resulting template is populated based on the mapped fields.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
Id entityId Entity from where it will extract the fields for building the issue template (e.g., a Case ID).

Return Value

The template populated with the entity fields.

Example

CODE
zsfjira.ZCBeans.IssueTemplate issue = zsfjira.ZC.IssueFactory.buildCreateTemplateFromMapping('j01', Id.valueOf('500i000000weOJe'));

global List<ZCBeans.IssueTemplate> buildCreateTemplateFromMapping(List<Id> entityIds)

Builds a list of templates from a list of entities. The returned list comprises of templates populated from their corresponding entities with the mapped fields.

Parameters

List<Id> entityIds The list of entities from where it will extract fields for building the templates.

Return Value

List of templates.

Example

CODE
List<zsfjira.ZCBeans.IssueTemplate>lstIssues = zsfjira.ZC.IssueFactory.buildCreateTemplateFromMapping(new List<Id>{Id.valueOf('500i000000weOJe'),Id.valueOf('500i000000x8OJx')});

global virtual List<ZCBeans.IssueTemplate> buildCreateTemplateFromMapping(String connectionId, List<Id> entityIds)

Using a specific Jira connection id, it builds a list of templates from a list of entities. The returned list comprises of templates populated from their corresponding entities with the mapped fields.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
List<Id> entityIds The list of entities from where it will extract fields for building the templates (e.g., Case IDs).

Return Value

A list of templates.

Example

CODE
List<zsfjira.ZCBeans.IssueTemplate> lstIssues = zsfjira.ZC.IssueFactory.buildCreateTemplateFromMapping('j01', new List<Id>{Id.valueOf('500i000000weOJe'), Id.valueOf('500i000000x8OJx')});

global ZCBeans.IssueTemplate buildUpdateTemplateFromMapping(String issueKey)

Builds a template from an existent issue using fields from its related Salesforce parent object based on the configured field mapping.

Parameters

String issueKey The JIRA issue that the method will use for building the template based on its related Salesforce parent object.

Return Value

A template containing issue fields populated from the corresponding Salesforce parent object. The method returns null if the issue was not created from Salesforce.

Example

CODE
zsfjira.ZCBeans.IssueTemplate issue = zsfjira.ZC.IssueFactory.buildUpdateTemplateFromMapping('SEL-102');

global virtual ZCBeans.IssueTemplate buildUpdateTemplateFromMapping(String connectionId, String issueKey)

Using a specific Jira connection id, it builds a template from an existent issue using fields from its related Salesforce parent object based on the configured field mapping.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
String issueKey The Jira issue that the method will use for building the template based on its related Salesforce parent object.

Return Value

A template containing issue fields populated from the corresponding Salesforce parent object. The method returns null if the issue was not created from Salesforce.

Example

CODE
zsfjira.ZCBeans.IssueTemplate issue = zsfjira.ZC.IssueFactory.buildUpdateTemplateFromMapping('j01','SEL-102');

global List<ZCBeans.IssueTemplate> buildUpdateTemplateFromMapping(Set<String> issueKeys)

Builds a list of templates from a list of issues. The returned list comprises of templates populated with the mapped fields from the parent Salesforce objects.

Parameters

Set<String> issueKeys Issue keys that the method will use for building the templates based on their corresponding Salesforce entities.

Return Value

A list of templates containing issues populated with fields from the parent Salesforce objects. The method will not return templates for issues not created from Salesforce.

Example

CODE
List<zsfjira.ZCBeans.IssueTemplate>lstIssues = zsfjira.ZC.IssueFactory.buildUpdateTemplateFromMapping(new Set<String> {'SEL-102','SEL-103'});

global virtual List<ZCBeans.IssueTemplate> buildUpdateTemplateFromMapping(String connectionId, Set<String> issueKeys)

Using a specific Jira connection id, It builds a list of templates from a list of issues. The returned list comprises of templates populated with the mapped fields from the parent Salesforce objects.

Parameters

String connectionId An internal identifier for a specific Jira Connection.
Set<String> issueKeys Issue keys that the method will use for building the templates based on their corresponding Salesforce entities.

Return Value

A list of templates containing issues populated with fields from the parent Salesforce objects. The method will not return templates for issues not created from Salesforce.

Example

CODE
List<zsfjira.ZCBeans.IssueTemplate> lstIssues = zsfjira.ZC.IssueFactory.buildUpdateTemplateFromMapping('j01', new Set<String> {'SEL-102','SEL-103'});

ZC.PermissionsApi Class

global with sharing virtual class PermissionsApi extends ZC

Methods


global Boolean canCreateIssues()

Queries if the current user is granted to create Jira issues(default Jira connection)

Return Value

true if user can create Jira issues

Example

CODE
if (zsfjira.ZC.Permissions.canCreateIssues()) {
  ...
}

global Boolean canCreateIssues(String connectionId)

Queries if the current user is granted to create Jira issues(for an specific Jira connection)

Parameters

String connectionId An internal identifier for a specific Jira Connection.

Return Value

true if user can create Jira issues

Example

CODE
if (zsfjira.ZC.Permissions.canCreateIssues('j02')) {
  ...
}

global Boolean canDeleteIssues()

Queries if the current user is granted to delete Jira issues(default Jira connection)

Return Value

true if user can delete Jira issues

Example

CODE
if (zsfjira.ZC.Permissions.canDeleteIssues()) {
  ...
}

global Boolean canDeleteIssues(String connectionId)

Queries if the current user is granted to delete Jira issues(for an specific Jira connection)

Parameters

String connectionId An internal identifier for a specific Jira Connection.

Return Value

true if user can delete Jira issues

Example

CODE
if (zsfjira.ZC.Permissions.canDeleteIssues('j02')) {
  ...
}

global Boolean canEditIssues()

Queries if the current user is granted to edit Jira issues(default Jira connection)

Return Value

true if user can edit Jira issues

Example

CODE
if (zsfjira.ZC.Permissions.canEditIssues()) {
  ...
}

global Boolean canEditIssues(String connectionId)

Queries if the current user is granted to edit Jira issues(for an specific Jira connection)

Parameters

String connectionId An internal identifier for a specific Jira Connection.

Return Value

true if user can edit Jira issues

Example

CODE
if (zsfjira.ZC.Permissions.canEditIssues('j02')) {
  ...
}

global Boolean canLinkIssues()

Queries if the current user is granted to link Jira issues(default Jira connection)

Return Value

true if user can link Jira issues

Example

CODE
if (zsfjira.ZC.Permissions.canLinkIssues()) {
  ...
}

global Boolean canLinkIssues(String connectionId)

Queries if the current user is granted to link Jira issues(for an specific Jira connection)

Parameters

String connectionId An internal identifier for a specific Jira Connection.

Return Value

true if user can link Jira issues

Example

CODE
if (zsfjira.ZC.Permissions.canLinkIssues('j02')) {
  ...
}

global Boolean canLoginToJira()

Queries if the current user is granted to login to Jira using its own user(default Jira connection)

Return Value

true if user can login to Jira

Example

CODE
if (zsfjira.ZC.Permissions.canLoginToJira()) {
  ...
}

global Boolean canLoginToJira(String connectionId)

Queries if the current user is granted to login to Jira using its own user(for an specific Jira connection)

Parameters

String connectionId An internal identifier for a specific Jira Connection.

Return Value

true if user can login to Jira

Example

CODE
if (zsfjira.ZC.Permissions.canLoginToJira('j02')) {
  ...
}

global Boolean canOperateAsIntegrationUser()

Queries if the current user is allowed to operate with integration user(default Jira connection)

Return Value

true if user can use zAgileConnect with integration user

Example

CODE
if (zsfjira.ZC.Permissions.canOperateAsIntegrationUser()) {
  ...
}

global Boolean canOperateAsIntegrationUser(String connectionId)

Queries if the current user is allowed to operate with integration user(for an specific Jira connection)

Parameters

String connectionId An internal identifier for a specific Jira Connection.

Return Value

true if user can use zAgileConnect with integration user

Example

CODE
if (zsfjira.ZC.Permissions.canOperateAsIntegrationUser('j02')) {
  ...
}

global Boolean canTransitionIssues()

Queries if the current user is granted to perform a Jira issue transition(default Jira connection)

Return Value

true if user can perform a transition on a Jira issue

Example

CODE
if (zsfjira.ZC.Permissions.canTransitionIssues()) {
  ...
}

global Boolean canTransitionIssues(String connectionId)

Queries if the current user is granted to perform a Jira issue transition(for an specific Jira connection)

Parameters

String connectionId An internal identifier for a specific Jira Connection.

Return Value

true if user can perform a transition on a Jira issue

Example

CODE
if (zsfjira.ZC.Permissions.canTransitionIssues('j02')) {
  ...
}

global Boolean canUnlinkIssues()

Queries if the current user is granted to unlink Jira issues(default Jira connection)

Return Value

true if user can unlink Jira issues

Example

CODE
if (zsfjira.ZC.Permissions.canUnlinkIssues()) {
  ...
}

global Boolean canUnlinkIssues(String connectionId)

Queries if the current user is granted to unlink Jira issues(for an specific Jira connection)

Parameters

String connectionId An internal identifier for a specific Jira Connection.

Return Value

true if user can unlink Jira issues

Example

CODE
if (zsfjira.ZC.Permissions.canUnlinkIssues('j02')) {
  ...
}

global Boolean isCurrentUserLoggedInJira()

Queries if the current user is logged into Jira(default Jira connection)

Return Value

true if user is logged into Jira using its own user

Example

CODE
if (zsfjira.ZC.Permissions.isCurrentUserLoggedInJira()) {
  ...
}

global Boolean isCurrentUserLoggedInJira(String connectionId)

Queries if the current user is logged into Jira(for an specific Jira connection)

Parameters

String connectionId An internal identifier for a specific Jira Connection.

Return Value

true if user is logged into Jira using its own user

Example

CODE
if (zsfjira.ZC.Permissions.isCurrentUserLoggedInJira('j02')) {
  ...
}
JavaScript errors detected

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

If this problem persists, please contact our support.