I outed myself as a big JetBrains a couple of times over and I am still madly in love with almost everything they do, despite them not paying me one cent for this endorsement! Heck, I even have to pay for their products, these ungrateful bastards! Still, they are the best and usually I am very happy with their products. But even they screw up sometimes.
Today, I have spent several hours trying desperately to get my copy of PhpStorm to talk to my local Trac server. It should have been a simple task. Open
Settings and go to
Tools->Tasks->Servers. There you can chose between different bug and issue trackers, including Trac. But here’s the catch: It doesn’t work.
Cannot connect to http://localhost:8008 it says. “That is odd.”, I think to myself, “I am pretty sure that this should work as I have this URL open in my browser and it looks just fine!”. So I opened the log file
logs/trac.log and found that:
WARNING: [127.0.0.1] HTTPBadRequest: 400 Bad Request (Invalid request arguments.)
“Well, that’s a start. I am pretty optimistic, with this I can find an explanation on the internet in no time!”. Boy, I was wrong. Neither Edgewall Software nor JetBrains nor any of the usual forums had a clue what I was talking about. I was ready to give up and try any of the other supported trackers, when I found a note about the Trac XML-RPC Plugin, which might help. Of course, installing it was not as straight forward as I would have liked it to be, as Trac only supports Python-2.7 and my system defaults to Python-3 but this is how I got it working:
Then I had to enable the plugin inside Trac under
Admin->Plugins and press apply. Finally, I changed the
Server URL in PhpStorm from
http://localhost:8008/login/rpc and voilà! PhpStorm and Trac finally got along!
Conclusion: While it is possible to connect Trac with the task system in PhpStorm, it is not really self-explanatory. It also seems like there are some features missing – e.g. I can’t get read task descriptions from Trac only the titles. I remains to be seen if my workflow profits from this the new liaison between Trac and PhpStorm.