suer / redmine_webhook

147 stars 81 forks source link

Other Redmine plugins compatibility #37

Closed yzzy closed 3 years ago

yzzy commented 3 years ago

To those who have lost this plugin settings tab (#26, #32, #34)

suer commented 3 years ago

thanks!

serpi90 commented 2 years ago

I had to enable the webhook module in 27 projects because of this change, luckily i was able to do it via a quick & dirty sql script.

A notice or migration script that enables it for all projects may be necessary. Not for fresh installs, but for updates.

yzzy commented 2 years ago

You are right, backward compatibility is often underestimated.

serpi90 commented 2 years ago

Something like this should work, at least in postgres:

insert into enabled_modules (project_id, "name") 
select project_id, 'webhooks'
from webhooks
where project_id != 0
group by project_id
order by project_id

Don't know how to write it as a rails migration script.

Also, as far as I understand, webhooks still work if the module is disabled. I'm not sure if that is correct.