Showing posts with label jira. Show all posts
Showing posts with label jira. Show all posts

Saturday, 6 August 2011

Atlassian JIRA v. 4.4 Has Been Released

Few days ago Atlassian released a brand new version of its flagship issue and project tracking software: JIRA v. 4.4.

Even though it's a "minor" upgrade it introduces a bunch of great new features, both for users, project administrators and JIRA administrators.

Installation


Installing and upgrading JIRA standalone has always been easy but the new installer and configuration wizard really make it trivial.

If you're going to perform a new JIRA installation, the installer now takes care of everything, including the creation of a dedicated JIRA user to the registration of JIRA as a service in the operating system. The new configuration wizard lets you configure the external database used by JIRA (are you using one, aren't you?) with a handy graphical user interface just during the installation phase. Now, manual configuration file editing and JIRA restarts are left to the geeky administrators.

If you're going to perform multiple JIRA installation, you're going to like the new unattended installation mode that brings even more enterprise-like features to JIRA. Administrators can specify installations settings for JIRA in a dedicated file that can be fed to the installer. To make things even simpler, the JIRA installer is creating one for you when you perform an interactive installation. Just take it and use it as a template: apply the modifications you need and feed it to the installer.

If you're going to perform a JIRA update, something which is very common giving the pace at which Atlassian releases JIRA updates, life's never been so easy. The installer has an update option that takes care of everything, from the backup of your JIRA home directory to the migration of the most common settings (such as web server configuration and database configuration).

User Interface Improvements

JIRA v. 4.4 introduces plenty of improvements targeted at users.


User Time Zone


If users of a single JIRA instance of yours are scattered around the globe, you're going to appreciate the new User time zone property of the user profile. Users can now specify the time zone they're working on so that other people can now what to expect when interacting with them.

User Time Zone



Workflow Viewer


Users granted the appropriate privilege can now see the current status of an issue in a workflow viewer. Users are now able to quickly and visually identify where an issue is in the workflow.

JIRA Workflow Viewer


Other Improvements


There are many other improvements available, such as:

  • New mobile-friendly email templates.
  • New defaults fields in workflow transition screen, such as Linked Issue.
  • Multiple file selection when uploading attachments.
  • JQL improvements.
  • Refurbished Activity Stream gadget.
Please read the official JIRA Release Notes for further information about this version or download a copy of JIRA and try it now.

Improvements for the Administrators

JIRA v. 4.4 introduces many interesting new features that aim to ease further the administration of JIRA and JIRA projects. The thing I like most is that Atlassian has succeeded in simplifying considerably the administration JIRA interface without losing any of the legendary JIRA configuration flexibility.

New Administration Mode

The new administration mode replaces the old administration window and its large administration panel on the left side of the window. The administrator can now enter the administration mode and use a totally new user interface. The administration mode welcomes the admin with a new dashboard-like control panel, where links to the administration windows are grouped by subject.

I really feel that this new mode, beyond the eye candy of the new windows, provides a feeling of order and clarity that the old administration window was losing over time under the weight of more and more menu items.

Workflow Designer

This is a groundbreaking feature many, many administrators are going to love. Simply.

Up to JIRA 4.3, administrators had to define workflows on tabular views, defining the states of the finite state machine and the transaction between them. Looking at a workflow was not possible, the only way being using pencil and paper to draw the finite state machine. The configuration was somewhat cumbersome, although quite clear with respect to other implementations I've seen.

With JIRA 4.4, administrators can now define a workflow using a graphical user interface. Drawing the state machine has never been so easy and I expect that workflow implementation and maintenance costs are going to fall heavily with this new tool.

JIRA Workflow Designer

Improved Project-Centric Administration

JIRA powerful and flexible configuration features always come with some costs: administrators had to fully understand what JIRA schemes are and how they are supposed to be used. The old JIRA configuration interface was schema-centric and sometimes it could be difficult to easily grasp which scheme was supposed to be changed to apply the desired configuration in a project.

Things have changed with JIRA 4.4. The new JIRA configuration interface is project-centric: it combines the power provided by JIRA schemes with an easy user interface that helps the administrator perform his tasks, guiding him through the various configuration steps, always starting from a project administration window.


Conclusions

In my opinion, this is one of the biggest JIRA updates in the recent years. If you think that this is just a minor upgrade, I'm sure you'd be surprised to discover that you're wrong: maybe such an upgrade would have deserved a major version upgrade.

Impressions were overall good. I was pleased to discover that I had not to go through diff-ing configuration files to migrate the Tomcat and database configuration from the old to the new JIRA instance: not only the odds of making a mistake are dumped to zero, but the already short time required to update JIRA has been almost zeroed as well.

Both users and admins are going to love the new features introduced with this versions. I sincerely expect that administrators productivity is going to increase, as well as their "disposition" to accept user customization requests for their projects. Customizing JIRA has never been so easy and the new designer brings a totally new way to define new workflows and maintain existing ones.

That's pretty more to it than this, and the best thing you can do is do a JIRA test drive yourself. Here are the complete JIRA 4.4 Release Notes and here's where you can download JIRA and try it yourself.

Tuesday, 22 March 2011

Atlassian JIRA: In-Place Database Upgrades

Upgrading JIRA to a newer version, or even migrating JIRA from a machine to another, has always been a pretty simple task. Oversimplifying (only a little bit), a JIRA migration can be accomplished following these steps (this is an excerpt of the Official JIRA Documentation):
  • Prevent users from modifying JIRA while the migration is taking place.
  • Export the old JIRA data using the export tool.
  • Back up the old JIRA: installation directory, home directory, database. Attachments and indexes should be backed up only if stored outside the JIRA home directory (which is not the default installation).
  • Install the new JIRA.
  • Migrate JIRA configurations from the old instance to the new one.
  • Connect the new JIRA to a new, empty database.
  • Start the new instance and use the import tool to load the data exported from the old instance.
I acknowledge that it might seem otherwise, but the migration process is really easy to perform. Unfortunately, the migration process has some drawbacks that affect your users while it is taking place:
  • Users cannot use JIRA during the migration process.
  • The import and export phases are not constant-time tasks: the time required to complete them depends on the amount of data that's been migrated and it can quickly become an issue for large JIRA installations.
Although unsupported up to JIRA v. 4.3, I've seen users neglecting the import/export phase and trying to connect the new JIRA instance to the old database. Most of the times, it worked but it would not update the database structures used by JIRA, with at least a performance degradation as a consequence.

In-Place Database Upgrades

