Feature #6641

creating project-specific activities

Added by Albert Rosenfield about 11 years ago. Updated over 1 year ago.

Status:NewStart date:2010-10-12
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Time tracking
Target version:-
Resolution:

Description

Hi

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?

do_not_allow_setting_is_default_if_project_id_is_set.patch Magnifier - fix to backend so users can't submit an invalid enumeration (900 Bytes) Albert Rosenfield, 2010-10-25 17:06

do_not_filter_out_all_system_activities_when_a_noninherited_project_specific_activity_exists.patch Magnifier - fix to backend so that it doesn't filter out all enumerations with parent == nil (964 Bytes) Albert Rosenfield, 2010-10-25 17:06

History

#1 Updated by Felix Schäfer about 11 years ago

I think it's a problem of permissions, as the activities are currently only manageable for the administrator.

#2 Updated by Albert Rosenfield about 11 years ago

Hi

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?

#3 Updated by Albert Rosenfield about 11 years ago

I've looked in redmine/app/views/projects/settings/_activities.rhtml and currently there is only a Reset and Save button, nothing for add/edit/delete.

#4 Updated by Felix Schäfer about 11 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 about 11 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.

Okay.

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.

#6 Updated by Felix Schäfer about 11 years ago

A diff: yes, but if you want to play with core, submit a diff against core directly, i.e. work on a versioned installation. You could also make it as a plugin, but then just publish the plugin and link it from here.

#7 Updated by Albert Rosenfield about 11 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.

#9 Updated by Etienne Massip almost 11 years ago

  • Category set to Time tracking

#10 Updated by Greg T over 1 year ago

This is related to #4077.
"System Activity" (enumeration_system_activity in locales) is baffling when there's no other kind.

Also available in: Atom PDF