JIRA API – Anonymous Access to Public Instances

There are rumors around that it is impossible to use the JIRA API anonymously, even with an instance set up for public read access.

This is not true. I wrote a tiny example tiny project to demonstrate it by retrieving info from a public JIRA instance (the one for Hibernate).

The main source of this confusion: neither the official JIRA API Java client, nor the third-party (and easy to work with) rcarz client ships with anonymous access classes or examples.

Get the bits on Github.

 

Opaque Binary Formats are Terrible

I’m looking at you, Crystal Reports!

Opaque binary file formats for development assets are a scourge on the software development community.

Here’s some context. At Oasis Digital we typically work on complex enterprise data systems. These systems have a long life, with multiple (or many) developers working concurrently and over time. These systems are important to the companies which use them, which is to say, we must not accidentally break things.

In that context, we’ve encountered the following problem on numerous occasions, using numerous tools, on multiple platforms, over many years. Today I’m going to pick on one specific and especially painful instance of it: report definitions.

We believe strongly in code review, where code is defined broadly to include things like the definition of a report. That definition can include SQL, layout information, styling, parameter definitions, and so on. Whenever a developer makes a change to a software system, another developer (often a more senior one) reviews the change to see exactly what is changed, and verify it appears correct, and that no accidental changes are included. In this way, we greatly reduce the incidence of accidentally changing or breaking something that was not supposed to be changed.

Code / change review is very common in most or all mature software development organizations.

For source code, almost universally represented in plain text, the mechanics of code change review are straightforward. The diff command, or any of 1000 tools for comparing files, can readily show the differences between version and an version M. (As an aside, whenever someone presents a mechanism for representing source code is something other than plain text, I dismiss it with a chuckle unless there is also a solid solution provided for the question of how to review changes.)

Happily, many reporting tools represent the layout and query information for a report in a text format. Sometimes it is a proprietary text format, sometimes it is XML; regardless of the ugliness, these all have the merit that it is possible to compare them as text and see what changed between two versions. Offhand, I would like to call out:

  1. Jasper Reports, in the Java world
  2. ReportBuilder, in the Delphi world

for doing the right thing: offering a text-based, diffable representation of a report definition.

Crystal Reports, though, is both a popular and problematic tool. It represents reports in an opaque binary format, for which a “diff” produces nothing readble. With only this in hand, “code review” of report change consists of:

  1. Run the old report
  2. Run the new report
  3. Hold them up next to each other and compare the output
  4. Hope that no accidental changes were made that would break the report for some parameter that wasn’t used for testing

I have heard that “Hope is not a strategy” and that is certainly the case here. Yet this tool (and others like it), an opaque binary representation of report definition leaves us with only hope.

A Way Out

I have read that Crystal Reports offers an API (object model) by which software can inspect and manipulate the report definition. Using this, it should be possible to write a tool which takes a report definition is input, and emits a text file as output, such that the text file contains a human readable definition of every important piece of information about the report definition. this simply adds a minor step to a review/diff process: run both the before and after representations through this conversion, and diff the outputs of the conversion.

To be effective, such a tool would need to produce a text representation which is both complete (which is to say, includes essentially everything that will be needed to re-create a report definition) and stable (which is to say, minor changes to the report definition produced by clicking around, result in minor changes to the text output)

Unfortunately, I have not been able to find such a tool. If anybody knows of one, I would love to hear about it.

Clojure(Script) for Server and Client Development

ClojureScript is a relatively recent addition to the list of languages which compile to JavaScript. Unlike some such languages, it does not only fix the minor difficulties with JavaScript (like syntax oddities), rather it is a wholly different language with a LISP-like syntax and very powerful semantics. Many words have been written on “why ClojureScript”, which I won’t attempt to restate here. Rather, these are the handful of reasons ClojureScript is worthy of a deep dive for projects like ours (at work).

Strengths (for us)

  • It is a “programmable programming language”, especially good for building abstractions – the usual LISP strength.
  • It is biased toward immutability and functional style (though many things are mutable, because of JavaScript underneath); yet can easily escape when pragmatically needed.
  • Is it is possible to use the same(-ish) language on the client and server; our projects benefitted from this for years in the boring old days of desktop client-server development.
  • Client side ClojureScript is built on JavaScript runtimes and libraries: proven, strong, dominant, multiplatform.
  • Server side Clojure is built on Java runtimes and libraries: proven, strong, dominant, multiplatform.
  • Although there are not a great number of ClojureScript developers, they tend to be good developers.

Weaknesses

  • Although parentheses-first syntax does not bother me, it does bother some developers.
  • ClojureScript is different enough from JavaScript that knowledge of the latter doesn’t help much with the former;
  • Yet, it is still necessary to know JavaScript well.
  • There are at least 100x fewer ClojureScript developers than JavaScript developers; perhaps 1000x.
  • Fits well with some JS libraries, less well with others – sometimes that prevents the “shove in an hack” style of development which is JavaScript’s strength and weakness.

 

JIRA OnDemand CSV Import – Rough Edges

We just went through a surprising amount of effort to import projects in to Atlassian’s JIRA OnDemand, using their CSV importer. Here are some tricky bits we hit along the way; this is accurate as of November 2012. If you are reading this well after that date, hopefully JIRA’s newer JSON-based import option is supported and documented by now.

  1. JIRA CSV import can import attachments. It fetches them from URLs. Beware though that it won’t accept alternate ports. http://host/whatever is OK, http://host:nnn/whatever is broken. Moreover, is broken with a completely incorrect (403) error. (Undocumented.)
  2. CSV import can import comments. The format is documented on their site, and arcane, and permanently leaves a trail of extra data in the comment text(!). But it works.
  3. CSV import will import events as of date-time as imported. Only one date format is supported for comments; though it date format can be changed for  issue-level fields. The date format does not include a time zone. By trial and error we learned that the datetime is interpreted as the time zone which the JIRA server (at the OS level) is set to. (Undocumented.)
  4. JIRA OnDemand servers are set to the US Central time zone, or at least they pretend to be for us. YMMV. (Undocumented.)
  5. JIRA CSV import will automatically create-as-needed users if they are mentioned at the issue level (as an issue creator etc.)… but will only generate an error about missing users at the comment level.
  6. CSV import can import parent-child relationships, but not other kinds of relationships.
  7. The JIRA REST API is tempting – but it can’t assign correct historical date-times to anything, so it’s generally not useful for importing data.

In spite of those rough edges, we were able to get the job done, and are happy with JIRA.

 

Our Interns Built a Mobile Web App, Here is Their Story

This summer, we hired three interns to build a mobile web application and learn a bunch in the process. Here is their story, in video form:

video
play-sharp-fill

If you don’t have Flash installed (and thus don’t see the video above), you can try this direct link to the video. It plays well on most platforms (including an iPad).

It is also available on YouTube.