Cover
Copyright
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Table of Contents
Preface
Chapter 1:
Plugin Development Process
Introduction
Setting up the development environment
Creating a skeleton plugin
Adding plugin modules
Deploying a JIRA plugin
Making changes to and redeploying a plugin
Using FastDev for plugin development
Testing and debugging
Chapter 2:
Understanding the Plugin Framework
Introduction
Architecture explained…
Types of plugin modules
Working with the Plugins1 and Plugins2 versions
JIRA system plugins
Stable and core APIs
Modifying Atlassian bundled plugins
Converting plugins from v1 to v2
Adding resources into plugins
Adding web resources into plugins
Building JIRA from source
Adding new webwork actions to JIRA
Extending a webwork action in JIRA
Capturing plugin installation/uninstallation events
Chapter 3:
Working with
Custom Fields
Introduction
Writing a simple custom field
Custom field searchers
Dealing with custom fields on an issue
Programming custom field options
Overriding validation of custom fields
Customizing the change log value
Migrating from one custom field type to another
Making custom fields sortable
Displaying custom fields on subtask columns
User and date fields
Adding custom fields to notification mails
Adding help text for a custom field
Removing the "none" option from a select field
Making the custom field project importable
Changing the size of a text area custom field
Chapter 4:
Programming workflows
Introduction
Writing a workflow condition
Writing a workflow validator
Writing a workflow post function
Editing an active workflow
Making an issue editable/non-editable based on workflow status
Including/excluding resolutions for specific transitions
Permissions based on workflow status
Internationalization in workflow transitions
Obtaining available workflow actions programmatically
Programmatically progressing on workflows
Obtaining workflow history from the database
Reordering workflow actions in JIRA
Creating common transitions in workflows
Creating global transitions in workflows
Jelly escalation
Chapter 5:
Gadgets and Reporting in JIRA
Introduction
Writing a JIRA report
Reports in an Excel format
Data validation in JIRA reports
Restricting access to reports
Object-configurable parameters for reports
Creating a pie chart in JIRA
Writing JIRA 4 gadgets
Invoking REST services from gadgets
Configuring user preferences in gadgets
Accessing gadgets outside of JIRA
Chapter 6:
The Power of
JIRA Searching
Introduction
Writing a JQL function
Sanitizing JQL functions
Adding a search request view
Smart querying using quick search
Searching in plugins
Parsing JQL queries in plugins
Linking directly to search queries
Index and de-index programmatically
Managing filters programmatically
Subscribing to a filter
Chapter 7:
Programming Issues
Introduction
Creating an issue from a plugin
Creating subtasks on an issue
Updating an issue
Deleting an issue
Adding new issue operations
Conditions on issue operations
Working with attachments
Time tracking and worklog management
Working with comments on issues
Programming change logs
Programming issue links
Discarding fields while cloning
JavaScript tricks on issue fields
Creating issues and comments from an e-mail
Chapter 8:
Customizing the UI
Introduction
Changing the basic look and feel
Adding new web sections in the UI
Adding new web items in the UI
Use of decorators
Adding conditions for web fragments
Creating new Velocity context for web fragments
Adding a new drop-down menu on the top navigation bar
Dynamic creation of web items
Adding new tabs in the View Issue screen
Adding new tabs in the Browse Project screen
Creating the project tab panel using fragments
Adding new tabs in the Browse Version screen
Adding new tabs in the Browse Component screen
Adding issue link renderers
Extending a webwork action to add UI elements
Displaying dynamic notifications/warnings on issues
Re-ordering issue operations in the View Issue page
Re-ordering fields in the View Issue page
CHapter 9:
Remote Access to JIRA
Introduction
Writing a Java client for the REST API
Creating a SOAP client
Writing a Java XML-RPC client
Working with issues
Working with attachments
Remote time tracking
Working with comments
Remote user and group management
Progressing an issue in a workflow
Managing versions
Managing components
Remote administration methods
Exposing services and data entities as REST APIs
Deploying a SOAP service in JIRA
Deploying an XML-RPC service within JIRA
Chapter 10:
Dealing with
the JIRA Database
Introduction
Extending the JIRA database with custom schema
Accessing database entities from plugins
Persisting plugin information in the JIRA database
Using active objects to store data
Accessing JIRA configuration properties
Getting a database connection for JDBC calls
Migrating a custom field from one type to another
Retrieving issue information from a database
Retrieving custom field details from a database
Retrieving permissions on issues from a database
Retrieving workflow details from a database
Updating the issue status in a database
Retrieving users and groups from
a database
Dealing with change history in a database
Chapter 11:
Useful Recipes
Introduction
Writing a service in JIRA
Adding configurable parameters to a service
Writing scheduled tasks in JIRA
Writing listeners in JIRA
Customizing e-mail content
Redirecting to a different page in webwork actions
Adding custom behavior for user details
Deploying a servlet in JIRA
Adding shared parameters to the servlet context
Writing a servlet context listener
Using filters to intercept queries in JIRA
Adding and importing components in JIRA
Adding new module types to JIRA
Enabling access logs in JIRA
Enabling SQL logging in JIRA
Overriding JIRA's default components in plugins
Internationalization in webwork plugins
Sharing common libraries across v2 plugins
Operations using direct HTML links
Index