Closed (won't fix)
Project:
Trip Fund
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
3 Mar 2012 at 19:16 UTC
Updated:
18 Mar 2016 at 19:51 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
micahw156Initial configurations for content types are attached.
Comment #2
micahw156Moving this project to Drupal 7 (6cc4306b033d) so we'll be using entities for a lot of things now. It should be easier to manage trips and fundraisers as entities where the mandatory fields can be managed in code, so I need to rethink most of my data structures.
Comment #3
micahw156Now that we're working in Drupal 7, we'll create entity types to manage the tables we need. By making the entity types fieldable, we'll be able to maintain our required fields while still allowing site owners to add any arbitrary fields they want.
For starters, we still need the two tables defined in #1418410: Database schema planning for Trip Fund, trip_fund_participants and trip_fund_contributions. It appears that the schema definitions for these can remain mostly the same, although I'm going to add a unique assignment_id key for trip_fund_participants. We'll also add a trip_fund_trips entity type that requires at least a trip_id and a trip_cost field to replace the CCK trip content type above.
I'm not sure yet whether we'll want to enforce a fundraiser entity type, or create a setting to specify which content types can be specified as fundraisers for the listings. Maybe that should even be a user-defined entity field and make fundraiser associations totally optional. Let's just get these first three entity types created and working, then worry about fundraisers. It seems like trips, trip-to-participant relationships and contributions are the only mandatory parts here.
Also, I'm thinking about making entities for participants, similar to what happens in the Party module (or making that module a dependency.) That way, participants can be Drupal users, but the won't have to be. Again, let's get the fundamentals working first on this, then worry about getting fancy if time permits.
Comment #4
micahw156Created database schema for trip_fund_trips, trip_fund_participants and trip_fund_contributions entities. (41905fe)
Comment #5
micahw156Added sub-module to manage trip_fund_trips entity type and ability to create new records using it (cd3ef94).
Comment #6
micahw156Switched to using Entity API and added Views support. (504b355)
Comment #7
micahw156Added ability to create and display trip_fund_participants entities. (f489974)
Comment #8
micahw156Added ability to create and display trip_fund_contributions entities. (aed38cf)
Comment #9
micahw156Next task:
I need to add fields to trip_fund_contributions entity for uid and trip_id. These can be derived from the stored trip_fund_participants id, but that has to happen every time, and makes database queries really clunky. It would be better to just set and carry these values. The small amount of database space required for two integer fields is irrelevant compared to the overall benefits of this change.
I think for best handling, I'll drag these around as read-only attributes during the editing process, and then derive and store them by lookup from trip_fund_participants in
trip_fund_contributions_save()trip_fund_contributions_form_submit().Comment #10
micahw156Added new uid and trip_id fields to trip_fund_contributions entity. (7f1629e)
Comment #11
micahw156Implemented trip_fund_contributions uid and trip_id fields, made general code improvements in all modules, and cleaned up bugs. (fb027bf)
Comment #12
micahw156Next steps for workable alpha:
Configure proper view permissions for trip assignments and contributions.- doneComment #13
micahw156Improved permissions handling for all entity types. (449762a)
Comment #14
micahw156Added totals and balances to user contribution displays. (f366adb)
Comment #15
micahw156This module has been abandoned.