Atlassian JIRA v. 4.3 now officially supports In-Place Database Upgrades when upgrading from at least JIRA 4.0.x.

This means that, during an upgrade process, the administrator is not required to perform the export/import phase any longer. Instead, he will be able to connect the new instance directly to the old database: during the first startup, JIRA will perform a check of the database structures and will upgrade them accordingly.

The bigger the JIRA instance, the more time will be saved during an upgrade process and the less downtime will be experienced by JIRA users.

Upgrading JIRA has never been so easy.

Monday, 21 March 2011

Atlassian JIRA 4.3 Has Been Released With a Wealth of Exciting New Features

On March, 16th Atlassian released a new version of its flagship issue tracking and project management solution: Atlassian JIRA v. 4.3.

This new release comes with a bunch of exciting new features both for users and for administrators. This are just some of the new JIRA features that you can find in this release (the following list is an excerpt of Atlassian JIRA v. 4.3 Release Notes):
  • Revamped user management and full LDAP integration.
  • New Plugin Management System.
  • In-place JIRA upgrade.
  • Improved search capabilities.
  • Support for Google Chrome and Safari 5.
In the posts in this series I'll explore some of these features:

Part I - Full LDAP Integration
Part II - In-Place Database Upgrades

Nevertheless, the best thing you can do and the quickest way to discover what's new in the latest JIRA is checking it out yourself: download JIRA and get started.

Atlassian JIRA: Full LDAP Integration

Atlassian introduced many new features in JIRA v. 4.3 and one of them is one that users have been waiting for for a long time: full LDAP integration.

Up to now, administrators basically had two options to manage JIRA users:
  • Using JIRA internal user registry.
  • Using an external LDAP directory for authentication only.
  • Using Atlassian Crowd.
