Ability to define own categories

denney - February 3, 2007 - 07:08
Project:Project issue tracking
Version:5.x-2.x-dev
Component:Issues
Category:feature request
Priority:normal
Assigned:Unassigned
Status:postponed
Description

I would to have the ability to define my own project categories. I want to add to the list of available categories.

I have tried hacking issue.inc to add my category (called "update") but adding it the the project_issue_category() function only makes it available to select.

It doesn't show on any comments (if you change category for example) or when you search for issues based on category.

#1

SeaBass - June 6, 2007 - 03:07

Same here, I would love to add and change the values of the selectable categories on project by project base. same as the statuses or the components.

#2

sickhippie - September 6, 2007 - 02:44
Version:5.x-0.1-beta» 5.x-2.x-dev

I would like to see this as well. The current category list, while good, is nowhere near complete enough for my needs. We need a custom list of categories, at least 10. We can make do with this for the moment, but I am bumping this up to 5.x-1.x-dev so it can be considered in the current project version.

#3

dww - September 6, 2007 - 03:20

Yes, this would be nice. However, it's lower priority for me than many other things, in particular:

http://drupal.org/node/18920 -- issue followups as real comments
http://drupal.org/node/76725 and http://drupal.org/node/76726 -- refactoring to using views
porting to D6 core
...

So, if this is going to happen anytime soon, someone else will have to supply the code.

Thanks,
-Derek

#4

sickhippie - September 6, 2007 - 03:45

DWW, I see what you mean about the followups as comments. It seems to be a pretty serious issue, and when resolved, will fix a number of assorted issues.

As far as this issue here goes, for my current needs, I have simply replaced lines 1108-1113 with this code here:

    $categories = array('html-css' => t('html-css'), 'graphics' => t('graphics'), 'server' => t('server'), 'scoping' => t('scoping'), 'flash' => t('flash'));
  }
  else {
    $categories = array('html-css' => t('html-css'), 'graphics' => t('graphics'), 'server' => t('server'), 'scoping' => t('scoping'), 'flash' => t('flash'));
  }

then to fix the front page of the projects to compensate for the new types, I have replaced from line 346-358 with this code here:

    if ($view_issues) {
      $links[] = l(t('View all issues'), 'project/issues/'. $node->uri);
  $links[] = l(t('View all HTML-CSS issues'), 'project/issues/'. $node->uri, null, 'categories=html-css&states=all', null);
      $links[] = l(t('View all Graphics issues'), 'project/issues/'. $node->uri, null, 'categories=graphics&states=all', null);
  $links[] = l(t('View all Server issues'), 'project/issues/'. $node->uri, null, 'categories=server&states=all', null);
      $links[] = l(t('View all Scoping issues'), 'project/issues/'. $node->uri, null, 'categories=scoping&states=all', null);
      $links[] = l(t('View all Flash issues'), 'project/issues/'. $node->uri, null, 'categories=flash&states=all', null);
    }
    if ($make_issues) {
      $links[] = l(t('Add new HTML-CSS issue'), 'node/add/project_issue/'. $node->uri .'/html-css');
      $links[] = l(t('Add new Graphics issue'), 'node/add/project_issue/'. $node->uri .'/graphics');
      $links[] = l(t('Add new Server issue'), 'node/add/project_issue/'. $node->uri .'/server');
      $links[] = l(t('Add new Scoping issue'), 'node/add/project_issue/'. $node->uri .'/scoping');
      $links[] = l(t('Add new Flash issue'), 'node/add/project_issue/'. $node->uri .'/flash');
    }

Perhaps this can help someone else out. I'm still learning how to write modules that don't break Drupal, so until then, this hack will have to suffice.

#5

dww - September 6, 2007 - 16:29

I'm still in favor of making these customizable, but in your case, those look more like "Component" (which you can customize, per project, in fact), not "Category". Of course, all of this is somewhat arbitrary, but each of those things you've got there "html", "graphics", etc, are aspects of something that you might have bug reports against, features to request, tasks to perform, etc...

#6

stax - March 17, 2008 - 14:44

I'm looking forward for this improvement as well.

#7

aclight - March 21, 2008 - 14:27
Status:active» postponed

I'm marking this issue as postponed because I don't think this is a priority right now.

Also, once #76725: Refactor project issue module to use Views is completed, I believe that is should be possible to use the Comment Alter Taxonomy module (which isn't quite finished but is close) along with a small (custom?) module that added some glue code that implemented a few hooks. Alternately, this could potentially be done using CCK to handle the category field. I'm not sure whether either of these options would allow for upgrading of existing issues, however.

 
 

Drupal is a registered trademark of Dries Buytaert.