How to Plugins

Added by Anonymous over 9 years ago

Hello -

I am interested in understanding how to develop plugins...well particularly how to integrate new features with redmine core features.

I could not find any documentation about this. Is there one available?

Vincent

Replies (9)

RE: How to Plugins - Added by Thomas Lecavelier over 9 years ago

Hello Vincent.

This page is not enough?

RE: How to Plugins - Added by Rob Felix over 9 years ago

Are there any tutorials on how to create a simple plugin, or maybe even a video like that 10 minute Redmine installation one?
Thanks,

Rob

RE: How to Plugins - Added by Eric Davis over 9 years ago

I actually have a blog post about 70% done for creating a new plugin from scratch. If I wasn't so busy I could post it in the next few days (and release the plugin.... Redmine Customers).

P.S. Keep replying to this thread and it might convince me to go and finish it up.

Eric

RE: How to Plugins - Added by Rob Felix over 9 years ago

Please do, we would really appreciate to have something we can learn from!
Thanks,

Rob

RE: RE: How to Plugins - Added by Fernando Takai over 9 years ago

I think the problem with plugins is that you cannot do a redmine wide plugin, you have to stay with the project centric ones.
On the company i work, we had to modify redmine's core so we could add some functionality, that was wide. (by the way, we are trying to move this funcionality to a plugin -- it's for timelogging -- ie: you enter the work, you go to lunch, you leave work ,and the hours stay logged)

RE: How to Plugins - Added by Rob Felix over 9 years ago

I really wouldn't know, but we would like to just add some more features without touching the core since Redmine is still in development, whenever upgrading, your changes to the core might break.

Anyways, it would just be great to have a small tutorial on making a very generic tutorial, just to get us started!

RE: How to Plugins - Added by Eric Davis over 9 years ago

Fernando Takai: I think the problem with plugins is that you cannot do a redmine wide plugin, you have to stay with the project centric ones.

Actually you can. Plugins can be added to the top menu in 0.7 (#631). Eariler today, I prototyped hooking into the core Redmine classes from a plugin. I was able to setup a some custom code that is run each time an issue was saved. It's not easy but it can be done.

Rob Felix: I really wouldn't know, but we would like to just add some more features without touching the core since Redmine is still in development, whenever upgrading, your changes to the core might break.

Managing core changes is difficult. I've been maintaining several core changes for my customers and it it very time consuming. Using Git to track Redmine's SVN helps out a lot but there is still a lot of merging I have to do.

Side note: Soon I'll have some time to build some core hooks into Redmine so plugins can modify a lot of the default Redmine behavior and pages. I'll announce it once it's ready to go. You can see the start of my idea on #1143.

Eric

RE: How to Plugins - Added by Bill Hacker over 9 years ago

I'm about 'half way' there with getting the customers_plugin to work.

Environment OpenBSD 4.3, PostgreSQL backend.

- had to grep for the schema, alter table projects, manually create table customer, used type text for all but customer_id int.

- problem may be MySQL calls instead of SQL in the creation steps?

There are obvious conditionals to select SQLite or MySQL, but not so obvious for PostgreSQL

- also had to convert a Ruby op on the SQL DB to a NOP before rake would carry on.

Tick-boxes and tabs have all appeared where expected, but 'Customer' menu tab leads to a non-existen URI:

<site_root> /customers/index/<project, tracker, whatever..>

Never wrote a line of Ruby in my life. (Zope/Plone/Python....)

I'm not aware of anything that works on MySQL that can't be made to work on PostgreSQL - usually with minimal effort, so will keep chunking...

Bill

RE: How to Plugins - Added by Eric Davis over 9 years ago

Bill,

Thanks for trying my plugin. It's not MySQL specific at all, I've used it with SQLite3. Did you run rake db:migrate_plugins after you downloaded the plugin? (Step #3)

Tick-boxes and tabs have all appeared where expected, but 'Customer' menu tab leads to a non-existen URI:

Do you have Rails Engines installed? (Step 1)

Eric

(1-9/9)