How to add additional fields to issues?

stodge - June 29, 2009 - 13:00
Project:Project issue tracking
Version:6.x-1.x-dev
Component:Issues
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I've been prototyping my own project related modules primarily because Project and Project Issue don't provide the functionality I need:

- issue dependancies/relationships
- controller workflow (only change from/to certain states), different for each issue type
- additional fields
- an issue may link to a modification request in an external database (or a new module)
- schedule/estimate information, effort in person days, start/end dates etc (Event module).
- an issue may link to one or more requirements (a drupal module I would have to write)
- link to one or more code reviews
- an issue would link to test plans (another module I'd need to write)
- an issue would be targeted for a specific milestone

If I were to use the existing project issue module how would I add these fields? I can't imagine these kinds of changes would be accepted into the existing modules because this is functionality that most people who use the Drupal project modules (especially on Drupal.org) don't need. In theory what would you suggest?

Thanks

#1

aclight - June 29, 2009 - 13:31
Status:active» fixed

You should be able to add additional fields to the issue node type as is. There are two difficulties with doing this:

1. You can't change the value of fields from a comment.
2. Even if you could, CCK only remembers the most recent value of each field, so you wouldn't get the changes to metadata made in each comment displayed as a table in that comment, as is the case for the built in fields such as priority, assigned, etc. Furthermore, these additional fields wouldn't be included in the emails that go out to those who have subscribed to issues, and wouldn't be included in the tables of issues, though since PI for D6 uses Views to create those tables, you could always modify the default views to add them.

The Comment CCK module advertises that it would solve problem 1. To my knowledge, it does not solve problem #2, though I had heard that that might have been added. I have never used this module and so can't confirm that it solves either problem.

With regards to your needs, there are in fact issues already in the project issue queue for several of the features you'd like to have. For example,
#441004: Finite state machine (FSM) for issue status
#117381: Add start and finish dates
#135800: Milestone management

Some of the other requests sound familiar. You might look at the queue for feature requests at http://drupal.org/project/issues/project_issue?text=&status=Open&priorit...

There has been a lot of discussion about rewriting the project module to use CCK instead of maintaining its own fields. That issue is #85049: convert project* to CCK. To many people, it seems that this should be very easy to do. Yet I think that most discover that it is more difficult than it initially appears. The areas that are particularly problematic involve an upgrade path from the current project* modules (which may not affect you) and integration of the release tracking/management code including versions, cvs integration, etc. This might also not be an issue for you.

I can't imagine these kinds of changes would be accepted into the existing modules because this is functionality that most people who use the Drupal project modules (especially on Drupal.org) don't need. In theory what would you suggest?

Actually, I think you're wrong here. As I've already said, many of these requests have already been made, and a few of them have received some attention from the project* maintainers, a sure sign that there is a good chance that a well written patch would be accepted.

Depending on your time scale and desire to contribute to the code that is responsible for a large part of the functionality of drupal.org, I would recommend that you start with the current project* modules and try to make them better, and work to get your patches integrated into the official modules themselves. However if you're on a tight schedule that may not be possible, as project* development can be somewhat sporadic as the maintainers all have "real" jobs as well.

#2

System Message - July 13, 2009 - 13:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.