markforster

Nov 12

Fooling around with fixx 1.9 api

As the release of fixx 1.9 is drawing closer, I thought I’d jot down my thoughts about the new filtering capabilities of changes made to the api and some pointers on how you can leverage it using filters.

Fixx 1.9 has seen a revamp of a lot of the UI, a general polish that tidies up a lot of loose ends left from 1.8.* that we’ve been keen to get in for some time now. I’m loving the UI tweaks and have had a lot to do with some of these improvements but the big thing thats been getting me all excited is the inclusion of filters in the API.

As of 1.9 it is now possible to request issues using filters, something that, for the past few month has caused a headache for me and my work on a set of tools to accompany fixx notibly a time tracking tool and a PM tool to aid issue and release management.

So what can the new filters in 1.9 do that they couldn’t in 1.8.*?

Well for a start, in order to get all issues for a project the usual route would have been

<yourfixxdomain>/api/projects/<projectid>/issues

which was ok but didnt filter those issues. If you had a thousand closed issues for this project you’d have a thousand issues returned, something I felt was always a little anal!

Another example, getting issues assigned to a user

<yourfixxdomain>/api/users/<userid>/issues

again, does the job but still returns ALL issues assigned to that user.

So what makes the new filtering functionality cool for 1.9?

well, the two queries above can now be represented as follows:

<yourfixxdomain>/api/issues?qProjectId=<projectid>

and

<yourfixxdomain>/api/issues?qAssignedTo=<userid>

and of course they can be combined to form

<yourfixxdomain>/api/issues?qAssignedTo=<userid>&ProjectId=<projectid>

Another good example is my PM tool that runs comparisons against changes to issues. before filtering I had to pull back ALL issues from fixx every time i ran a comparison which became both a memory and processing hog. Now i can break down my requests into chunks based on project, area, user and resolution as follows

<yourfixxdomain>/api/issues?qAssignedTo=<userid>&qProject=<projectid>&qResolution=<resid>&qArea=<areaid>

With multiple threads making small requests, my PM tool now runs smoother and feels like its more responsive almost providing a live feed of changes made to fixx.

One final thing… …for those who have already tinkered with the filtering, you probably have a good idea of how to construct a filter using the querystring parameters.. ..for those who havent tinkered, heres a quick list of the filter parameters you can use:

Note : The following query parameters are reliant on a valid project id. If you pass in a project id and one of the types below is not within the project specified theres a good chance you’ll get no results returned

OK.. ..thats about it. I’m going to spend some time tinkering with this and possibly provide some tutorials on how to optimise your’e filter requests and some good practices for using filters. When I get some more time I’ll also start to publish information about my companion tools.

Oct 18

Oct 16

Oct 05

My New Info site -

I’ve been working on putting together an information site to tie together my social network. Ive totally ripped off tumblrs’ theme but who gives a fuck!

Its no where near complete, needs some serious editing and isn’t really how I want it but its a start.

Toggle Hidden Files in Finder using AppleScript

Tested on Leopard 10.5.6, I totally ripped these solutions from various sources on the net after about 5 minutes of googling.

The solutions below arent great but until I can be bothered to conjure my own more elegant implementation or have time to google further, both are enough for a mac novice to quickly view hidden files/folders without resorting to yet another app to plug a missing feature in OSX.

Solution 1 - The AppleScript Way

Navigate to ‘/System/Library/CoreServices/Menu Extras’ and double tap ‘Script Menu.menu’. This should add a script icon to your menu bar.

Grab the following apple script…

tell application “Finder”
activate
set previous to “FALSE”
set previous to do shell script “defaults read com.apple.finder AppleShowAllFiles”
display dialog “Show Hidden Files… ” & previous buttons {“TURN ON”, “TURN OFF”} default button 2
copy the result as list to {buttonpressed}

if previous is “TRUE” and the buttonpressed is “TURN OFF” then
do shell script “defaults write com.apple.finder AppleShowAllFiles FALSE”
quit
end if
if previous is “FALSE” and the buttonpressed is “TURN ON” then
do shell script “defaults write com.apple.finder AppleShowAllFiles TRUE”
quit
end if
end tell

delay 1
tell application “Finder” to launch

… and save this as “ToggleHiddenFiles.scpt” inside /Users/your-user-name/Library/Scripts folder. The folder may not exist so you will have to create it if it doesn’t.

Solution 2 - The Terminal Way

To view hidden files and folders open terminal and throw the following at it:

$ defaults write com.apple.finder AppleShowAllFiles TRUE

$ killall Finder

…and to hide them again…

$ defaults write com.apple.finder AppleShowAllFiles FALSE

$ killall Finder

Enable tab field focus for all fields on Mac OSX

Oct 04

Recent Reading List