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.
Remaining tasks
#1546092: Add a field to control if a given project node has releases
#1606656: Port the 'project_release_download_base' setting to D7 and make it per-node-type
#1609382: Port release files with extra metadata to D7
#1611960: Kill project-release-private-download.php now that D7 allows both public/private downloads
#1612050: Figure out how to represent branches for D7 project_release
#1764260: Update security_update_tid behavior for D7
includes/packager.inc
Sampler metrics
package-release-nodes.php, maybe convert to drush
project-release-create-history.php, maybe convert to drush
project-release-serve-history.php, depends on project usage
Promoting sandbox projects
Download table
Views integration
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.
Comment | File | Size | Author |
---|---|---|---|
#5 | 1551384-5.project_release_D7.patch | 99.23 KB | dww |
#3 | project_release-1551384-port_d7-3.patch | 205.56 KB | jojonaloha |
#2 | project_release-1551384-port_d7.patch | 196.37 KB | jojonaloha |
Comments
Comment #1
Senpai CreditAttribution: Senpai commentedReminding myself to circle up with Moshe on this issue in regards to data migration capabilities.
Comment #2
jojonaloha CreditAttribution: jojonaloha at Metal Toad commentedI've attached a patch of the results from a coder_upgrade port of this sub-module. I haven't tested it yet, but started work on this as it is a dependency to #1465786: Port Project Dependency to Drupal 7
Comment #3
jojonaloha CreditAttribution: jojonaloha as a volunteer commentedHere 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.
Comment #4
dwwThanks 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.
Thanks!
-Derek
Comment #5
dwwVery 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:
It's not a fair comparison, since we're not even close to feature parity yet, but I love these kinds of diffstats ;)
Comment #6
Senpai CreditAttribution: Senpai commentedTagging for sprint 3.
Comment #7
dwwRepairing some metadata from the x-post...
Comment #7.0
dwwinitial sketch of the plan for a D7 Field API deep port of project_release
Comment #7.1
dwwstarted fleshing out the subtasks
Comment #7.2
dwwadded #1611960
Comment #8
dwwNote: 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. ;)
Comment #8.0
dwwadded #1612050
Comment #9
Senpai CreditAttribution: Senpai commentedTagging for Sprint 6.
Comment #10
Senpai CreditAttribution: Senpai commentedAssigning to Drumm at the D7 Upgrade sprint #2.
Comment #11
Senpai CreditAttribution: Senpai commentedTagging for Sprint 8.
Comment #11.0
Senpai CreditAttribution: Senpai commentedadded note about the '1551384-release-deep-port' feature branch.
Comment #12
drummI committed a bunch of code getting release node save and the edit releases page working. Sorry for the large commit, they should be smaller in the future.
I noticed #1764260: Update security_update_tid behavior for D7 along the way. Quick notes other things that will need attention:
Comment #13
bdragon CreditAttribution: bdragon commentedMerged current state of the branch to 7.x-2.x.
Comment #13.0
bdragon CreditAttribution: bdragon commentedAdding #1764260
Comment #14
drummClosing out this mega-issue. Followups:
Comment #15.0
(not verified) CreditAttribution: commentedupdating todo