So this patch includes all the extra views integration work we did.

It provides fields for the two extra timestamps we added, as in issue 547990
http://drupal.org/node/547990

It also 'fixes' the rsvp total invites field, seemed to be providing the wrong data before, now provides the total number of invitees rather than the total number of rsvp objects.

It provides a relationship for the rsvp invitation hash, so you can now use an argument from the invitation url, and use that to filter to the particular rsvp object. So for example you can now show a views block of who else is coming on the invitation page.

We also added a few fields which contain links to the other rsvp pages, and invitee message/remove links.

There is also a field which gives a stripped down version of the user email address, so you can give some information about who else is attending without exposing full email addresses.

CommentFileSizeAuthor
rsvp-extra-views-integration.patch13.9 KBmuhleder

Comments

ulf1’s picture

Hello Muhleder,

I was in the process of merging your changes from rsvp-extra-views-integration.patch into the codebase but found some things with this patch I like you to clarify, or better send another patch.

In the update routines you update time_respond to the same value like attribute timestamp which means both fields hold the same value. Is this correct? and if so why did you then not use field timestamp instead and what is the purpose of time_respond?

+  db_query('UPDATE {rsvp_invite} SET response = \'%s\', comment = \'%s\', timestamp = %d, time_respond = %d,invited = 1, received = 1, totalguests = %d WHERE hash = \'%s\'', $form_state['values']['reply_invite_reply'], $form_state['values']['reply'], time(), time(), $form_state['values']['reply_totalguests'], $form_state['values']['reply_hash']);

Then I see that you added field time_send but I can see no code where this is being utilized and/or set.

I would appreciate if you could review the patch and send me an updated version with all your intended changes.

Thanks,
Ulf

muhleder’s picture

Hi Ulf,

very quickly off the top of my head,

time_respond is supposed to hold the last time that the invitee responded to the invitation.
time_send is supposed to be when the invitation was sent.

My memory is a bit fuzzy on this point, but when I reviewed the existing code, the timestamp field was being used as the data source for both of those, but was being updated whenever the invitation was updated to in any way. So it seemed correct to set time_respond and time_send to timestamp to begin with since that was what the module was displaying in its existing state.

I do see that I haven't added the correct description for db_add_field($ret, 'rsvp_invite', 'time_respond', array) in the schema update.

If time_send isn't being used anywhere it's probably because our application didn't need the data so I didn't get around to providing a views field handler for it. I'll see if I can find a bit of time to add a field handler for it for the sake of completeness.

Thanks,

Mark