CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Custom Data - Community Garden - Members Lease Plots
Pages: [1]

Author Topic: Custom Data - Community Garden - Members Lease Plots  (Read 1254 times)

Rick Cunningham

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 3
    • Landings Men's Golf Association
  • CiviCRM version: 4.5.7
  • CMS version: Drupal 7.34
Custom Data - Community Garden - Members Lease Plots
January 05, 2012, 02:04:41 pm
We've got a large community garden with 220 plots - we've decided to go to a rolling membership year - we lease the plots for $100 or $250 and permit members to lease one or two. I can't figure out a sensible place in the database to keep info on plots themselves - rental price, who rented it and when, etc. I want to be able to see which plots are leased and which are available or coming available. Seems to me that a person's membership could extend to include one or two plots, and the membership period would coincide with the plot lease period.

Another idea that occurs is to set up a new entity that is a plot(individuals, organizations, households, and plots). Then I could have relationships between an individual and a plot and the relationship could have a start/stop time. None of these seems quite right to me. Has anyone done something like this before, or have a notion of what would be a good data schema?

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Custom Data - Community Garden - Members Lease Plots
January 05, 2012, 09:04:29 pm
Rick - I'm not aware of someone doing something "like this" - but have a few thoughts:

* Using the CiviMember membership model (you'd have two membership types - one for the $100 lease and one for the $250 lease) - gives you nice built-in functionality for managing the rolling lease periods. This would include potentially sending renewal reminders, searching by status (new, current, grace, expired) etc.

* You can extend membership with an Alphanumeric Select custom field for the Plot #. I would consider using the the customFieldOptions hook to populate the values of the select (drop-down) during create / edit membership. This way the options could be filtered by a function which only exposes Plots (options) which aren't currently leased. The list of options could be created manually or inserted programmatically. If you want to get fancier, you could even store the plots in a separate DB table you've created which could cache the is_leased status (not sure this is worth it - since the hook could invoke a query to check for plots (option_value rows) which aren't linked to current memberships.

* I would do a proof of concept w/ this by setting up a few plots in a custom membership field - and verify that you can do the searching and reporting you need to manage things.

Of course other folks may have even better ideas :-)
Protect your investment in CiviCRM by  becoming a Member!

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Custom Data - Community Garden - Members Lease Plots
January 06, 2012, 04:16:38 am
I would concur with Dave's approach.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Rick Cunningham

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 3
    • Landings Men's Golf Association
  • CiviCRM version: 4.5.7
  • CMS version: Drupal 7.34
Re: Custom Data - Community Garden - Members Lease Plots
January 06, 2012, 05:06:29 am
Thanks Dave, and Hi There Hershel!

That sounds like a workable plan - Now for a very newbie question, what's the best way (in the sense of best practices) to let the membership coordinator have access to setting this field (or any field) and letting the member only see the info. Since we have various levels of commitment to organic practices, we want to keep the truly organic folks as far as possible from the "I never met a pesticide I didn't like" folks, and having the ability to assign plots is useful.

Also, since I have your ear, do you have any idea of a way to automatically generate a graphic that shows the status of these plots? There might be a number of variables, including leased/not leased, pure organic, needs tending, abandoned, etc.

I keep thinking of a mashup in google maps using the lat/lon of each 10'x20' plot but google maps doesn't zoom quite as much as I'd like. We currently use a spreadsheet with cells that are laid out to approximate the grid of the plot layouts, and use color and text to convey data.


Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Custom Data - Community Garden - Members Lease Plots
January 06, 2012, 06:29:13 am
Hi Rick. Nice to see you on the forums. :)

I'm not 100% certain about the first question, but the second one I think you would best do by custom coding a small module in Drupal to display this data. That module could generate a graph or a table (perhaps even using one of Drupal's graphing API modules) in real time based on your data.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Custom Data - Community Garden - Members Lease Plots
January 07, 2012, 03:38:38 pm
Quote from: Rick Cunningham on January 06, 2012, 05:06:29 am
That sounds like a workable plan - Now for a very newbie question, what's the best way (in the sense of best practices) to let the membership coordinator have access to setting this field (or any field) and letting the member only see the info. Since we have various levels of commitment to organic practices, we want to keep the truly organic folks as far as possible from the "I never met a pesticide I didn't like" folks, and having the ability to assign plots is useful.

The custom field for assigning plots does NOT need to be included in self-service membership signup and renewal pages. The plots can be assigned subsequent to membership signup by your coordinator. You can make sure that person is cc'd on the online membership signups - and then they can jump in and edit the membership record to assign an available plot.

I'd recommend spending some time reviewing the online user / admin guide to get a clearer idea of some of these interfaces (link above).
Protect your investment in CiviCRM by  becoming a Member!

Rick Cunningham

  • I post occasionally
  • **
  • Posts: 49
  • Karma: 3
    • Landings Men's Golf Association
  • CiviCRM version: 4.5.7
  • CMS version: Drupal 7.34
Re: Custom Data - Community Garden - Members Lease Plots
April 11, 2012, 10:02:43 am
A final follow up on how I'm doing all this. I'm not sure it's optimal, but it's working for us.

Since we're not using households, I decideded to make each of our 250 plots into a "household" and then created the relationship "Is Leased By" with the reciprocal "Has A Lease On" between an individual and a "household" (plot). I gave each of the plots a bogus address and then overrode that address with an actual lat/lon for the plot, and gave them names like "Plot H-03" with a nickname of "H-03"

With these 250 new "household" (plot) entities, I then created a few more fictitious individual contacts with names like "PlotIs Vacant", and "AssignedTo Compost". Finally I created an Is Leased By relationship between each plot and the individual contact who has a lease on that plot. When a lease is relenquished, the relationship is terminated by changing the end date to today's date, and a new relationship is created between the plot and the contact named "PlotIs Vacant". So I can now search for all households and will get a plot report showing leases, and of course a relationship report shows the status as well. I can also search for all "households" with vacant in the name and then use google earth to plot the results, showing the physical location of all the unleased plots (which are really leased to "PlotIs Vacant").

Probably not the most elegant possible solution, and indeed it's a bit like double entry bookkeeping to have to terminate one lease and start a new one when a plot changes hands. But it provides all the functionality we wanted completely within the "out of the box" capabilities of CiviCRM. 

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Custom Data - Community Garden - Members Lease Plots

This forum was archived on 2017-11-26.