Extending JIRA Presentation

advertisement
Extending JIRA
Rachel Wright
July 15, 2014
See slide “Notes” section for commentary and talking points.
Agenda
• Alternate Ways to Interact with JIRA
•
•
•
•
•
Rachel Wright
Get Data into JIRA (via Email)
Get Data into JIRA (via Web Form)
Get Data into JIRA (via Link)
Get Data out of JIRA (Custom Example)
Sync Data with JIRA (Custom Example)
2
Slide 2
Get Data into JIRA (via Email)
• Method: Auto create JIRA issues via email
• Use Cases:
•
•
•
Create support requests from external sources
For non-JIRA users, contractors, etc
For helpdesk-type functions, JIRA access issues
• Benefits:
•
•
•
Subsequent email messages recorded as comments
Email attachments automatically attached to the issue
Email subject becomes the Summary; email body becomes the Description
• For: OnDemand & Download JIRA versions
• Requirements:
• Access to JIRA’s Admin UI
• Creation of new POP or IMAP email address
Rachel Wright
Slide 3
Get Data into JIRA (via Email)
How To:
• Step 1: Create a New Email Address
•
Internal or External? Unique or Generic?
• technology@web.com = Spam issues
• Step 2: Add Mail Server and Email Address to JIRA
•
Go to: JIRA Admin > System > Incoming Mail
• Add your mail server to the POP / IMAP Mail Server section
• Add your email address to the Mail Handlers section
– Set a “Default Reporter”
Documentation: https://confluence.atlassian.com/x/IQP7EQ,
https://confluence.atlassian.com/x/IgP7EQ, JIRA 5.x Development Cookbook
Rachel Wright
Slide 4
Get Data into JIRA (via Email)
Rachel Wright
Slide 5
Get Data into JIRA (via Web Form)
• Method: Auto create with the JIRA Issue Collector
• Use Cases:
•
•
Same as email: Create support requests from external sources, For non-JIRA
users, contractors, etc, For helpdesk-type functions, JIRA access issues
Embed a web form into your website or other applications (Confluence!)
• Benefits:
•
•
Better control data submitted from external sources
Additional customization options (Need even more? Use the API instead.)
• For: OnDemand (included) & Download JIRA (included in JIRA 5.1+ or via free plugin)
• Requirements:
• Admin access to a JIRA Project
• Ability to embed pre-written HTML or JavaScript into another application
Rachel Wright
Slide 6
Get Data into JIRA (via Web Form)
How To:
• Step 1: Setup Issue Collector
•
Go to: Project > Administration > Issue Collectors
• Click the white “Add Issue Collector” button and complete settings form
• Step 2: Add Provided Code Snippet to Application
•
Ex:
<script type="text/javascript"
src="https://yourURL.com/s/d41d8cd98f00b204e9800998ecf8427e/en_US7gux2l1988229788/6158/35/1.4.1/_/download/batch/com.atlassian.jira.collector.plugin.jira-issuecollector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collectorplugin:issuecollector.js?collectorId=5a1417a3"></script>
Documentation: https://confluence.atlassian.com/x/9pA0EQ,
https://confluence.atlassian.com/x/2AKmEQ
Rachel Wright
Slide 7
Get Data into JIRA (via Web Form)
Rachel Wright
Slide 8
Get Data into JIRA (via Web Form)
Rachel Wright
Slide 9
Get Data into JIRA (via Link)
• Method: Auto create with an HTML Link
• Use Cases:
•
•
Same as email: Create support requests from external sources, For non-JIRA
users, contractors, etc, For helpdesk-type functions, JIRA access issues
Embed a link into your website or other applications (Default Dashboard!)
• Benefits:
•
•
Help users create issues in the correct project and issue type
Pass default data
• For: OnDemand & Download JIRA
• Requirements:
• Access to JIRA’s Admin UI (to get Project and Issue IDs)
• Ability to write and embed HTML
Rachel Wright
Slide 10
Get Data into JIRA (via Link)
How To:
• Step 1: Get IDs
•
Get the ID for the Project and Issue Type
• In the Project’s Admin area, hover over the “Edit Project” button and see the ID in
the browser’s status bar
• In the Issue Types Admin area, hover over the “Edit” link and see the ID in the
browser’s status bar
•
Get IDs for any other custom fields
• Hover over the field’s “Edit” link and see the ID in the browser’s status bar
• Step 2: Write HTML and Embed as Desired
•
Link format: <a
href="https://yourURL.com/secure/CreateIssueDetails!init.jspa?pid=10420&issuetype=2&summary
=detailed+example&description=description+goes+here&components=10240&duedate=7%2dDec%
2d2005&customfield_10010=this+is+a+custom+field">
Documentation: https://confluence.atlassian.com/x/yBCmEQ, JIRA 5.x Development Cookbook
Rachel Wright
Slide 11
Get Data into JIRA (via Link)
Rachel Wright
Slide 12
Get Data out of JIRA
• Method: Custom display using API
• Use Case: Create a custom web page, outside of JIRA, which displays real
time JIRA data
• Benefits:
•
•
A more customized “dashboard” and “printer friendly” version
Share issue data with less technical users
• Special Features:
•
•
•
•
Uses standard JIRA UI and authentication
All configuration settings stored and editable in a JIRA issue
Embedded HTML block for quick announcement/instruction changes
Custom link added to JIRA menu bar
• Cons:
•
•
•
Rachel Wright
Maintenance and extra testing at the time of every upgrade
Infrequent JIRA users are even less likely to dive into JIRA
Use of “printer friendly” version results in stale data
Slide 13
Get Data out of JIRA
Rachel Wright
Slide 14
Get Data out of JIRA
• Configuration
• Stored in the Description field
of an issue
• title = Page Title
• group = Creates Sections
• jql = Query Statement
•
JSP File Displays Results
• Web.com Nav Menu
•
Rachel Wright
Custom Menu Plugin Instructions:
https://developer.atlassian.com/x/iQIr
Slide 15
Sync Data with JIRA
• Method: Custom application using API
• Use Case: Create a way to store itemized effort estimates and available
team capacities per release. Show summed effort estimates in JIRA.
• Benefits:
•
•
•
•
•
Collect effort estimates separated by team
Stop storing team capacity numbers in Google Docs
See which teams are over or under utilized
Flag any teams with missing estimates
Few JIRA changes or custom fields needed
• Special Features
• Cons:
•
•
Rachel Wright
Buildout and maintenance of an additional application, database
New application in the workflow
Slide 16
Sync Data with JIRA
Before:
Rachel Wright
Slide 17
Sync Data with JIRA
After:
Rachel Wright
Slide 18
Sync Data with JIRA
• Custom Message Field (for View / for Edit)
•
JIRA Toolkit Plugin - “A collection of useful Custom Fields”
• For: OnDemand (included – enable it) & Download JIRA (via free plugin)
•
•
Use field “Default” value to store text/HTML message
NOTE: Use the “for Edit” Custom Message Field type for transition screens.
• JavaScript Hack (Download JIRA only)
Rachel Wright
•
•
You can embed Javascript in any custom field’s description/default.
Javascript can also be placed in the JIRA "Announcement Banner" BUT it
impacts the entire JIRA application.
•
Ex: <span id="message"></span>
<script>
// get JIRA issue URL path
var path = window.location.pathname;
// remove directories from path
var ticketID = path.replace("/browse/", "");
// insert application location to form new URL
var appURL = “your-new-URL-goes-here"
var url = appURL.concat(ticketID);
document.getElementById("message").innerHTML = "<a href=\"" + url + "\" target=\"_blank\">" + url + "</a>";
</script>
•
See also: JIRA 5.x Development Cookbook
Slide 19
Sync Data with JIRA
Rachel Wright
Slide 20
Questions?
More tips and tricks in the JIRA 5.x Development Cookbook
Written by AUGNOVA Group Member Jobin Kruruvilla from Go2Group!
Rachel Wright
Slide 21
Download