Active
Project:
RSVP
Version:
6.x-2.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Nov 2010 at 12:50 UTC
Updated:
12 Apr 2011 at 22:15 UTC
When the user responds "no" to the invitation, their totalguests value should be 0 because logically if they're not attending then they shouldn't take up a seat. Right now it stays at 1, and this is then used elsewhere to build totals, e.g. the guest list.
Comments
Comment #1
firebus commentedi think this is correct behavior, or else you need to provide more specifics about how this is a bug.
when a guest responds no, they are added to the "Attend not" section of the guest list. that is to say, there is now one user not attending the event. it's useful to know how many guests have said they are not attending, and it makes sense to use totalguests for this.
it's certainly possible that there's a bug, however, where total guests for the whole event is being calculated but response is not being respected, so that non-attending guests are being counted. if you've found a bug like this, please be specific, and explain how to reproduce it.
thanks!
Comment #2
damienmckennaWhen you export the list as a CSV you should not see non-zero numbers for people who have said they are not coming. If you total up the totalguests column it should only include people who have either confirmed, haven't responded or have said "maybe" - the total should not account for people who are *not* coming.
Comment #3
firebus commentedHmm. I still think this might be by design.
Some users might want to know how many total guests, including "no"s. Some users might want only "yes" or "maybe" like you. Some users might want only "yes". I like to come up with a probability formula based on the percentage yes and percentage no to figure out the likely end value for maybe :)
Does it say in the spreadsheet what the reply is? If so, you should be able to make a formula in the spreadsheet that repects the reply column instead of just summing the whole list. Or use a filter to remove the "no"s before writing your formula.
I'll take a look at the spreadsheet (on my installation it doesn't seem to be working at all, but i've hacked some stuff so i need to check on a default install) and see if there's any way to make it clearer...
Comment #4
firebus commentedaha, export wasn't working because i needed your patch from http://drupal.org/node/961858 :)
okay, IMO this is by design and you should write an excel function to calculate or group your rows according to response. for example, you could use the subtotals function.
but i'm not going to change the category back to by design if you disagree with me :)
Comment #5
sdsheridanWell, instead of forcing the user to have to fiddle with Excel functions after a download (one of my clients is a lawyer... not going to happen!), why not have four columns for "yes", "no", "maybe", and "no response"? That way the end-user experience is easier, and they don't have to fiddle with Excel other than clicking the sigma button a few times.
Shawn
Comment #6
sdsheridanAlso, looking at the function rsvp_csv_hash_form, there seems to be a lot of unnecessary processing... or am I missing something? Creation of the header row in the CSV file seems to go through a lot of stuff (loops, function calls to strip slashes and replace double quotes with double-double quotes) when it looks like one could just output a simple sting... after all, the headers are enumerated in
$field_list = array( 'response', 'email', 'invited', 'received', 'totalguests' );. So why can't you replaceand all of
with (after the calls to
header())particularly since the field list is single words, and the whole bit of logic that builds the $header array is just creating a copy of $field_list (which is clear when you look at the function rsvp_function_load_guests and see what it returns).
I'm also wondering why there's code like
if ($print) {...when $print is set to true and never changed. Seems like a bit of a waste of memory and cycles, not to mention adding to the complexity.Does this function need a good refactoring?
Shawn
Comment #7
sdsheridanOK, here's the refactored function (with the old bits still there but commented out so you can see what I did). This seems to be working just fine and has the bonus of making it easy to see how many are in each category. I added the comment field too, as my client wanted to see that as part of the extract. Thoughts? Comments? Would be great if this was included in the next release.
Shawn