I have a PHP-based job for anyone if they are interested. I figured I would try to outsource first before doing it myself since there is far too many things to work on with NetGore. ![]()
The job
I want a PHP script that will download the latest new issues and updated issues from the Google issue tracker. This script will download the XML-formatted issues and parse out each part for each issue into a single variable. For now, just print each value out on a new line, since I will alter it later to store the values in the database.
The parser should do the following:
- Use updated-min/max and published-min/max to grab only the issues since the last check. This means two queries will need to be made. For now, just hard-code the last query time, but use the current time as the max time.
- If the last query time is more than 5 days ago, grab issues in 5-day steps. So if the last run was 12 days ago, it should run 3 times (5 days, 5 days, then 2 days). This way we don't have way too many issues at once. Mostly intended just for the initial run.
- If downloading the issues fails, the last query time should NOT be updated to the current time. Otherwise, update it to the current time.
- No issues should be skipped. Combined with the 5-day limit and a large number on max-results, this should be easy enough.
- This will be run hourly from a cron job, so it should be nice and light-weight and error-resistant (or if there are errors, they don't result in issues being skipped).
- Ideally, the design will be moderately clean so it can be altered later without much concern.
The purpose
The reason I want this is to be able to keep a local copy of all issue reports. This way, when you use BBCode that references issue numbers, I can show information other than just the issue number. I'll also be able to have a count in the user profiles on who has made how many issues, when their last issue report was, etc. ![]()
For the issue tracker API info, see: http://code.google.com/p/support/wiki/IssueTrackerAPI#Retrieving_issues_...
I completely forgot about this, but Cruzn ran across it and decided to write this for me. So now we finally have some metadata to display for issue reports!
Examples:
BBCode: [ issue=230 231 237 9999]
Output:
#230,#231,#237, #9999BBCode: [ repissue=230 231 237 9999]
Output: Issues reported. See issues
#230,#231,#237, and #9999.Thanks, Cruzn!