Monday, June 01, 2009
Thursday, March 05, 2009
Adding Log4j DOCTYPE to log4j.xml
If you're using an XML aware editor, it's nice to take advantage of built in XML validation when editing log4j.xml configuration files. Here's a DOCTYPE that works with these editors:
<!DOCTYPE log4j:configuration PUBLIC
"-//LOG4J//DTD LOG4J 1.2//EN"
"http://svn.apache.org/viewvc/logging/log4j/trunk/src/main/resources/org/apache/log4j/xml/log4j.dtd?view=co">
Tuesday, December 02, 2008
Generating a task list from JIRA issues using XML-RPC and Groovy
This is just a quick note demonstrating how to generate a task list from issues entered into JIRA. I use TaskPaper for creating GTD-style task lists for work and thought it might be handy to tack issues assigned to me in our JIRA issue tracker in the same way. To do so do the following:- Install Groovy
- Download the Groovy XML-RPC module and copy it to $HOME/.groovy/lib
- Create a filter in JIRA to return tasks that you're interested in. Make note of the filterIdfor the filter you created.
- Create a shell script, here I'll call it jiratasks.groovy, and copy the following code into it:
#!/usr/bin/env groovy import groovy.net.xmlrpc.XMLRPCServerProxy import java.text.SimpleDateFormat // Included to make pretty dates def dateFormat1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss") def dateFormat2 = new SimpleDateFormat("yyyy-MM-dd") // Connect to your server //Your URL may vary def server = new XMLRPCServerProxy("https://your.jira.server.net/rpc/xmlrpc") def jira = server.jira1 // Subsitute your username and password here def token = jira.login("your_username", "your_password") // Replace "10021" with your filterId def issues = jira.getIssuesFromFilter(token, "10021") // Sort by priority issues.sort { it.priority } // Get a list of projects def projects = issues.collect { it["project"]} projects.unique().sort() println "JIRA Issues:" projects.each { project -> println("\t${project}:") issues.each { issue -> if (issue["project"] == project) { def creationDate = dateFormat2.format(dateFormat1.parse(issue.created)) println("\t- ${issue.key}: ${issue.summary} @created(${creationDate})") } } } jira.logout(token) - Run it like: jiratasks.groovy > JIRATasks.taskpaper
- Voila. A GTD style tasks list that works with TaskPaper
Wednesday, June 04, 2008
Subscribe to:
Posts (Atom)
