thumbtack-technology/redmine-issue-hot-buttons — pull request #25 by borgstrom (2012-07-17 13:07:42+00:00)
Title: Update to work with redmine 2.0

I've updated the plugin to work with redmine2.0, it's rather crude right now and I'd love some feedback on polishing it up to get it merged back into your branch.

I started trying to keep compatibility between redmine 1.x & 2.x (you can see in init.rb) but I ran into some slight differences that I need some help making work for both versions in other parts.

Things changed that need to be reconciled to support both versions.

### Settings reference

In ```_assets.html.erb``` I had reference the settings like so:

```
settings: <%= raw Setting['plugin_issue_hot_buttons_plugin'].to_json %>,
```

Note that it's ```plugin_issue_hot_buttons_plugin```.

### ```raw``` output

To prevent rails 3 from escaping all of the objects in the javascript I had to prepend ```raw``` to all of them. I don't follow rails development so I'm not sure if this would break in rails 2.

### ```@issue.to_json``` structure change

When you call ```@issue.to_json``` it now adds an extra ```issue``` member to the object structure, for instance in the javascript I needed to reference the ```t.issue.issue.tracker_id.toString();```

---

Thanks for this plugin. It was exactly what I was looking for when we started testing redmine for some projects. Let me know your thoughts/feedback and we can hopefully get this polished up and committed back to your repo.