Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
JIRA Development Cookbook
JIRA Development Cookbook

JIRA Development Cookbook: Develop and customize plugins, program workflows, work on custom fields, master JQL functions, and more to effectively customize, manage, and extend JIRA

eBook
€35.98 €39.99
Paperback
€48.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

JIRA Development Cookbook

Chapter 2. Understanding Plugin Framework

In this chapter, we will see more details on the JIRA Architecture and the plugin framework. We will also see the following recipes:

  • Converting plugins from v1 to v2

  • Adding resources into plugins

  • Adding web resources to the plugin

  • Building JIRA from source

  • Adding new webwork actions to JIRA

  • Extending a webwork action in JIRA

Introduction


As we saw in the previous chapter, the JIRA plugin development process is probably an easier task than we expected it to be. With the help of Atlassian Plugin SDK, developers can spend more time worrying about the plugin logic than on the troublesome deployment activities. And yes, after all, it is the plugin logic that is going to make an impact!

This chapter details how the various components fit into JIRA's architecture and how JIRA exposes the various pluggable points. We will also see an overview of the JIRA's system plugins to find out how JIRA uses the plugin architecture to its own benefit, followed by some useful recipes!

JIRA Architecture

We will quickly see how the various components within JIRA fit in to form the JIRA we know. It is best described in a diagram and Atlassian has a neat one along with a detailed explanation at http://confluence.atlassian.com/display/JIRA/JIRA+Architectural+Overview. We will re-draw the diagram a little bit to explain it in a brief but...

Converting plugins from v1 to v2


If you are moving to JIRA 4.x from JIRA 3.13.x or earlier versions, one of the important differences is the introduction of v2 plugins. While designing the upgrade to JIRA 4.x, it makes perfect sense to sometimes migrate the plugins from v1 to v2, although it is not a mandatory step. In this recipe, we will see how to convert a version1 plugin to a version2 plugin.

Getting ready

There are a couple of questions we need to ask before the plugin is converted:

  • Are all the packages used by the plugin available to OSGi plugins ? This is very important because JIRA doesn't expose all the packages to OSGi plugins.

    The list of packages exported and made available to the plugins2 version can be found in the com.atlassian.jira.plugin.DefaultPackageScannerConfiguration class.

  • Are all the components used by the plugin available to OSGi plugins? Similar to the previous question, we need to make sure the components are also exposed to the OSGi plugins.

    Unfortunately, there is...

Adding resources into plugins


It is often required to add static resources like JavaScript files, CSS files, and so on in our plugins. To enable JIRA to serve these additional static files, they should be defined as downloadable resources.

Getting ready

A resource can be of different types. It is normally defined as a non-Java file that the plugin requires to operate.

Examples of resources that you will come across during JIRA plugin development include, but are not restricted to, the following:

  • Velocity (*.vm) files required to render a view

  • JavaScript files

  • CSS files

  • Property files for localization

How to do it...

To include a resource, add the resource module to the atlassian-plugin.xml file. The resource module can be added as part of the entire plugin or can be included within another module, restricting it just for that module.

The following are the attributes and elements available for the resource module and their uses:

Name

Description

name

Name of the resource. This is used by the plugin...

Adding web resources into plugins


The web resources plugin module, like the resource module we just saw, allows defining downloadable resources. The difference is that the web resources are added at the top of the page in the header with the cache-related headers set to never expire.

An additional advantage of using web resources module is that we can specify the resources to be included in specific contexts within the application.

How to do it...

The root element for the web resource plugin module is web-resource. It supports the following attributes:

Name

Description

Key

The only mandatory attribute. This should be unique within the plugin.

Disabled

Indicates whether the plugin module should be disabled by default or not.

i18n-name-key

The localization key for the human-readable name of the plugin module.

Name

Human-readable name of the web resource.

The following are the key elements supported.

Name

Description

description

Description of the module.

resource

All the resources...

Building JIRA from source


One of the best things about JIRA, if you have a valid license, is that you get to see the source code. To see it, modify it, break it... err modify it because you have the license to do it!

Getting ready

