Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Pages: [1]   Go Down
Print
Author Topic: Bug found (Import Events)  (Read 655 times)
0 Members and 1 Guest are viewing this topic.
rwhirn
New Member
*

Karma: 0
Offline Offline

Posts: 0

Programmer


WWW
« on: April 25, 2004, 05:43:00 PM »

When you import events with multiple scheduled days they are loaded in apparently correctly. If you click on "Edit Event" they appear with the multiple dates, however they don't show up in the calendar for their second scheduled date (and I assume any additional). In looking at schedule.txt I saw the following:

13   12   1080691200   1080691200         3   31         1         
14   12   1084233600   1080691200         5   11         1         

You'll note that the end date/time of the second event is equal to the start/end time of the first event. This being prior to the start date of the second event I assume causes calendar.pl to skip displaying the event.

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #1 on: April 26, 2004, 12:33:00 PM »

** When you import events with multiple scheduled days **

Can you post an example of the data you used to do such a thing so we can see it?

Dan O.

------------------

Logged
rwhirn
New Member
*

Karma: 0
Offline Offline

Posts: 0

Programmer


WWW
« Reply #2 on: April 26, 2004, 04:31:00 PM »

Sure. The actual data for the events listed above was:

Route #6A|20040331,20040511|Bissell

------------------

Logged
DataStream Designz
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #3 on: April 14, 2005, 06:26:00 PM »

hey dan!

was wondering..

I have a file to be imported,, and it has roughly 300 multiday events. (time of events are irrelavent).

but I was looking at the import mapping, and I can see the start date for each event, but I do not see a second field for the end date...

was wondering if I need to modify my template to allow import.


joel

------------------
DataStreamDesignz

Logged

DataStreamDesignz
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #4 on: April 14, 2005, 08:24:00 PM »

** I have a file to be imported,, and it has roughly 300 multiday events. **

I'm afraid I have only attempted to upload single day events... and that was several years ago.

Maybe if rwhirn ever drops by again he can suggest how to go about it although by the looks of it, he's only acheived multiple *single* events above rather than a single event that spans several dates?

Dan O.

[This message has been edited by DanO (edited April 14, 2005).]

Logged
rwhirn
New Member
*

Karma: 0
Offline Offline

Posts: 0

Programmer


WWW
« Reply #5 on: April 15, 2005, 12:40:00 PM »

Interesting piece of code that import section. Actually my bug may be your solution. It seems that the variable "static_date_range" is not set for imports, and if it is not set to "dates" then it assumes it is a "range", which is what you want. So all we need is a way to delineate that the dates imported are a from and to range rather than multiple individual dates, (which as DanO said is what I was doing).

So I say, separate your two dates by a dash "-" and then add this mod to the "calendar_admin.pl" template:

At approx. line 1314 is the following code:

code:
# Add the event
if ($id = $db->addRecord($properties)) {
   my ($schedule);
   $schedule->{'static_start_date'} = $properties->{'schedule_datestamp'};

change that last line to the following conditional:

code:
if ($properties->{'schedule_datestamp'} =~ /$(\d{8})-(\d{8})/) {
   $schedule->{'static_start_date'} = $1;
   $schedule->{'static_end_date'} = $2;
   }
else {
   $schedule->{'static_start_date'} = $properties->{'schedule_datestamp'};
   }

Remember that dates must be 8 digits YYYYMMDD. So my imported record from above would look something like  this if it was a range:
Route #6A|20040331-20040511|Bissell

This should work. Haven't actually tested it. I can or you can. Let me know if you want me to.

[This message has been edited by rwhirn (edited April 15, 2005).]

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #6 on: April 15, 2005, 12:55:00 PM »

rwhirn, still around I guess?

Hopefully Data will let us know if your suggested mods works.

BTW. Is the bug you reported corrected in the latest 3.21 version?

Dan O.

[This message has been edited by DanO (edited April 15, 2005).]

Logged
DataStream Designz
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #7 on: May 05, 2005, 09:44:00 PM »

Sorry guys, have been away for three weeks on vacation in Europe.

Anyway... I modified the calendar_admin.pl
to make the changes you suggested.
It seemed logical enough, and the script performed fine with 0 errors.

But, none of the events seem to be displayed in any of the views.

I'm looking at the data file created, and all the records seem to have uploaded just fine...  except I cannot see the date field in that calendar file.
(I don't know if it's supposed to or not...
does this file cross reference with a schedule?)

At first I though it might be because of Field requirement violations.
( ie field length, or field dropdowns assigned)...
So I reset all fields to default and text.
but still nothing.

Could this be because of a few dummy events
that were in this calendar before my import, or should I blow outy the entire calendar data and start again???

------------------
DataStreamDesignz

[This message has been edited by DataStream Designz (edited May 06, 2005).]

Logged

DataStreamDesignz
Pages: [1]   Go Up
Print
Jump to: