JIRA – Q&A Mashup

A couple of observations have struck in the last year. Observation one: Developers love badges, shiny medals, and reputation points. My employer has an internal version of a popular Q&A website, which is perceived to be a huge success (personally I think it’s a bit sucky but whatever). Developers will stay late or abandon whatever they’re supposed to be doing to write the perfect answer, in the hope of a few rep points. Continue reading JIRA – Q&A Mashup

Auto-transitions in JIRA Workflows

Moving pictures apparently being all the rage now, I was going to do one of these so-called “movies” myself to demonstrate automatic workflow transitions, but, they’re FOOKING HARD! Fiddling around with key frames and splicing clips and so on, and then listening to my voice droning back at me, I couldn’t take it. I can’t inflict that on my 3 subscribers (hello kids). I will chuck it in at the end but with no voiceover.

Continue reading Auto-transitions in JIRA Workflows

Speakeasy Baby Steps

I been having a play with the Speakeasy extension plugin for JIRA, which is hard to describe but, err, kind of lets you inflict your greasemonkey scripts on your users.

For a laugh I thought I'd do an old-skool JIRA skin which would display issues using the golden oldie JIRA 3.13 look & feel. But, although probably quite possible, it turned out to be more effort than I could be bothered with, for something that was only really going to be a not very funny joke. And fair play, it's starting to grow on me in 4.2 and above… Edwin, you were right. Continue reading Speakeasy Baby Steps

Setting issue security level by issue type

This is an old entry – re-added because of a problem with redirects, sorry.

It’s not possible in JIRA to create an Issue Security Scheme by issue type. For instance, you may want that defects should default to Private, and enhancements should default to public (or none). You might expect that issue type security scheme would be a mapping of issue types to issue security schemes (in the same way as Field Configuration Schemes), but unfortunately not.

There are two ways to get round this, one using Javascript, one with a post-function.

Continue reading Setting issue security level by issue type

JIRA SQL Plugin

The SQL Plugin lets users run SQL predefined queries against the JIRA database, the results are rendered using velocity templates customised by an administrator.

The same template can be used as a portlet/gadget or a report, although generally additional information will be shown in the report, for instance the data table driving the chart.

img4d.jpg

Continue reading JIRA SQL Plugin

Using Properties in JIRA

Introducing an utterly unglamourous plugin – the "Properties Manager". This allows you to browse and edit the propertyset on most jira "entities". Depending on the amount of additional work you are willing to put in, this could be a partial solution to JRA-1991 and JRA-2980.

It's probably best to describe this by way of a few examples. Say you wanted to assign a cost centre to each project. Using this plugin you could export the list of projects, then add the cost center column, then import. Why is this useful? You could then display it on a custom field for each issue in this project (when the custom field is available), or query for all projects with this cost centre (when the searcher is available).

Continue reading Using Properties in JIRA

Auto duplicate search in JIRA

A requirement came up recently that the user should be encouraged (forced) to search for a matching existing issue before submitting a new one. This particular group spent a lot of time “deduping”, and it turns out that around 80% of their issues were closed as duplicates.

The solution outlined below, does a search for possible duplicates after the summary field loses focus. The results of the search can either be displayed below the summary, or for a more in-your-face experience, in an overlay.

At this stage the user can click the possible dupes which will open the issues in a new tab. Then they either abandon or creating a new issue, or if none of them are a match they can proceed.

imgdb.jpg

Continue reading Auto duplicate search in JIRA

Script Runner JIRA Plugin

For a long time I’ve been meaning to rewrite the “groovy runner” plugin so that groovy wasn’t a requirement, and having found myself with some unexpected but welcome time on my hands I have finally done so.

Continue reading Script Runner JIRA Plugin

What’s Wrong with ClearQuest II

My long-term business partner, Trent, told me the other week he was going to write a rebuttal to my previous rant, “What’s wrong with ClearQuest“, called “What’s getting slightly better about ClearQuest”. I think he’s struggling to fill a few paragraphs though, because it hasn’t been forthcoming.

He recently wrote a reply on the forum that the admins must have deleted, completely lacking a sense of humour as they do. Anyway, it’s worth blogerising for posterity.

i am a fresher to clearquest.i am still in learning phase of it.i will be very thankful to you if some of you can give me some information on clearquest scope for career growth

In my neck of the woods you’re more typically seeing $35.00/hr for a contract position for ClearQuest admin.

Trent responded with the following:

$35/hr? To work on ClearQuest? No thanks, I’d rather stay home and pull teeth.

