creating project-specific activities
I have a couple of projects (one for each organizational unit), where people can create issues that we then handle. Sometimes someone wants to know how much time we've spent on specific activities.
For example, one project have these activities: * DNS overhaul * Storage expansion for voice-2-text servers
Another project these: * More volunteers * Sponsors for knife campaign * Artwork
I'm using the activity field to create per-project activities, which we can then map time spent into.
I found out that this is possible because there is a 'system activity' flag in the GUI which I took as a sign that non-system activities are possible. I accessed the database with a CLI tool and created per-project activities.
However, since there already is a per-project activity page (such as here: http://redmine/projects/PROJECT/settings/activities), it would be very nice if it was possible to create per-project activities here instead of with the database CLI.
In short, the per-project activity administration page needs a "New Activity" button. And an edit button to go with it. And a delete button somewhere..
If I went ahead and implemented this, would there be any philosophical arguments against integrating it into Redmine?
I am thinking that if there is a reason that this feature is currently missing, maybe I should instead work on my own plugin?
#2 Updated by Albert Rosenfield almost 12 years ago
Thanks for the suggestion!
Just logged in and checked again, both on a production setup (0.9.something) and on a 1.0.3 I am configuring to take over.
Nope, on both systems it is not possible to add or edit per-project activities.
(I logged in as "admin", I couldn't find a way to enable more privileges for this account.)
Are the buttons supposed to be there already? Maybe this is a bug, then?
#4 Updated by Felix Schäfer almost 12 years ago
An admin can only manage (add, edit, remove) them at global, not at project level. The only project-level permission for them is selecting which ones are available for that project.
What I meant is that there is currently no permission "manage activities" (as in "add, edit, remove"), and giving those at project level would mean that they wouldn't be shareable without either making them all global or implementing a "complex" system as for the versions. This is just not there yet for the activities.
#5 Updated by Albert Rosenfield almost 12 years ago
What I meant is that there is currently no permission "manage activities"
(as in "add, edit, remove"), and giving those at project level would mean
that they wouldn't be shareable
Exactly what I'm after.
This is just not there yet for the activities.
How do I best make this happen?
I am thinking: * Create a redmine plugin * Copy app/views/projects/settings/_activities.rhtml into the plugin * Edit this and create add/edit buttons
Then, * Test that everything works * do a diff -u and submit a patch to redmine-patches (?)
As far as I can tell, the database support is already in place for this feature in the base install.
#7 Updated by Albert Rosenfield almost 12 years ago
Created a plugin ;-).It requires two patches to core:
- Disallow saving an enumeration with is_default = 1 and project_id <> nil
- Avoid filtering out all system activities when a non-inherited project-specific activity exists (in system_activities_and_project_overrides).
Can we apply them to core (in app/models/project.rb)?
Even though specifically crafted for this plugin, they do not break anything.
Or is there a way that I can override models/controllers/public in a plugin? I've tried but haven't figured it out.