Customization of Release Format

cmundi - April 17, 2009 - 18:02
Project:Project
Version:6.x-1.x-dev
Component:Releases
Category:support request
Priority:normal
Assigned:dww
Status:active
Description

Hi. We version our product like this:

{ProductName} {Major} V{Minor}R{Point} [special]

Examples:
GruntMaster 2009 V2R1
GruntMaster 2009 V2R1 SP0

So we have all the tags, but we need to add spaces and other (ASCII only) characters to the format string. We could hack the module, but it seems like a lot of folks would want this. Is there any thought of doing this? We don't want to get out of sync with the development of the module.

Thanks,
Carlos

#1

dww - April 18, 2009 - 02:38
Category:feature request» support request
Assigned to:Anonymous» dww
Status:active» fixed

There's a setting for this. You can control the site-wide default, or you can customize per project. Site wide:

admin/project/project-release-settings

"Default version format string:"

per-project, it's under "Advanced settings" on the "Releases" subtab when you edit a project node.

Spaces seems problematic, for example, when generating packages for your releases -- filenames with spaces in them can be something of a bother. Other ASCII characters (alphanumeric, _ and -) are all supported, along with all the tokens for the various version-specific fields.

#2

cmundi - April 18, 2009 - 15:41

I'm an idiot. I know stuff can be hard to find in Drupal (by design, not your fault!) so I should have looked harder.

And I can use underscore instead of spaces for now.

Thank you.

#3

cmundi - April 18, 2009 - 15:59

I apologize. That's exactly what I tried, and it does not work for me.

Wait! The error I actually get is this:

Project overview must be one of the API compatibility terms. (approximnate message)

So I figured ok I will add a term to the api compatibility vocab. I added WindowsXP (one word) for fun.

When I reload admin/project/project-release-settings I get the following error immediately:

warning: Invalid argument supplied for foreach() in C:\wamp\www\SWD\includes\form.inc on line 1197.

So I think my "problem" has nothing to do with the release format string and instead is an error related to my installation.

I am running WAMPServer (latest release) with PHP5.2.9-2 -- I will try this on my Ubuntu box and see if I have better luck!

#4

cmundi - April 18, 2009 - 16:42

Very strange.

I set up a fresh site on an ubuntu box. I got exactly the same errors.

But then when I set up a category, I saw this on the release management page:

Active Project release API compatibility terms:
(unchecked) WinXP

Terms from the Project release API compatibility vocabulary that should be visibile to end users and project maintainers.
Browse projects by release versions
Checking this box will cause the project browsing page to have a version select.
Default release overview: *
(selected)all
(unselected)WinXP

So I checked the WInXP box and reloaded the page. Error gone.
So then I *un* checked the WinXP box again and reloaded the page again. Error still gone.

Now I see that I can edit the release format string and not get an error. Very unusual.

I'm running drupal 6.10 on both Ubuntu and WinXP.
Ubuntu is running LAMP with PHP5.2.6-2ubuntu4.1
WinXP is running WAMPServer 2.0 with PHP5.2.9-2
Both are Apache 2.2.x and MySQL 5.1.x

Thanks for your help. I'll let you know if I figure out what's going on.

#5

cmundi - April 18, 2009 - 16:46

Sure enough. I went back to the site hosted on WAMP. After checking an option for Active Project release API compatibility terms and reloading the page, all is good. I can even unselect all Active Project release API compatibility terms and it's still ok.

So it seems that two things are required:

1. At least one API Compatibilty term must be defined.
2. At least one API Compatibility term must be selected (bit can be deselected later) in the Project Release Settings.

It would be nice if this could be caught so that the module could throw a helpful message.

Thanks again!
Carlos

#6

cmundi - April 18, 2009 - 16:47
Status:fixed» active

Oh, I guess I need to reopen this issue if I'm suggesting a fix...

 
 

Drupal is a registered trademark of Dries Buytaert.