I won’t get out of bed these days for anything less than £100/hr if I have to do ClearQuest work. And I increase my minimum hourly rate annually at about 5 times the rate of inflation. You can be horrendously incompetent in London and still fetch £450-600/day, depending on whether your client has any idea about ClearQuest. (The hidden subtext here is that you can make a lot of money claiming to specialise in ClearQuest, and as long as no-one else in the company knows any better, get away with it even if you know diddley-squat.)

Continue reading What’s Wrong with ClearQuest II

Highlight Overdue Issues

Here is a relatively simple way to highlight overdue issues… the more overdue they are, the hotter the colour:

img2e.jpg

Continue reading Highlight Overdue Issues

JIRA 4.0 Beta Test Drive

I was keen to get my grubby mitts on the JIRA 4.0 beta to see what JQL (jira query language) was all about… this is my first test-drive, I haven't read much of the release notes or the bug reports, so I'm probably way off on some of this.

Continue reading JIRA 4.0 Beta Test Drive

How to Make JIRA Twelve Times Faster

As an addendum to the previous post, I've done some more cleaning up, and JIRA is now 12 times faster on the average measurement.

Label # Samples Average Min Max
Login 3 18 13 29
LoginFBrowse 10 41 10 184
Get issue 903 590 21 7792
Dashboard 9 14836 10006 18698
LazyLoaderPortlet 9 632 298 1091
CreateIssue Link 9 367 165 634
Create Choose type 9 289 141 677
Issue Details 9 2195 1269 3521
TOTAL 961 727 10 18698

Continue reading How to Make JIRA Twelve Times Faster

How to make JIRA 6 1/2 times faster

Over the last few months JIRA performance has tanked, but gradually. Difficult to think of any particular inflexion point, just more users, projects and issues.

I had a number of changes I had in mind to help:

  • Application server
  • DBMS type and location
  • Caching for static content
  • Reducing numbers of projects, groups etc.
  • Optimising indexes.
  • Turn gzip compression on.
  • Memory and garbage collector settings.
  • Bypassing the apache reverse proxy and going direct to Tomcat
  • Use AJP13 connector instead of (as well as?) ProxyPass.

BTW, if you're looking for the instruction on where the "go-faster switch" is and can't be bothered to read the following, I'll tell you simply that you should replace the group jira-users in your roles or permission schemes with Anyone. If you're not using that then hopefully there will be something else of interest here, if only how to set up a simple load test to get some figures.

For the record our numbers at the time of testing are:

Issues 112897   Projects 475   Custom Fields 505   Workflows 239   Users 7613   Groups 698

Continue reading How to make JIRA 6 1/2 times faster

Jira Workflow Report Update

I’ve refreshed the workflow plugin a bit. If you want jump straight to the installation section.

A problem I’ve noticed with the workflows people create (not my own ones of course!) is that the resolution is often inconsistent.

This might stem from a lack of understanding of the resolution field and what it’s used for. In the default workflow, there is a state called Resolved, and when you get to that state the resolution must be set, and if you reopen the issue it’s unset, so people tend to think it happens by magic. It doesn’t, that’s the way the default workflow has been written, and there is no relationship between workflow states and the resolution, unless you define one. Continue reading Jira Workflow Report Update

Confluence Groovy Runner

This simple plugin allows you to run Groovy scripts in the context of confluence. Groovy scripts have full access to the API.

This is in the same spirit as the Jira groovy runner, that is, it lets you quickly develop proofs of concepts and simple macros, without having to worry about all the boilerplate of a Confluence plugin, and the agonisingly slow edit-debug-deploy cycle (even with JavaRebel). Developing should be as simple as adding your macro, saving the page, make changes to your groovy script, then reload the page.

If you use IDEA (probably true of Eclipse too) you can attach the debugger, and break in to your groovy scripts.

Example page output from running the three supplied scripts:

conflu1.gif

Continue reading Confluence Groovy Runner

Impersonating another user within JIRA

This plugin allows an administrator to impersonate another user, i.e. to
become that user in jira, without knowing their password – which is often
impractical if authentication is handled by LDAP.

Impersonation is useful for administration of shared filters, shared
dashboards, double-checking a user has permission to do an action etc.

The implementation is surprising simple, so simple in fact that I doubt it
will work in all circumstances. So far I have only tested on Jira 3.12.2
and Jira 3.13, with the DefaultAuthenticator and also an SSO solution that we use.

Installation

Drop the jar file: jira-plugin-switchuser-09.jar in to WEB-INF/lib and restart.

