Omit 'Date/Time: [Untimed]:' in email notification to event owner

moshe weitzman - February 9, 2008 - 15:46
Project:Signup
Version:5.x-2.4
Component:Code
Category:bug report
Priority:minor
Assigned:dww
Status:closed
Description

That is not helpful info. I know I am seeing this because I use date.module but it would be good to omit this for now.

#1

igorik - March 26, 2008 - 07:24

+1
subscribe.

#2

duellj - July 5, 2008 - 07:29
Status:active» patch (code needs review)

The added support for cck date patch:

#86462: add backend support for cck date fields

should fix this issue, since it adds theming when the date.module is used, substituting the "[Untimed]" for the actual date/time. Can anyone verify that it fixes this issue?

#3

dww - July 28, 2008 - 05:53
Status:patch (code needs review)» active

I think Moshe's point is that if the event is untimed, we should just leave that entire line out of the email notification, which makes sense (and requires a separate patch). Setting this back to active.

#4

duellj - July 28, 2008 - 07:12
Status:active» patch (code needs review)

OK, that does make sense. So is it a simple matter of removing references to "[Untimed]" in the code? If so, the attached patch does that.

AttachmentSize
signup_untimed.patch2.42 KB

#5

dww - July 28, 2008 - 17:16
Priority:normal» minor
Status:patch (code needs review)» patch (code needs work)

No, then you end up with "Date/Time: " in the notification email. And, you'd end up with empty columns in some of the node listings for signup-enabled nodes that don't have date/time info.

A) We want to keep "[Untimed]" in many places.
B) We want to remove not just the value, but also the header ("Date/Time:") in the email notification.

So, this patch won't do. Sadly, fixing this will probably require bigger changes. That said, this is a minor thing, so I don't think it's important to spend much time on it right now. We have bigger, more useful fish to fry.

#6

dww - July 31, 2008 - 02:37
Priority:minor» normal
Assigned to:Anonymous» dww
Status:patch (code needs work)» patch (code needs review)

A little bit of a hack, but this might actually be the easiest/best way to solve this. We'll probably want an API with our date backend stuff to know if a given node/nodetype is untimed or not, which would be the cleaner approach. However, until we have that, this is the next-best thing: if the date backend says that the start time is t('[Untimed]'), we omit the line from the notification email.

AttachmentSize
219678_omit_untimed_in_notification_email.patch1.59 KB

#7

dww - July 31, 2008 - 02:43
Priority:normal» minor

Didn't mean to bump the priority... ;)

#9

dww - August 1, 2008 - 04:11
Status:patch (code needs review)» postponed

The patch in #6 is a hack. We can do better once #289326 is done.

#10

dww - August 1, 2008 - 07:52
Status:postponed» patch (code needs work)

This can now be rerolled to use signup_node_has_date() from #289326: Add event backend API for knowing if a node/node type is untimed.

#11

dww - August 1, 2008 - 21:24
Status:patch (code needs work)» fixed

Modified to use signup_node_has_date(), tested with an event and a story. Worked as expected, so I committed to HEAD.

#12

Anonymous (not verified) - August 15, 2008 - 21:48
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#13

spade - November 6, 2008 - 23:58

I just entered an event in groups.drupal.org (http://groups.drupal.org/node/16560) and think I saw what is being talked about in this thread, after I signed up for myself and received the confirmation mail.

Even though I entered a starting date and time, the variable %time yielded [Untimed] in the mail.

Additionally the variable %info was not evaluated at all. It was just treated as plain text and appeared as such in the mail.

I am not sure if I did something wrong or if this is what this bug report was all about.

I would actually like for this feature to work.

#14

dww - November 7, 2008 - 01:58

@spade: No, that's because g.d.o is using CCK date fields for the times, and there's no official 5.x-2.6 release of signup yet that supports that. See #328756: Create a signup 5.x-2.6 release

#15

spade - November 7, 2008 - 09:42

May I suggest, that the default email notification text is altered to reflect that?

 
 

Drupal is a registered trademark of Dries Buytaert.