Make activity.atom feed usable for detecting redmine changes
Currently, activity.atom feed only tracks issue creation/removal/status and comments. This limits feed for only human reader. But there are numerous automation tasks this feed can be very useful.
Right now i'm trying to create something like Jira Client (http://almworks.com/jiraclient) for redmine. This is my personal hobby project that has a goal to make me a better programmer. I have already performed various tests, created architecture sketch and performed a lot of research. The only serious problem i can see right now is "how API client will notice that something changed in redmine".
The intuitive way is to make API call like "show all issues that has changes since last time i checked" - but this is completely impossible in redmine since only saved filters can be used in issues API and where is no such thing possibel in saved filter.
The more interesting way i'm researching is to use activity feed. Modified a little it can be used to detect ANY change on redmine server so API client can fetch changed issues/projects/users/whatever and do it's bidding. The modifications i can propose:
1. Add more information to activity feed. Ideally, any redmine change can lead to record in activity feed. But this is not need to be implemented "all and right now" and can be added step-by-step. For example, right now records for issues priority and assigneed change can be added :).
2. Currently, activity feed only shows last N records. This is good for automatic aggregator that runs 24/7 but is not very good for human/software that checks state periodically. For example, i'm a program that s installed in laptop and synchronize itself with redmine. Periodically, since sometime my owner closes down laptop lid and sometimes where is no network connection. I has synchronized and network dissapears. After a few hours network goes back again and i poll redmine for activity feed - and see 15 new feeds. So now i have a problem - how many activities it was between my last sync and current time? How i can get this activities? The possible solution is to add atom feed arguments like "GET http://www.redmine.org/activity.atom?from=184.108.40.206.10.2010" where "220.127.116.11.10.2010" is time and date.
3. Adding something like ?from to activity.atom is very good and solves all problems, but is not very bullet-proof since granularity is 1 second and redmine can be changed same seconds last item was fetched, making this change time equal to "last fetch" time. The bullet-proof solution is no introduce something like subversion 'revision' to redmine. That's very simple: add a counter to database and every change increments it. So, activities feed user can just request "show me activities after specified revision", like this: "GET http://www.redmine.org/activity.atom?after=123".