Problem/Motivation

We need to port project_release to D7. In D6, it provides a custom content type with all sorts of hard-coded fields. In D7, we'd like to just use the core Field API as much as possible to avoid hard-coded stuff.

However, there are some "magical" features of project_release, mostly related to "branches". I.e. figuring out what the available release branches are, what the latest + recommended releases on each branch are, how to display all that for the download table on the project page, etc.

Proposed resolution

- We'll provide a default "project_release" node type on install, with some generic basic core fields (title, version string, entityref pointing to the parent project, multi-valued file field for release tarballs/zips, etc).
- I'm thinking a field_collection attached to project nodes themselves that records info about the available release branches. Similar to what lives in {project_release_supported_versions} now.
- Some magic (TBD) that uses that field collection to store the denormalized info about the latest and recommended release nodes on each release branch.
- Appropriate views integration to make the download table and other stuff possible.
...

Note that a bunch of this code now lives on the '1551384-release-deep-port' feature branch.

Original report by dww

At this point, a "deep port" of releases to core fields is low on the priority list. It Would Be Nice(tm) to do this, but it's a lot of work, and the pay-off isn't nearly as high as the deep port of issues and projects themselves. So, it's likely that the 7.x-2.x branch of Project will just have a straight-port of the D6 project_release code, complete with the evil hard-coded node type, non-field fields, etc. :( Not ideal, but pragmatic.

Here is an updated patch, which fixes some fatal errors (but definitely not all of them).

In particular I ran into this error: Fatal error: Call to undefined function project_projects_select_options() in /Users/jojonaloha/Sites/drupalorg/drupal/profiles/projectinstall/modules/project/release/includes/release_node_form.inc on line 579

Looks like it was defined in project.module, which appears to be being re-built from the ground up. I'm interested in helping with the port, but I don't want to duplicate any efforts. Any advice on how project.module is/will be handling it would be appreciated.

Thanks for your work on this so far, jojonaloha! I'm sorry I didn't reply here sooner. We had a thorough discussion on Friday about this and are going to try a "deep port" of project_release to the core field API, after all. At least, we'll try it and see if we run into major problems. If it turns into a mess once we really start implementing it, we might come back to the approach of your first few patches here. But, probably we're going to flush most of this code and start over cleanly.

I'll update the issue summary with the new proposed strategy when I have a chance (probably on Monday), but I just wanted to let you know to stop putting effort into this issue for now.

Very preliminary patch, but I wanted to post it here for backup. ;) I started working in a feature branch, but I didn't want to push that just yet, either.

Here's the local commit message I used:

Issue #1551384 by dww: Initial 'port' to D7 using core Field API.
- Removed tons of code for the D6 custom node type and fields.
- Added code to define an initial default node type with D7 fields.
- Started getting node/add/project-release to work.
- Removed the D6 DB updates and added hook_update_last_removed().
- Removed the release settings page since none of them will be needed.
- Removed code related to custom "fields" we injected into project
nodes in D6.
- Removed code for the weird "API compatibility" taxonomy vocabulary.
- Removed custom token support (since we should get that for free now).

It's not a fair comparison, since we're not even close to feature parity yet, but I love these kinds of diffstats ;)

Note: I just pushed a feature branch with some work on this effort: 1551384-release-deep-port. The release nodes themselves are mostly done. The "Remaining tasks" in the issue summary here are still valid. I was hoping to get this further along before I pushed it, but I need to leave town, and Senpai kept hounding me about this, so I went ahead and pushed. Alas that I can no longer re-write this history, but I'll survive. ;)