Skip to main content
Skip table of contents

Using the crm-info servlet to display Jira issues to CRM users

Most users of the CRM plugin use the "JIRA/CRM Field Mappings" to copy JIRA data into CRM where it can be viewed and searched on by CRM users.  However as an alternative you can use the CRM plugin's crm-info servlet to display a screen containing JIRA issues without storing the data in CRM.  The screen returned can be displayed in a new browser window or for Salesforce users it can be "embedded" as a section of a CRM screen.  The biggest advantage of using the crm-info servlet is that you can easily display data from multiple issues.

Example screenshot

The crm-info servlet is usually invoked by creating custom buttons in CRM on your Account, Contact or Case/Bug screens. If you need details on how to create custom buttons in CRM see the instructions for your CRM system (SalesforceSugarCRM).

The custom button will use a URL to invoke the crm-info servlet. The basic form of the URL is:

https://JIRA-HOST/plugins/servlet/crm-info?crmtoken=TOKEN&account=ACCOUNT-RECORD-ID

In place of "account=ACCOUNT-RECORD-ID" you may also use "contact=CONTACT-RECORD-ID" or "case=CASE/BUG-RECORD-ID".

There are other options available to modify the format of the screen returned by the servlet. The complete list of arguments you may put in the URL's query string is as follows:

  • crmtoken - URL security token from "CRM Setup" screen used to authenticate the URL
  • jira_user - A username used to login to JIRA (optional if "crmtoken" is used)
  • pwd - The password for "jira_user" (optional if "crmtoken" is used)
  • account - Show issues linked to the specified account id
  • contact - Show issues linked to the specified contact id
  • case - Show issues linked to the specified case id
  • cols - The JIRA fields to be displayed in the columns of HTML table (See the table below for possible values). The default is "issue-type,key,summary,assignee,reporter,priority,status,resolution,created,updated,due-date"
  • sort - The sort order. The default is "RESOLUTION:D,PRIORITY:D,DUE-DATE,CREATED"
  • target - Set the "target=" attribute of the HTML links to control what browser window is used when a JIRA issue is clicked on. For example "target=_blank" will open a new window.
  • hide_heading - Skip showing the heading at the top of the page
  • jql - A JIRA JQL expression to use to further filter the search. Note that your expression may contain punctuation characters that have a special meaning when used in a URL, you will need to encode these characters, see URL encoding for details.
  • add_filters - Include links for filters at the bottom of the page
  • filter - Show issues using a specified JIRA filter name


Salesforce users that are familiar with creating Visualforce Pages and would like to embed the HTML table in the middle of a Salesforce layout can use the following apex code as the page definition (use the appropriate values for JIRA-HOST and TOKEN for your installation).

Visualforce Markup

CODE
<apex:page standardController="Account">
  <apex:iframe src="http://JIRA-HOST/plugins/servlet/crm-info?crmtoken=TOKEN&hideFooter&account={!Case.AccountId}"/>
</apex:page>

Values for the "cols" argument

These are the possible values for the URL's "cols" argument.  In addition to the following JIRA field names, you may also include JIRA custom fields.  Specify either the name of the custom field or "customfield_nnnnn" where "nnnnn" is the fields's unique id number.

JIRA FieldDescription
affected-versionA list of values from the "Affects Version/s" field
assigneeThe JIRA username of the user assigned to the issue
assignee-emailThe email address of the user assigned to the issue
assignee-fullnameThe full name of the user assigned to the issue
componentA list of values from the "Component/s" field
createdThe date the issue was created
descriptionThe issue's description
due-dateThe date the issue is due
environmentThe value from the "Environment" field
estimateThe number of seconds remaining from the original estimate
fix-versionA list of values from the "Fix Version" field
issue-typeThe type of the issue.
keyThe issue's unique key
labelsA list of the issue's label values
original-estimateThe original time estimate in seconds
parent-idFor sub-tasks, the key of the issue's parent issue
priorityThe value from the issue's "Priority" field
projectThe name of the project containing the issue
project-categoryThe Category of the issue's project
project-idThe issue's project's unique id number
reporterThe JIRA username of the issue's Reporter
reporter-emailThe email address of the issue's Reporter
reporter-fullnameThe full name of the issue's Reporter
resolutionThe value from the issue's "Resolution" field
resolvedThe date the issue was resolved
security-levelThe value from the issue's "Security Level" field
statusThe value from the issue's "Status" field
summaryThe value from the issue's "Summary" field
time-spentThe time in seconds of the total work logged against the issue
updatedThe date the issue was last modified
votesThe number of votes the issue has received
JavaScript errors detected

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

If this problem persists, please contact our support.