Almost never will a project have only one component. It would be great if the form defaulted to showing 3-4 component fields, already filled in with system-wide defaults.

This is a "normal" feature; meaning, if there's an easy way to support this with standard tools and not much customization, let's go for it.

Level Of Effort

1 day of effort is needed to complete this issue.

Comments

dww’s picture

Title: Default to showing more than one component (with defaults)? » Port support for site-wide default components
Issue tags: +project, +drupal.org D7

In D6 we have a global project_issue setting for default components for new projects. This settings form has even been ported to D7 thanks to #1545426: Project issue settings page port. However, the setting doesn't do anything. We should use it to pre-populate default components when you create new projects.

dww’s picture

Oh duh. ;) this is just a core multi-valued text field. Core supports default values on fields. So, we should:

A) define default values for this field on the default project type we ship

B) rip out this setting entirely

C) document this change in the forthcoming upgrade guide. ;)

mikey_p’s picture

Assigned: Unassigned » mikey_p
senpai’s picture

Issue tags: +sprint 1

.

senpai’s picture

Issue summary: View changes

Adding a level of effort section to the summary.

mikey_p’s picture

I'm also planning ripping this setting out of project_issue, although to be honest it feels odd that the field is defined in project module, but only used by project_issue.

For now I'm going ahead and committing the attached patches. Does anyone think we should move the creation of this field to project_issue itself?

dww’s picture

I'm not sure how it'd work for project_issue to inject this field into the default/example project node type from project.module. Can you elaborate?

Otherwise, these commits look great. (Although you're living dangerously with # as the first character in your commit message you actually pushed to Git). ;)

Thanks!
-Derek

mikey_p’s picture

Doh, I've totally forgotten about the commit message thing, although considering it's pushed to d.o and we don't allow rewriting history I dont' suppose it makes much difference.

In term of injecting the field, it would be handled the same way that the current field_project_has_issue_queue is injected into project nodes in project_issue_install(): http://drupalcode.org/project/project_issue.git/blob/refs/heads/7.x-2.x:...

dww’s picture

Status: Fixed » Needs work

Oh, okay. I see what you mean. Sure, that'd be a good idea. The only reason to have a components field on project nodes is if you're using them for a component field on your issues...

Fire at will. ;)

Thanks,
-Derek

mikey_p’s picture

Status: Needs work » Needs review
StatusFileSize
new2.25 KB

Opened up #1571378: Add field for project components to project nodes upon installation for the project_issue component of this patch.

The attached patch just removes everything regarding components form project, along with better use of t through get_t() in the install files.

Just going to wait on the test bot to test before committing.

mikey_p’s picture

Status: Needs review » Fixed
dww’s picture

Looks great, thanks!

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

Anonymous’s picture

Issue summary: View changes

Change an h2 to h3.