Note: This is compiled with Java 5 so you must be using a Java 5 or above
JVM. If you are still on 1.4 consider upgrading or compile the source yourself.

Usage

In the Administration page, under “User, Groups & Roles” you should see a new
link “Switch User”. Further details are on that page.

Synchronising LDAP Groups with Confluence Groups

 I set up Confluence to integrate with our LDAP infrastructure, to take advantage of protecting spaces with LDAP groups. We had performance issues but I increased the cache timeout in the confluence-coherence-cache-config.xml properties file as documented here.

I then thought everything was well as performance seemed “OK”, however reports of poor performance, like 15-25 seconds to get the dashboard page, started to trickle through to me. It turned out I had been in a fool’s paradise, as if you are in the confluence-administrators group all the permissions checks are bypassed.

Continue reading Synchronising LDAP Groups with Confluence Groups

Setting issue security level by issue type

 It’s not possible in JIRA to create an Issue Security Scheme by issue type. For instance, you may want that defects should default to Private, and enhancements should default to public (or none). You might expect that issue type security scheme would be a mapping of issue types to issue security schemes (in the same way as Field Configuration Schemes), but unfortunately not.

There are two ways to get round this, one using Javascript, one with a post-function.

Continue reading Setting issue security level by issue type

Categorising Projects in the JIRA Project Picker

We have around 250 projects in JIRA, and the list of projects was becoming unmanageable when creating an issue, and in the issue navigator. I modified the templates so it groups them in to “my” projects, versus “other” projects:

img21.jpg

Continue reading Categorising Projects in the JIRA Project Picker

Showing Unavailable Actions

 BTW – sign-up to the blog is currently not working, so you cannot comment.

This is an attempt to deal with something I’ve mentioned previously, and is JRA-5705:

The problem I have with conditions, is that when a condition is failed, the transition is not displayed. This can lead to confusion for users – “I’m sure I saw that action the last issue I looked at, and I think I’m supposed to resolve this, but the link isn’t there”… followed by a support call.

Ideally if a condition is failed the link should be present but disabled… when you mouse over it it could you give you some explanatory text, eg “Cannot resolve because this issue depends on issues that are not resolved”. You could provide that message as a parameter in the condition.

I had a bit of a monkey around with the code and came up with this:

imgb7.gif 

Continue reading Showing Unavailable Actions

Deactiveating Old JIRA Users

BTW – sign-up to the blog is currently not working, so you cannot comment.

I’m trying to make our installation JIRA as self-supporting as possible. This means things like using SSO so there are no separate passwords for users to remember, and of course forget, and automatic creation of users on their first visit to jira. Of course, this is only possible for sites whose users are all internal.

Something else that we need to do is deactivate users who have left the firm. That’s not for security reasons, but to:

  • keep the number of users in jira-users below the soft limit for the ajax user picker – 5000.
  • help keep drop-down lists like assignee manageable, project managers won’t remember to update the roles for their project when someone leaves.
  • keep tabs on which projects are active – eg if there are no projects admins for a project, perhaps it’s time to close that project down or assign someone else.
  • and regularatory reasons – we need to confirm on a periodic basis that each user should still be members of their roles – the fewer the active users, the easier that is.

The logic is simple enough – for each user in jira-users, work out if the user should be retired, if so remove them from all groups and roles they are in.

Continue reading Deactiveating Old JIRA Users

Copy Project Plugin

This plugin allows you to create a new project based on another, basically it attempts to copy everything except the issues. It will copy:

  • Schemes
  • Role memberships
  • Custom field configurations
  • Optionally, versions and components.

copyproject.png

Continue reading Copy Project Plugin

JIRA-Groovy Plugin

This plugin moved to http://confluence.atlassian.com/display/JIRAEXT/Groovy+Runner. There is some background info here though.

I discovered the JIRA Groovy Runner recently, whilst looking for a starting point to integrate Jython in to JIRA. I succeeded in adding a Python runner, but then realised it wasn’t particularly useful, me not being a strong Python programmer.

However, it did make me look harder at the Groovy Runner, and manage to extend it somewhat to cover Conditions, Post-Functions, Validators and services… In theory you can cover all the areas where JIRA provides something to hook in to, eg Portlets, Reports, Listeners, Services etc.

Continue reading JIRA-Groovy Plugin

Relocating, moving or copying ClearQuest schema and user databases using database vendor facilities