Please note that Atlassian Crowd provides a broader identity management and Single Sign-On solution and it is out of scope in this blog post.

    The Problem

    User management can be an issue and a burden for the administrator even small-sized business: without a "user registry", the complexity of keeping in sync user accounts throughout the organization grows both with the number of accounts and with the number of environments to be kept in sync (such as workstations, servers, applications, etc.).

    To solve this problem, organizations often centralize the administration of user accounts on some sort of "user registries" integrated with all of their environments, from operating systems to applications. Nowadays, LDAP is one of the most commonly used protocol to integrate such registries and it is supported by almost any enterprise-level operating system and many enterprise applications.

    Up to version 4.2, Atlassian JIRA could integrate with an LDAP directory just for authentication: this factored out only part of the user management complexity (basically, the management of an user's credentials) but administrators still had to provision JIRA with user accounts (and all of their attributes).

    The Solution: Full LDAP Integration

    Atlassian JIRA v. 4.3 comes with full LDAP integration. Administrators can now:
    • Integrate JIRA with one of the supported LDAP directories.
    • Use JIRA two-way synchronization.
    • Integrate JIRA with more than one directory at a time.
    • Administer user directories with a revamped, easy to use GUI.
    • Use JIRA as an user directory for Atlassian Confluence.

    Supported Directories

    Atlassian JIRA now integrates with many of the most commonly used directory servers out there:
    • Apache User Directory (v. 1.0.x and 1.5.x).
    • Apple Open Directory (read-only).
    • FedoraDS (read-only POSIX schema).
    • Novel eDirectory Server.
    • OpenDS.
    • OpenLDAP.
    • OpenLDAP (read-only POSIX schema).
    • Oracle Directory Server Enterprise Edition (former Sun Directory Server Enterprise Edition).
    • Microsoft Active Directory.
    • Generic LDAP directory servers.
    • Generic POSIX/RFC2307 directory servers (read-only).
    Although disable by default, it's worth noting that JIRA also supports nested groups, the ability to recursively scan group memberships in the case that a group be member of another group.

    User Directories Management Made Easy

    The setup and configuration of user directories can be easily performed using the JIRA Administration Console, whose new User Directory windows has been redesigned from scratch:


    Using the GUI, the administration will be able to configure most of the parameters to customize and fine-tune the integration of JIRA with your directory servers. Some of the tuneable parameters are:
    • Directory Server settings.
    • LDAP Schema: to configure the Base DN and, optionally, the User DN and the Group DN to limit the search scope to a sub-tree of the whole directory.
    • LDAP Permission: to decide whether the directory will be accessed in read-only mode or in write-mode, in which case modifications to users, groups and memberships made in JIRA will be synced back to the LDAP directory.
    • User and Group Schema settings: to establish object classes, filters and attribute names.
    • LDAP cache and connection pool settings.



      Conclusions.

      Atlassian JIRA v. 4.3 can now be easily integrated with the directory server of choice of your organization. Even unexperienced administrators will be able to quickly setup and configure an user directory for JIRA in a matter a few minutes, using the new User Directories window of the JIRA Administration Console.

      No doubt, JIRA has never been so close to its users.

      Sunday, 5 December 2010

      Atlassian JIRA Configuration Tutorial: JIRA Schemes (Part 3)


      In the first part of this tutorial we learnt the importance of JIRA schemes and how to configure some of them: 
      • Issue type scheme.
      • Issue type screen scheme.
      • Field configuration scheme.
      • Screen scheme.

      In the second part of this tutorial we'll discover other types of schemes that JIRA provides to fine tune our projects:
      • Permission scheme.
      • Issue security scheme.

      In this part we'll discover what workflow schemes and notification schemes are and how to use them.

      Workflow Scheme

      A workflow scheme let an administrator establish a relation between an issue type and a workflow and it has got a special entry to assign a workflow to all unmapped issue types as well.


      What A Workflow Is

      The concept of workflow is central in JIRA and it's where most of JIRA power resides in. Let's start with an example: in your project you define a couple of custom issue type called risk and documentation. So far they're just a name: a moniker that helps you categorize your projects issues into named sets but with no additional value. The next thing you'd probably do is to define custom fields for the new issue types of your projects to store the additional data you might need (such as a document author, a document title and so forth.)

      As soon as you start using the new issue types in your project you'll realize (or your users will do) that it's not very intuitive to open, resolve and close a document (or a risk). Moreover, users will start complain that some operations are missing: reviewing a documentation, escalating a risk, etc.

      JIRA workflows solve this problem: they let you define the process which an issue (of a specific type) will go through. The process is modeled as a finite state machine with transitions between state where you can even hook security policies and business rules (conditions and validators). 

      Additionally, JIRA will let you specify other information that will let you glue together the features that JIRA offers (such as screens) to fine tune your project and provide your users the interface they expect.

      An Use Case

      For the sake of simplicity we'll start with a very simple example. Let's suppose that you've got a dependency with a third party that, sometimes, takes charge of an issue for part of its lifetime: it might be, for example, the software quality assurance department of your organization to which your code changes are submitted for validation. Then, you might want to put issues in a waiting state to explicitly reflect this fact.

      A goot starting point to implement this custom workflow is copying the default JIRA workflow and using it as a starting point. The modifications you'll need to apply to the default state machine are:
      • Create a new state: Waiting for feedback.
      • Create new transitions to the new state:
        • Ask feedback transition from the In Progress state to the Waiting for feedback state.
      • Create new transitions from the new state:
        • Continue transition from the Waiting for feedback state to the In Progress state.
        • Resolve Issue transition from the Waiting for feedback state to the Resolved state.
        • Close Issue transition from the Waiting for feedback state to the Closed state.

      The resulting steps are shown in the following picture.


      Screens for Transition Views

      When you toggle the state of an issue, you can assign the transition a screen that will be presented to the user. You can choose one of the bundled JIRA screens or create a screen of your own. If during a transition you want the user to input some additional data, a transition screen is the place where you can ask the user to do so.

      For the new Resolve Issue transition, for example, I replicate the settings in the default JIRA workflow Resolve Issue transition, that is using the Resolve Issue Screen during the transition.

      Conditions

      Conditions are propositions that must hold for the transition to complete successfully. Conditions, for example, are often used to create a security policy for a workflow transition. Some of the conditions that JIRA offers are:
      • Only assignee
      • Only reporter
      • Permission
      • User is in group
      • User is in project role
      • User is in group custom field

      In this use case, for example, we want the Ask feedback and Continue transitions to be initiated only by the current assignee of an issue:


      In the case of the Close Issue and Resolve Issue transitions, we replicated the conditions on the corresponding default JIRA workflow transitions, that is, check if the user has got the Close Issue permission or the Resolve Issue permission.

      How To Create a Workflow

      To create a workflow you've got to:
      • Define the state machine for you workflow.
      • Create a new workflow or copy an existing workflow that could be used as a starting point.
      • Implement the state machine adding all the states you defined and all the possible transitions between the states.
      • Optionally define and assign the screens you need to display during the workflow transitions.
      • Define the conditions that must hold for a each transition to complete: pay attention to take into account JIRA standard permissions (such as the Close Issue and Resolve Issue) in the conditions for your transitions.

      How To Create a Workflow Scheme

      Before creating a workflow scheme, all of the required workflows for the issue types you're going to manage in a specific project must have been prepared. To create a workflow scheme, you've got to:
      • Create a new workflow scheme.
      • Assign the default workflow to be used for unmapped issue types.
      • Assign a workflow to every issue type whose state machine you want to modify in the current scheme.

      Apply the workflow to a project and the modification will take effect.

      Please note that changing the workflows that are used in a project with existing issues is a potentially disruptive task that must be performed with care. Changing the workflow for an issue type might require mapping existing issues that find themselves in states that are no longer valid to valid states of the new workflow. JIRA will detect such conflicts and will ask the administrator to establish these mappings when changing a workflow or a workflow scheme for a project.

      Best Practices

      Hopefully, JIRA won't even let you modify the default system workflow (unless you hack it). Different projects usually mean different users and, although the words we use might be the same, the meaning we give them might differ a lot so the recommendation is the same: always create a custom scheme for your project when in doubt. It's easier to consolidate multiple equivalent schemes into one than decoupling projects that share schemes that were supposed to never change. JIRA lets you copy many of the objects it manages including workflow and workflow schemes. 

      Notification Schemes

      JIRA can notify users when some event has happened. The notification scheme establishes a relation between the type of event and the users who will receive a notification.


      Event Types

      Some of the types of event that JIRA offers are:
      • Issue Created.
      • Issue Resolved.
      • Issue Closed.
      • Work Logged On Issue.

      The complete list can be checked in the official JIRA documentation. JIRA also offers a Generic Event that can be fired, for example, from a workflow transition, that can be used to extend the set of JIRA events should you need a new one.

      Users Who Can Receive Notifications

      The identities whom JIRA lets you send notification to are:
      • Current Assignee.
      • Reporter.
      • Current User.
      • Project Lead.
      • Component Lead.
      • Single User (chosen from a list).
      • Group (chosen from a list).
      • Project role (chosen from a list).
      • Single email address (input by the user).
      • All Watchers.
      • User from a custom field.
      • Group from a custom field.

      An Use Case

      Let's suppose that you're a project or a component leader and you want to receive a notification every time an issue is resolved or closed: it will be sufficient to create a custom scheme, for example by copying JIRA default notification scheme, and adding a notification for the desired event to the appropriate receiving identity.

      How To Create a Notification Scheme

      To create a notification scheme it's necessary to perform the following operations:
      • Create a new notification scheme or copy an existing one to use it as a starting point.
      • For every event you wish to handle, add a notification and assign the set of receiving identities.

      A notification scheme can be associated to a project and it will take effect immediately.




      Tuesday, 16 November 2010

      Atlassian JIRA Configuration Tutorial: JIRA Schemes (Part 2)


      In the first part of this tutorial we learnt the importance of JIRA schemes and how to configure some of them:
      • Issue type scheme.
      • Issue type screen scheme.
      • Field configuration scheme.
      • Screen scheme.

      In the second part of this tutorial we'll discover other types of schemes that JIRA provides to fine tune our projects:
      • Permission scheme.
      • Issue security scheme.

      These schemes are used to tune the security policies you may want to establish over your JIRA instance, your projects and the issues they manage.

      Before You Start

      If you haven't done it yet, please read: Atlassian JIRA Configuration Tutorial: Overview of JIRA Security.

      Permission Scheme

      An introductory discussion about JIRA security and JIRA permissions is the subject of another blog post.

      A permission scheme defines a the set of permissions to apply to a project.


      An Use Case

      The default JIRA permission scheme distinguishes between the following project roles:
      • Administrators
      • Users
      • Developers

      Users are granted the right of submitting issues into project (Create issues, Create comments, etc.) while developers are granted the right of working on issues and take them into completion (Edit issues, Close issues, etc.).

      This is a starting point for refining your security policies adding actors (a project role) in your process and assigning them permissions. A first refinement might be requiring a project manager to check the developers' work on an issue before transitioning into the Closed state and letting developers transition an issue only up to the Resolved state.

      How To Setup a Permission Scheme for Your Project

      To setup a permission scheme for your project:
      • Define the project roles your project needs: this is an optional step, since you can assign permissions to users and groups, but it's desirable to clearly organize JIRA users in sets (project roles) according to their status in each project.
      • Assign users and groups to your project roles.
      • Create a permission scheme for your project (possibly copying an existing permission scheme).
      • Assign permissions to users, groups and project roles in the permission scheme.
      • Assign the permission scheme to your project.

      Issue Security Scheme

      As we've seen in another post of this series, issue security scheme let administrators establish security policies to protect issues in a project. An issue security scheme defines a set of security levels and grants permissions to a set of identities to access issues in a given security level.


      An Use Case

      Issues in your projects could be organized in security level so that the visibility of certain issues is reduced to a subset of the users that can access a project.

      In another scenario you could be sharing a project with some of your clients and would not like a client of yours having visibility of all of the issues managed in that project for confidentiality reasons.

      An issue may be changing security level according to the workflow transitions it performed: just after creation, an issue could be transitioned to another security level so that a subset of users (such as a group of developers) might asses the issue and decide what to do with it. In a later time, the issue can be transitioned to another security level to be available to a wider audience.

      How to Setup an Issue Security Level for Your Project

      To setup an issue security scheme for a project of yours you have to:
      • Create a new issue security scheme.
      • Define the number of security level your project needs and create them in the issue security scheme.
      • Grant permissions to a set of users for every security level in your scheme
      • Assign the issue security scheme to your project.

      Next Steps

      In the following part of this series we'll explore the last two kinds of schemes that JIRA provides: the workflow scheme and the notification scheme.





      Sunday, 14 November 2010

      Atlassian JIRA Configuration Tutorial: Overview of JIRA Security


      JIRA flexibility is notorious and its security features are no exception. This blog post is an overview of JIRA security features and how to configure permissions to secure JIRA, your projects and all of your issues.
       

      Users, Groups and Project Roles

      At the global level, JIRA organizes users into groups and project roles. Groups are named sets of users and project roles are named sets of users and groups:


      The administrator can create, edit an delete any number of users, groups and project roles.

      Although, at first, the existence of both groups and project roles might seem redundant, project roles are important since they provide an additional level of indirection to decouple permissions from user accounts in a project. JIRA permissions at the global level (Global Permissions) can only be granted to groups. JIRA permissions at the project level can be granted at any combination of users, groups and project roles. An effective organization of your users (and groups) into project roles will help you create and maintain clean security policies in your project by:
      • Defining the project roles you need.
      • Assigning permissions to your project roles in a permission scheme.
      • Assign a permission scheme to a project.


      At the global level, to ease administration of a great number of projects, JIRA lets you define a project role's default members.

      Global JIRA Permissions

      Global JIRA permissions are (as of JIRA 4.2):
      • JIRA System Administrators.
      • JIRA Administrators.
      • JIRA Users.
      • Browse Users.
      • Create Shared Objects.
      • Manage Group Filter Subscriptions.
      • Bulk Change.

      Most of them are self-explanatory and further information about each of them can be found in the official JIRA documentation.

      JIRA Users

      This permission is required for users to be able to log in into JIRA. By default, groups that are granted this permissions will be assigned to any newly created user.

      Disabling an User

      Revoking this permission to an user, that is removing the users from every group that is granted the JIRA Users permission, will effectively disable the user and it won't count against your JIRA license limit.

      Project Permissions

      Project permissions are defined by JIRA and can be granted to an identity in a permission scheme. Assigning a permission scheme to a project will make those permissions effective in that project context.

      Examples of most commonly used permissions are:
      • Administer project
      • Browse project
      • Create issue
      • Edit issue
      • Resolve issue
      • Close issue
      • Add comment
      • Delete comment
      • Work on issues

      For the complete list of permissions for a given JIRA version please check JIRA documentation or navigate to the Edit Permissions window of your JIRA installation accessible at the following URL:

      http://your.jira/secure/admin/EditPermissions!default.jspa?schemeId=0

      Further information about assigning project permissions to users, please check out this blog post.

      Securing Workflow Transitions

      The permissions seen so far make no mention of workflows and workflow transitions. Obviously, workflows are a fundamental part of JIRA functionality and it's essential for an administrator to be able to establish security policies at the workflow transition level.

      Permission requirements can be associated to workflow transition using Conditions.

      Conditions

      Conditions essentially are validation rules that must be satisfied for a workflow transition to be executed. JIRA ships many built in conditions and many of them can be used to establish fine tuned security policies at a workflow transition level. The available security-related workflow transition conditions are (as of JIRA 4.2):
      • Only assignee.
      • Only reporter.
      • Permission.
      • User in group.
      • User in group custom field.
      • User in project role.

      These conditions can be used to build security policies using any kind of identity seen so far: group and project role. Moreover, other identities related to a specific issue are available such as assignee and reporter.

      Conditions are basic JIRA-provided parametrizable propositions that can be used to build more complex statements using the JIRA administration console as shown in the following picture:



      Validators

      Validators are similar to conditions with the difference that validators are executed against input parameters. As far as it concerns security policies, conditions is the way to go. Anyway, a Permission validator is available to check if the current user has a specific permission.

      Securing Issues in a Project

      We've seen many ways an administrator can secure its JIRA installation so far: at the global level, at the project level and at the workflow transaction level. There's case we haven't considered yet, though: applying distinct security policies to issues inside a project.

      To achieve this goal in a flexible way, JIRA provides the ability to categorize a project's issues in the so-called security levels. A security level is an attribute of an issue that can be set in the usual ways:
      • By using a screen that configured to edit such a field.
      • By a workflow transaction.

      An issue in a security level can be accessed only by identities (users, groups or project roles) that are granted permissions. The link between a security level and the identities that are granted access is established by means of an issue security scheme.


      As usual, as soon as a project is associated to a security scheme, the scheme security policies are enforced. You can now create as many security level as your project needs and grant permissions to the corresponding users for every security level.

      The available identities to grant permissions to in a security level are:
      • Reporter.
      • Group.
      • Single User.
      • Project Lead.
      • Assignee.
      • User custom field value.
      • Project role.
      • Group custom field value.

      Next Steps

      In this blog post we've introduced the facilities that JIRA provides to secure the operations it offers and the object it manages with flexible security policies.

      In the next part of this series we'll examine what JIRA schemes are and how they can be used to decouple configurations from the context in which they are applied.



      Thursday, 11 November 2010

      Atlassian JIRA Configuration Tutorial: JIRA Schemes (Part 1)


      Atlassian JIRA is an extremely flexible piece of software that can be easily customized by a casual administrator. Nonetheless, to take full advantage of all of its power, it's necessary to understand how it works and how are organized the concepts that it manages.

      This series of blog posts is an overview of JIRA and a quick tutorial about configuring a JIRA project by taking advantage of JIRA configuration schemes.

      If you're a Solaris user you may be interested to other posts I wrote about setting up and managing JIRA on a Solaris installation (some of them might be useful to users of other UNIX and UNIX-like operating as well):

      Basic Concepts

      Whenever you use JIRA, you're creating and updating issues in a project. Issues may be of specific types, may have custom fields and a security level. An user with appropriate permissions may act on an issue by applying a workflow transition.

      Although it might seem otherwise, a project is not "just" an issue container with project roles and a set of security policies:

      A project is a logical partition inside JIRA where a set of configuration rules are applied.

      What a JIRA Scheme Is

      This is when the JIRA scheme concept comes in. Inside JIRA almost everything can be configured:
      • Workflows.
      • Issue types.
      • Custom fields.
      • Field configurations.
      • Screens.
      • Notification.
      • Permissions.

      For each one of the above-mentioned concepts, user configurations and customizations are defined at the JIRA (global) level. The relation between a set of specific configuration rules for such concepts and one (or more) project is established by a set of schemes. In some conditions, a scheme might establish a relation between a scheme and another scheme.

      This model is pretty flexible: the same issue type, for example, might be reused in different projects with different workflows, different field configurations and even different management screens. Conceptually, then, these concepts are organized as in the following picture:


      The semantics and the behavior of a concept can then be configured, customized and fine tuned at the project level by means of schemes.

      The Importance of Schemes

      Schemes probably are the biggest source of confusion for a novice JIRA administrator. At the beginning things may seem to work without the need of bothering with them. When the number of projects starts to grow, the possibility of configuration clashes grows too and that's when an administrator realizes that the lack of a proper scheme partitioning is the source of all evil. Redesigning a JIRA configuration for a great number of projects is not easy and having projects polluted by configurations specific to other projects will make your users complain.

      Schemes insulate projects from one another: a proper JIRA schemes' configuration guarantees that every manager can have its project configured with its own requirements without affecting other projects, even in the case in which they might be sharing some common concepts (such as an issue type defined at a corporate level.)

      If in doubt, always create a scheme. If in the future apparently similar project configurations starts to diverge, schemes will enable you to independently manage different project.

      JIRA Makes It Easy

      Abstraction, decoupling and flexibility all come with a price: the administrator has to define configurations, schemes and associate them with a project. Fortunately, JIRA makes it easy since configuration and scheme can usually be copied: instead of starting from scratch, you can copy a scheme or a configuration and using it as a starting point for your new setups.

      Types of Schemes

      A JIRA scheme exists to map a project to almost any kind of concepts managed by JIRA:
      • Workflow schemes.
      • Issue type scheme.
      • Issue type screen scheme.
      • Issue security scheme.
      • Field configuration scheme.
      • Screen scheme.
      • Notification scheme.
      • Permission scheme.

      In this series of posts we'll explore every kind of scheme, their relation between the project and the concepts they configure, and how they can be used.

      In this part we'll explore the following types of JIRA schemes:
      • Issue type scheme.
      • Issue type screen scheme.
      • Field configuration scheme.
      • Screen scheme.

      Issue Type Scheme

      The first scheme you'll probably start with during the configuration of your JIRA project is the Issue type scheme. The issue type scheme establishes the relation between a project and the available issue types.


      An Use Case

      An issue type scheme is necessary when the default JIRA issue types are not sufficient for your project. Let's suppose your project will need additional issue types such as:
      • Risk.
      • Deliverable.
      • Payment.

      To safely add these new issue types with your project, you have to create the required issue types and associate them to the issue type scheme used by your project.

      How to Setup Issues for Your Project

      To setup the issue types you'd like to use in your project, you must perform the following operations:
      • Define the issue types you need (if they do not exist yet).
      • Create an issue type scheme for your project.
      • Configure the issue type scheme to contain all the issue types to use in your project.
      • Associate the issue type scheme with your project.

      At this level, the selected issue types for your project are just names. During the configuration of the next schemes we'll give these names some meaningful behavior.

      What If I Use The Default Issue Type Scheme?

      Since all issue types are implicitly associated to the default issue type scheme, if you modify it every project that is not associated with a custom scheme will see such modifications. If you're asked to setup a new JIRA project that will need a new issue type, that issue type will show up in every other project that is using the default scheme: that will probably make no sense to your users.

      Field Configuration Scheme

      The field configuration scheme establishes a relation between issue types and field configurations:


      A field configuration scheme has a special default entry to map a field configuration to any unmapped issue type.

      Field Configurations

      A field configuration defines a field's behavior and is commonly used to tell JIRA:
      • Whether a field is required.
      • Whether a field is visible or hidden.
      • How a field is rendered.

      An Use Case

      Field configurations and field configuration schemes are necessary whenever your issue fields behavior have to be customized. By default, every new field is visible and optional. If you need a field to be required or to be hidden for a given issue type, a field configuration scheme is required to map the affected issue types to the desired field configurations. A new Amount field, for example, might be required and visible only for the Payment issue type. Any screen for every other issue types should not require nor show the amount field.

      How to Setup a Field Configuration Scheme for Your Project

      With a field configuration scheme you can setup the behavior of every field, for every issue types it applies to:
      • If applicable, define a field configuration that will apply to any unmapped issue types. A good starting point might be a copy of the default JIRA field configuration.
      • Define a field configuration for every issue type that needs one. Many issue types can share the same field configuration.
      • Create a field configuration scheme and associate the field configurations you created to the target issue types.
      • Optionally, define the default field configuration for all of the unmapped issue types.
      • Associate the field configuration scheme to your project.

      What If I Use The Default Field Configuration Scheme?

      Using the default JIRA field configuration scheme and the default field configuration may lead to configuration clashes such as the following:
      • If a project requests a field to be hidden, every other project that might still require it will see the field disappear from its screens.
      • If a project requests a field to be marked as required, every other project will be forced to set a value for such a field in its screens.

      Screen Scheme

      JIRA lets the user easily define new windows, called screens, that may be used during a workflow transaction or during an issue type operation such as create, edit and view.

      A screen scheme establishes a relation between an issue operation and a screen. A screen scheme has a special default entry to map a screen to any unmapped issue operation.


      Screens

      A screen is just an ordered list of fields easily configurable with the JIRA administration console. The field rendering and behavior, such as its format or whether it's required or visible, is configured by a field configuration.

      An Use Case

      A custom screen it's necessary, for example, when you want to control which fields are visible or editable during an issue operation and when you need a brand new screen for a transition in a workflow of yours.

      For a Payment issue type, for example, it might be desirable that some fields (such as Amount) should not be visible or editable during the edit operation. In this case, it's necessary to define a new screen that contains the editable fields and associate it with the edit operation in a new screen scheme. This screen scheme will then be associated with the target issue types by means of an issue type screen scheme that will be examined in the next section.

      A Payment issue type might then be associated with an user-defined workflow. During a specific workflow transaction, such as Pay, it might be necessary to update another custom field: Payer. In this case, it's necessary to define a new screen that contains the Payer field and any other required field and associate it with the desired workflow transaction.

      How to Setup a Screen Scheme for Your Project

      To configure a screen scheme to use in your project you have to follow these steps:
      • Define a screen for every customized issue operation screen that your project needs.
      • Create a screen scheme.
      • If applicable, define a screen for every unmapped issue operation.
      • Associate the screens you created with the corresponding issue operation.
      • Repeat this operation and create screens and screen schemes for every issue type whose operations need screen customizations in your project.

      What If I Use the Default Screen Scheme?

      Since the default JIRA screens are associated to all issue operations for every issue types, a modification in either the default screens or the default screen scheme will be visible in all the projects that don't use custom screen schemes. This situation may lead to complaints for missing or new and unknown fields in screens used by other projects.

      Issue Type Screen Scheme

      An issue type screen scheme establishes a relation between a screen scheme and an issue type. An issue type screen scheme has a special default entry to map a screen scheme to any unmapped issue types.


      An Use Case

      The issue type screen scheme is mostly a "technical" scheme to tell JIRA to use a screen scheme for a specific issue type in a project. Common use cases have been explored in the previous section.

      How to

      To setup an issue type screen scheme for your project you have to follow these steps:
      • Create a new issue type screen scheme.
      • If applicable, associate a default screen scheme for every unmapped issue types.
      • Associate a screen scheme to every issue type whose screens you need to customize.
      • Associate the issue type screen scheme to your project.

      What If I Use The Default Issue Type Screen Scheme?

      Since the default issue type screen scheme just maps the default screen scheme to any issue type, using this scheme in every project will have the same detrimental effects on project decoupling that we outlined in the previous section.

      Conclusions

      In the first part of this series, we've explored a basic component for the JIRA customization: schemes. Schemes are a flexible mean to decouple configurations from their scope (projects). Although you might be tempted to ignore custom schemes and just modify JIRA default schemes, I suggest you think it twice, take a large breath, reread this post and convince yourself that it's really a bad idea.

      JIRA helps the administrator build schemes quickly allowing him to generate copies of existing schemes on the fly. Create a test project and start configuring it copying JIRA default schemes and modifying them. You'll be surprised by discovering how powerful and easy it is.

      Next Steps

      In another post (coming soon) I'll explore other types of JIRA schemes with particular emphasis to workflows and their customization.

      Sunday, 6 June 2010

      Registering JIRA as a Solaris SMF-Managed Service

      My company and many of its clients use Atlassian JIRA as a bug or project tracking solution. JIRA is distributed in two bundles:
      • As a Java EE application to deploy on a compliant application server.
      • As a standalone distribution bundled with Apache Tomcat.

      I usually recommend, unless you already have a Java EE application server to leverage or some other requirement to take into account, to install JIRA standalone distribution. It's very easy to install, configure and deploy. I would also recommend you to deploy JIRA on Solaris.

      Solaris has differential advantages when compared with other operating system. Just to name a few (not to repeat myself over and over):
      • ZFS and ZFS snapshots and clones.
      • Zones.
      • DTrace.
      • RBAC, Projects and Resource Caps.
      • SMF.

      A Typical Deployment Scenario

      My typical deployment scenario is the following:
      • I deploy JIRA standalone (once for each JIRA version) on a dedicated ZFS filesystem.
      • I snapshot and clone the corresponding filesystem whenever I need a new JIRA instance.
      • Every JIRA instance is configured and executed on a dedicated Solaris 10 Sparse Zone.
      • I define a resource cap for each zone that runs JIRA.
      • I configure JIRA as a Solaris SMF-Managed Service.

      Most of the previous tasks have been described earlier in this blog. An overview of a JIRA installation on Solaris has been given on this post.

      The purpose of this entry is describing how to configure JIRA as a Solaris SMF-Managed Service.

      Configuring JIRA with Solaris SMF

      Solaris 10 Service Management Facility (SMF) often praised advantages include the ability for Solaris to check the health and dependencies of your service and take a corrective action in case something goes wrong. Registering a service with Solaris SMF isn't strictly necessary but I encourage you to do so. Although JIRA is pretty easy to start and stop and has got very view dependencies (or none...) with other services, preparing a service manifest will enable you to install and deploy JIRA on Solaris in a question of minutes.

      Dependencies

      As stated above, JIRA's dependencies really depend on your deployment. As a minimum, JIRA global dependencies will include the two following (obvious) services:
      • svc:/milestone/network:default
      • svc:/system/filesystem/local:default

      Because of its own nature, there's probably no reason to have JIRA instances running when network services are not available. The dependency with the local filesystem service is obvious, too.

      Any other dependency will probably be a service instance dependency. Since JIRA, in the simplest deployment scenario, will just depend on a database, we will assume that our JIRA instance will depend on a specific Solaris PostgreSQL service:
      • svc:/application/database/postgresql:version_82

      Our first manifest fragment will be the following:

      <?xml version='1.0'?>
      <!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
      <service_bundle type='manifest' name='export'>
        <service name='application/atlassian/jira' type='service' version='0'>
          <dependency name='network' grouping='require_all' restart_on='none' type='service'>
            <service_fmri value='svc:/milestone/network:default'/>
          </dependency>
          <dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
            <service_fmri value='svc:/system/filesystem/local:default'/>
          </dependency>
          
          <instance name='version_411' enabled='true'>
            <dependency name='postgresql' grouping='require_all' restart_on='none' type='service'>
              <service_fmri value='svc:/application/database/postgresql:version_82'/>
            </dependency>
            
          </instance>
          <stability value='Unstable'/>
          <template>
            <common_name>
              <loctext xml:lang='C'>Atlassian JIRA</loctext>
            </common_name>
          </template>
        </service>
      </service_bundle>

      Beware that in this example we're using PostgreSQL services as defined in Solaris 10 05/10. Please check your operating system to define correct dependencies. A missing dependency will make Solaris put the service into the offline state until the dependency can be resolved.

      Execution Methods

      The next thing to do is define JIRA execution methods. We could directly use JIRA startup.sh and shutdown.sh scripts but we want to avoid coupling the SMF service definition with JIRA implementation details. Rather, we will take the common approach of writing a script to declare execution methods. This approach, moreover, will let us parametrize distinct JIRA instances in the SMF manifest and thus manage multiple JIRA instances with just a SMF service manifest and one execution methods script.

      A draft script is the following:

      #!/sbin/sh
      #
      #
      #ident  "@(#)JIRA 4.1.1   06/05/10 SMI"

      . /lib/svc/share/smf_include.sh

      # SMF_FMRI is the name of the target service.
      # This allows multiple instances 
      # to use the same script.

      getproparg() {
        val=`svcprop -p $1 $SMF_FMRI`
        [ -n "$val" ] && echo $val
      }

      # ATLBIN is the JIRA installation directory
      # of each JIRA instance.
      ATLBIN=`getproparg atlassian/bin`

      # JIRASTARTUP is JIRA startup script
      JIRASTARTUP=$ATLBIN/bin/startup.sh

      # JIRASHUTDOWN is JIRA shutdown script
      JIRASHUTDOWN=$ATLBIN/bin/shutdown.sh

      # Check if the SMF framework is correctly initialized.
      if [ -z $SMF_FMRI ]; then
        echo "Error: SMF framework variables are not initialized."
        exit $SMF_EXIT_ERR
      fi

      # check if JIRA scripts are available
      if [ ! -x $JIRASTARTUP ]; then
        echo "Error: JIRA startup script cannot be found."
        exit $SMF_EXIT_ERR
      fi

      if [ ! -x $JIRASHUTDOWN ]; then
        echo "Error: JIRA shutdown script cannot be found."
        exit $SMF_EXIT_ERR
      fi

      case "$1" in
      'start')
        $JIRASTARTUP
        ;;

      'stop')
        $JIRASHUTDOWN
        ;;

      *)
        echo "Usage: $0 {start|stop}"
        exit 1
        ;;

      esac
      exit $SMF_EXIT_OK
       
      The previous scripts just define the start and stop service methods. As far as I know there's no easy JIRA refresh method so we will skip it in our scripts.

      Service Instance Parameters

      As shortly explained in the previous section, SMF services provide the ability of being parametrized by virtue of an easy syntax to declare parameters in the service manifest and use them in the service method script. In the previous example we're using a property, called atlassian/bin, to declare the installation directory of each of ours JIRA instances. Let's declare it in our service manifest for a fictional JIRA 4.1.1 instance:

      <?xml version='1.0'?>
      <!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
      <service_bundle type='manifest' name='export'>
        <service name='application/atlassian/jira' type='service' version='0'>
          <dependency name='network' grouping='require_all' restart_on='none' type='service'>
            <service_fmri value='svc:/milestone/network:default'/>
          </dependency>
          <dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
            <service_fmri value='svc:/system/filesystem/local:default'/>
          </dependency>
          <exec_method name='start' type='method' exec='/root/bin/svc/method/atlassian/jira start' timeout_seconds='60'/>
          <exec_method name='stop' type='method' exec='/root/bin/svc/method/atlassian/jira stop' timeout_seconds='60'/>
          <instance name='version_411' enabled='true'>
            <dependency name='postgresql' grouping='require_all' restart_on='none' type='service'>
              <service_fmri value='svc:/application/database/postgresql:version_82'/>
            </dependency>
            <property_group name='atlassian' type='application'>
              <propval name='bin' type='astring'
                value='/opt/atlassian/atlassian-jira-enterprise-4.1.1-standalone'/>
            </property_group>
          </instance>
          <stability value='Unstable'/>
          <template>
            <common_name>
              <loctext xml:lang='C'>Atlassian JIRA</loctext>
            </common_name>
          </template>
        </service>
      </service_bundle>

      Environment Variables

      JIRA needs at least the JAVA_HOME environment variable to be set for startup and shutdown scripts to work correctly. Thus we need to modify our manifest so that SMF will set it before launching the execution methods:

      <?xml version='1.0'?>
      <!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
      <service_bundle type='manifest' name='export'>
        <service name='application/atlassian/jira' type='service' version='0'>
          <dependency name='network' grouping='require_all' restart_on='none' type='service'>
            <service_fmri value='svc:/milestone/network:default'/>
          </dependency>
          <dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
            <service_fmri value='svc:/system/filesystem/local:default'/>
          </dependency>
          <exec_method name='start' type='method' exec='/root/bin/svc/method/atlassian/jira start' timeout_seconds='60'>
            <method_context>
              <method_environment>
                <envvar name='JAVA_HOME' value='/opt/sun/jdk/latest'/>
              </method_environment>
            </method_context>
          </exec_method>
          <exec_method name='stop' type='method' exec='/root/bin/svc/method/atlassian/jira stop' timeout_seconds='60'>
            <method_context>
              <method_environment>
                <envvar name='JAVA_HOME' value='/opt/sun/jdk/latest'/>
              </method_environment>
            </method_context>
          </exec_method>
          <instance name='version_411' enabled='true'>
            <dependency name='postgresql' grouping='require_all' restart_on='none' type='service'>
              <service_fmri value='svc:/application/database/postgresql:version_82'/>
            </dependency>
            <property_group name='atlassian' type='application'>
              <propval name='bin' type='astring' value='/opt/atlassian/atlassian-jira-enterprise-4.1.1-standalone'/>
            </property_group>
          </instance>
          <stability value='Unstable'/>
          <template>
            <common_name>
              <loctext xml:lang='C'>Atlassian JIRA</loctext>
            </common_name>
          </template>
        </service>
      </service_bundle>

      Credentials, Projects and Resources

      As explained in another post, SMF service manifest let the administrator specify advanced parameters for a service instance such as:
      • The credentials under which the service instance will be executed.
      • The Solaris project in which the service instance will be executed.
      • The resource pool assigned to a service instance.

      In this case, being a multi instance service manifest, we will let the administrator declare such parameters in every service instance. This way, the maximum degree of service parametrization is achieved:

      <?xml version='1.0'?>
      <!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
      <service_bundle type='manifest' name='export'>
        <service name='application/atlassian/jira' type='service' version='0'>
          <dependency name='network' grouping='require_all' restart_on='none' type='service'>
            <service_fmri value='svc:/milestone/network:default'/>
          </dependency>
          <dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
            <service_fmri value='svc:/system/filesystem/local:default'/>
          </dependency>
          <exec_method name='start' type='method' exec='/root/bin/svc/method/atlassian/jira start' timeout_seconds='60'>
            <method_context>
              <method_environment>
                <envvar name='JAVA_HOME' value='/opt/sun/jdk/latest'/>
              </method_environment>
            </method_context>
          </exec_method>
          <exec_method name='stop' type='method' exec='/root/bin/svc/method/atlassian/jira stop' timeout_seconds='60'>
            <method_context>
              <method_environment>
                <envvar name='JAVA_HOME' value='/opt/sun/jdk/latest'/>
              </method_environment>
            </method_context>
          </exec_method>
          <instance name='version_411' enabled='true'>
            <dependency name='postgresql' grouping='require_all' restart_on='none' type='service'>
              <service_fmri value='svc:/application/database/postgresql:version_82'/>
            </dependency>
            <property_group name='method_context' type='framework'>
              <propval name='project' type='astring' value=':default'/>
              <propval name='resource_pool' type='astring' value=':default'/>
              <propval name='working_directory' type='astring' value=':default'/>
            </property_group>
            <property_group name='atlassian' type='application'>
              <propval name='bin' type='astring' value='/opt/atlassian/atlassian-jira-enterprise-4.1.1-standalone'/>
            </property_group>
          </instance>
          <stability value='Unstable'/>
          <template>
            <common_name>
              <loctext xml:lang='C'>Atlassian JIRA</loctext>
            </common_name>
          </template>
        </service>
      </service_bundle>

      Please note the slight different syntax for the method_context attributes with respect to the example in my previous post. This gives you an idea of SMF manifest flexibility. In that example, distinct execution methods were specified for every service instance. In this case, we specified the same service methods for every JIRA instance. The difference is that parametrization occurs in the service instance property groups. The same script, then, can be properly parametrized and reused for any of the instances you'll control with SMF.

      Privileges Required to Open a Privileged Network Port

      If you're running JIRA as a non-root user (that is considered a best practice but perhaps is questionable if you use a dedicated Solaris 10 Zone) you should be aware that a specific privilege is required for Tomcat to open a privileged network port (< 1024) such as port 80 (the default HTTP port.) If you plan to run JIRA as a non root user, then assign the net_privaddr privilege to the JIRA user as shown in the following manifest fragment:

      [...snip...]
      <exec_method name='start' type='method' exec='/root/bin/svc/method/atlassian/jira start' timeout_seconds='60'>
        <method_context>
          <method_credential
            user='jira'
            group='jira'
            privileges='basic,net_privaddr' />

      [...snip...]


      Conclusion

      The following manifest and script can be used as a starting point for a working JIRA SMF service manifest. It's up to you, system administrator, to apply the modifications you need to fit it into your execution environment.

      Service Manifest

      <?xml version='1.0'?>
      <!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
      <service_bundle type='manifest' name='export'>
        <service name='application/atlassian/jira' type='service' version='0'>
          <dependency name='network' grouping='require_all' restart_on='none' type='service'>
            <service_fmri value='svc:/milestone/network:default'/>
          </dependency>
          <dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
            <service_fmri value='svc:/system/filesystem/local:default'/>
          </dependency>
          <exec_method name='start' type='method' exec='/root/bin/svc/method/atlassian/jira start' timeout_seconds='60'>
            <method_context>
              <method_environment>
                <envvar name='JAVA_HOME' value='/opt/sun/jdk/latest'/>
              </method_environment>
            </method_context>
          </exec_method>
          <exec_method name='stop' type='method' exec='/root/bin/svc/method/atlassian/jira stop' timeout_seconds='60'>
            <method_context>
              <method_environment>
                <envvar name='JAVA_HOME' value='/opt/sun/jdk/latest'/>
              </method_environment>
            </method_context>
          </exec_method>
          <instance name='version_411' enabled='true'>
            <dependency name='postgresql' grouping='require_all' restart_on='none' type='service'>
              <service_fmri value='svc:/application/database/postgresql:version_82'/>
            </dependency>
            <property_group name='method_context' type='framework'>
              <propval name='project' type='astring' value=':default'/>
              <propval name='resource_pool' type='astring' value=':default'/>
              <propval name='working_directory' type='astring' value=':default'/>
            </property_group>
            <property_group name='atlassian' type='application'>
              <propval name='bin' type='astring' value='/opt/atlassian/atlassian-jira-enterprise-4.1.1-standalone'/>
            </property_group>
          </instance>
          <stability value='Unstable'/>
          <template>
            <common_name>
              <loctext xml:lang='C'>Atlassian JIRA</loctext>
            </common_name>
          </template>
        </service>
      </service_bundle>

      Execution Methods Script

      #!/sbin/sh
      #
      #
      #ident  "@(#)JIRA 4.1.1   06/05/10 SMI"

      . /lib/svc/share/smf_include.sh

      # SMF_FMRI is the name of the target service.
      # This allows multiple instances 
      # to use the same script.

      getproparg() {
        val=`svcprop -p $1 $SMF_FMRI`
        [ -n "$val" ] && echo $val
      }

      # ATLBIN is the JIRA installation directory
      # of each JIRA instance.
      ATLBIN=`getproparg atlassian/bin`

      # JIRASTARTUP is JIRA startup script
      JIRASTARTUP=$ATLBIN/bin/startup.sh

      # JIRASHUTDOWN is JIRA shutdown script
      JIRASHUTDOWN=$ATLBIN/bin/shutdown.sh

      # Check if the SMF framework is correctly initialized.
      if [ -z $SMF_FMRI ]; then
        echo "Error: SMF framework variables are not initialized."
        exit $SMF_EXIT_ERR
      fi

      # check if JIRA scripts are available
      if [ ! -x $JIRASTARTUP ]; then
        echo "Error: JIRA startup script cannot be found."
        exit $SMF_EXIT_ERR
      fi

      if [ ! -x $JIRASHUTDOWN ]; then
        echo "Error: JIRA shutdown script cannot be found."
        exit $SMF_EXIT_ERR
      fi

      case "$1" in
      'start')
        $JIRASTARTUP
        ;;

      'stop')
        $JIRASHUTDOWN
        ;;

      *)
        echo "Usage: $0 {start|stop}"
        exit 1
        ;;

      esac
      exit $SMF_EXIT_OK