Access 3.1 remotely via the command line
One of the absolutely awesome tools included in the 3.0 package is the cli tool. The cli tool lets you perform common tasks such as installing the system, adding and removing modules, exporting and importing articles, and more. These are all tasks operating directly on the server where The Bug Genie is installed, and are useful for your everyday server admin Joe. However, The Bug Genie – being an issue tracking tool – wouldn’t be complete without equally powerful tools for your everyday developer Jane!
In 3.1 we wanted to improve the existing tools, and give you full access to interfacing with The Bug Genie via the included cli. As many of us developer live inside a cli, being able to interface with The Bug Genie directly without having to resort to inferior tools such as a “Web Browser”, is golden! So, what do we have in store for you in 3.1?
Without further ado, let’s ask the cli tool what it can do for us:
The cli tool lists all available commands when passed the “help” parameter. Of course, this can also be used to further study the required arguments and details for the commands listed above. Let’s try this with the “list_issues” command.
- State (open or closed)
- Issue type (any of the available issue types)
- Assignee (me/none/all/username)
Let’s try and list all open bug reports assigned to me:
Notice how the arguments passed doesn’t have to exactly match the existing values. When querying for issues of type “Bug report”, it is enough to include the word “bug” in lowercase. The Bug Genie will make an effort to try and find the type you are looking for. This is also possible for data values (resolution, status, etc) – as we will show later.
Next, we pick an issue from the list, and see what it’s all about. Let’s pick issue #389:
Waddayaknow, we can’t resolve it without more information either! How convenient – it respects the workflow defined for the project. So, what parameters would need to be passed to reject or resolve it? Again, we can use the command line tool to query The Bug Genie. The “list_transitions” command can take one of the transitions listed as a parameter to show more information about that transition. Again, we don’t have to pass “Resolve issue” as the parameter, The Bug Genie will find the correct transition:
The cool thing about all this is that to achieve the functionality above, The Bug Genie 3.1 had to learn a new language: JSON. To be honest, it already did speak some JSON, but for this task it needed to speak JSON much better. We added JSON responses for the issue view, and the update issue action now speaks JSON as well. The same is also true for the issue listing, as you can see above. In addition, there are a some new views available, such as project listings, transition listings and datatype listings. Because these are all implemented with JSON, using these endpoints for your own applications is easier than ever.
If this didn’t make you want to install The Bug Genie 3.1 when it’s out, I’m all out of teasers. No, wait, I can probably find another one. Let’s try again tomorrow.