This blog describes the process for moving or copying ClearQuest schema and user databases between two separate database instances using the database vendor’s native facilities. This approach has a few of advantages over the standard Move /Copy Database facilities provided by ClearQuest (either those used via the Maintenance Tool or Designer, or via command line utilities like installutil.exe):

  1. Speed. Restoring a database using the database vendor’s facilities is always quicker than the facilities ClearQuest provides.
  2. No network connectivity required. ClearQuest’s facilities require simultaneous access to the source and destination database instances. This isn’t always desirable or possible.

The approaches shown in this blog apply to Oracle, DB2 and SQL Server.
Continue reading Relocating, moving or copying ClearQuest schema and user databases using database vendor facilities

All you ever wanted to know about ClearQuest IDs…


I’ve done some pretty masochistic ClearQuest database migrations in my time. By masochistic I mean that instead of using the Rational recommended approach for a database migration (I don’t even know what that is. Fiddling around with the import/export tool? No thanks!), I’ll write routines in Transact/SQL or PL/SQL (SQL Server and Oracle’s procedural language extensions to SQL, respectively) to manually coerce the data into shape. Why? Tends to be more fun. It’s a lot faster than any other approach, too.
Continue reading All you ever wanted to know about ClearQuest IDs…

Jira History Queries

Someone asked me how they can get a chart like the one below, but broken down by priority.

imge7.gif

Continue reading Jira History Queries

Useful Python Decorator Idioms


I seem to be using decorators in my Python code more and more each day.  Given that I’m meant to be giving a short presentation on decorators to the New York Python User Group tomorrow evening, I figured I’d whip up a quick blog post to get some ideas flowing. (Update: the presentation is now available for download here.) This post briefly touches on my initial experience with decorators, offering a slightly crude but potentially more accessible explanation of them in comparison to the standard Python documentation. I’ll then jump in and share a bunch of decorator idioms I’ve found to be useful in my day-to-day code.
Continue reading Useful Python Decorator Idioms

What’s Wrong with ClearQuest

I have been using ClearQuest since around 1997, and ClearCase for longer. I’ve worked on schemas in many banks and other large companies, around the world. I co-authored the tools on this site. I’ve delivered training at various levels around the world. I’m certainly not the last word on ClearQuest, but I think I know it pretty well.

To be frank I’m not sure how ClearQuest came to have such a large installed base. The decision makers tend to be IT managers, not process or release engineers, and heaven forfend that any one that’s actually going to use it should have any input in to the decision. These IT managers hear the right words, “full audit trail”, “configurable process”, and most importantly “integrates with ClearCase”. They hear: web client, native client, Rich Client Platform-based client, and they don’t think – “Jeez, how are we going to support and maintain all those clients and deal with their myriad differences and quirks”, they think, “ooh, 3 clients, that should cover all the bases”. No one got fired for buying Microsoft, and people rarely get fired for buying IBM, so they go with the herd and blithely hand over several hundred grand.

A few years ago I gave a ClearQuest admin training course to a financial exchange. I was explaining some quirks in the Designer that they were struggling with, and they looked at me and said “why did we buy this?”. I didn’t even sell it to them! I thought: you fucking idiots, you’re asking me why you bought this? You’ve just coughed up a quarter of a million pounds for ClearQuest licenses and you haven’t tested that it works! Where is the due diligence? And I find this pretty typical. ClearQuest is chosen using a stock list of “requirements” – usability and maintainability do not figure in them, or the managers are too apathetic and credulous to test it themselves.

Continue reading What’s Wrong with ClearQuest

Jira Release Notes and Perforce

 Someone recently asked me if the release notes in JIRA could contain the files that have changed to fix that issue. Perfectly reasonable. However, the changelists (the $client uses Perforce) that fix the issue are not held in JIRA, instead, the plugin runs some p4 commands to get the changelists, and in turn each delta that is part of that changelist. It also does some nice stuff such as turning it in to link to p4web so you can click through to see the diffs. I considered re-using the code from the Perforce plugin, but…

I’m not a big fan of the release notes feature in jira. It’s too restrictive, although you can add templates for release notes, they’re available to everyone, and then they can’t be configured further, much. Everyone wants a different format, with different custom fields and so on. At the least the release note feature should support standard features of the query navigator. The feature of copying the HTML is a bit gimmicky IMHO.

Continue reading Jira Release Notes and Perforce

LDAP Picker Custom Field

I needed a custom field whereby a user could pick a sponsor for an enhancement… a sponsor may be a jira user, but may well not be – eg. business users are not all jira users. I wanted a field that worked in the same way as the funky new AJAX user picker in jira – but instead queried the corporate LDAP directory.

imgaf.jpg

Continue reading LDAP Picker Custom Field