Following are some of the pre-requisites prior to building JIRA from the source.

  • A valid JIRA license to get access to the source code.

  • An environment with JDK 1.5 or higher for JIRA 4.2 and lower versions. JDK 1.6 or higher for JIRA 4.3+.

  • You will need both Maven1 and Maven2 if you are building versions prior to JIRA 4.3. Download Maven version 1.0.x and 2.1.x from http://maven.apache.org. JIRA 4.3+ needs only Maven 2.1.0.

Note

You need both Maven1 and Maven2 for versions prior to JIRA 4.3 because Maven1 is required to build the JIRA source and Maven2 is required to build plugins for JIRA. JIRA has bundled plugins thatneed to be built along with JIRA and so Maven2 is also a must.

Maven 2.1.0+ is required for the plugin development process.

How to do it...

Let us see the...

Adding new webwork actions to JIRA


Most of the time plugin developers will find themselves writing new actions in JIRA to introduce new functionality. Usually these actions are invoked from new web-item links configured at different places in the UI. It could also be from customized JSPs or other parts of the JIRA framework.

New actions can be added to JIRA with the help of the webwork plugin module.

Getting ready

Before we start, it probably makes sense to have a look at the webwork plugin module. Following are the key attributes supported:

Name

Description

Key

A unique key within the plugin. It will be used as the identifier for the plugin.

Class

This will be java.lang.Object as the real logic will reside in the action, Class.

i18n-name-key

The localization key for the human-readable name of the plugin module.

Name

Human-readable name of the webwork action.

The following are the key elements supported:

Name

Description

description

Description of the webwork module.

actions

...

Extending a webwork action in JIRA


There are so many user stories for this one! How do you override some of the JIRA built-in actions? How do you do some additional stuff in the JIRA built-in action? (Like doing some crazy things immediately after creation before the page returns to the user, or doing some innovative validations on some of those actions)

Extending the existing JIRA action is an answer to all these questions. Let us see in detail how to do that.

How to do it...

Extending a JIRA action is done with the help of the webwork plugin module. Most of it is very similar to writing new webwork actions.

Let us take the case of the create issue action. What should we do if we need to extend the create action? Say, to do some additional validation and to do some extra things after the actual creation is done?

The following are the steps, in a nutshell:

  1. Identify the action to be overridden by looking up the actions.xml under WEB-INF/classes in your JIRA installation directory.

    In our case, CreateIssueDetails...

Left arrow icon Right arrow icon

Key benefits

  • Extend and Customize JIRA--Work with custom fields, workflows, Reports & Gadgets, JQL functions, plugins, and more
  • Customize the look and feel of your JIRA User Interface by adding new tabs, web items and sections, drop down menus, and more
  • Master JQL - JIRA Query Language that enables advanced searching capabilities through which users can search for issues in their JIRA instance and then exploit all the capabilities of issue navigator
  • Part of Packt's Cookbook series: Each recipe is a carefully organized sequence of instructions to complete the task as efficiently as possible

Description

JIRA provides issue tracking and project tracking for software development teams to improve code quality and the speed of development.This book is your one-stop resource to master JIRA extension and customization. You will learn how to create your own JIRA plugins, customize the look and feel of your JIRA UI, work with Workflows, Issues, Custom Fields, and much more.The book starts with recipes on simplifying the Plugin development process followed by a complete chapter dedicated to the Plugin Framework to master Plugins in JIRA.Then we will move on to writing custom field plugins to create new field types or custom searchers. We then learn how to program and customize Workflows to transform JIRA into a user-friendly system. Reporting support in an application like JIRA is inevitable! With so much data spanning across different projects, issues, etc and a lot of project planning done on it, we will cover how to work on reports and gadgets to get customized data according to our needs. We will then look at customizing the various searching aspects of JIRA such as JQL, searching in plugins, managing filters, and so on. Then the book steers towards programming Issues, i.e. creating/editing/deleting issues, creating new issue operations, managing the various other operations available on issues via the JIRA APIs etc. In the latter half of the book, you will learn how to customize JIRA by adding new tabs, menus, and web items, communicate with JIRA via the REST, SOAP or XML/RPC interfaces, and work with the JIRA database.The book ends with a chapter on useful and general JIRA recipes.

Who is this book for?

If you are a JIRA developer or project manager who wants to fully exploit the exciting capabilities of JIRA, then this is the perfect book for you.

What you will learn

  • Create and deploy your own JIRA plugins
  • Deal with Custom Fields on an Issue and program Custom Field Options
  • Program and customize Workflows to transform JIRA into a user-friendly system
  • Create reports that show statistics for particular people, projects, versions, or other fields within issues
  • Simplify reporting by writing your own JIRA Gadgets, which can be added into a user s dashboard
  • Create, edit, and delete Issues
  • Master Database handling in JIRA --retrieve Issue information from Database, extend the database, retrieve Custom Field details from the database, access database entities from plugins, and more
  • Communicate with JIRA via the REST, SOAP or XML/RPC interfaces

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Nov 24, 2011
Length: 476 pages
Edition : 1st
Language : English
ISBN-13 : 9781849681810
Vendor :
Atlassian
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Nov 24, 2011
Length: 476 pages
Edition : 1st
Language : English
ISBN-13 : 9781849681810
Vendor :
Atlassian
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 144.97
JIRA 6.x Administration Cookbook
€41.99
JIRA Development Cookbook
€48.99
JIRA 5.2 Essentials
€53.99
Total 144.97 Stars icon

Table of Contents

11 Chapters
Plugin Development Process Chevron down icon Chevron up icon
Understanding Plugin Framework Chevron down icon Chevron up icon
Working with Custom Fields Chevron down icon Chevron up icon
Programming Workflows Chevron down icon Chevron up icon
Gadgets and Reporting in JIRA Chevron down icon Chevron up icon
The Power of JIRA Searching Chevron down icon Chevron up icon
Programming Issues Chevron down icon Chevron up icon
Customizing the UI Chevron down icon Chevron up icon
Remote Access to JIRA Chevron down icon Chevron up icon
Dealing with a Database Chevron down icon Chevron up icon
Useful Recipes Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.7
(7 Ratings)
5 star 71.4%
4 star 28.6%
3 star 0%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Amazon Customer Jan 22, 2012
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book shows the power of JIRA, the best plugin book yet by far from one of the best plugin developers and his company are leaders in JIRA Plugins.Also interesting to see the power of JIRA and why it is taking over the industry! Look out, these products are industry changers and the prices for the products and services have set the status quo up side down!One thing I would like to see, it seems Jobin and his company are using a new style of plugin development, basically a cloud based integration for entire systems instead of traditional point to point solutions they call the product ConnectAll. This book came out before their new ConnectAll plugin. I wish it had covered this approach!
Amazon Verified review Amazon
LB Jun 13, 2012
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I saw this book displayed on one of the vendor stations at the recent Atlassian Summit. After perusing the table of contents, it looked like something that I needed to bring back to my company. Two days after the book arrived there were two V.P.'s and a Director 'fighting' over it and they've already generated query results that have resulted in some process changes and planning decisions. I have ordered 3 additional copies.
Amazon Verified review Amazon
EMC Feb 02, 2012
Full star icon Full star icon Full star icon Full star icon Full star icon 5
An excellent book about JIRA plugin development written for programmers by a programmer. The book is extensive, well organized, homogeneous and very effective. The author guides you through the subject from the initial setup of the development environment, describing the most important JIRA APIs to extend and customize the JIRA behavior, including advanced topics such as JQL customization and the extension of the JIRA database schema. The book also covers in detail the customization process of the JIRA user interface and the integration of JIRA with third party systems using web services (SOAP, RESTful and JAX-RPC). A must-have for a JIRA plugin developer.If you're interested about a more in-depth review of this book, I wrote a post about it in my blog (<...>).
Amazon Verified review Amazon
Modha Jan 05, 2012
Full star icon Full star icon Full star icon Full star icon Full star icon 5
JIRA Development Cookbook is a good book to start learning JIRA plugin development. Content is very well organized and simple to understand examples. Chapters are self contained and cover every aspect of JIRA plugin development and are not presented in overtly technical manner. If you are a plugin guru this book is not for you, but if you are newbie it is worth your money.
Amazon Verified review Amazon
Akila Ramanathan Jan 16, 2012
Full star icon Full star icon Full star icon Full star icon Full star icon 5
If you want to develop Jira as a business system that can almost do anything, get this book to know the nuts and bolts of Jira development.All the chapters were self sufficient and if you are a Jira Admin - this book is for you.-Srini
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.