Calendar action missing events

A place for users and developers of the Xataface to discuss and receive support.

Calendar action missing events

Postby RossC » Wed Apr 01, 2009 5:22 am

Hi there,

We've been using xataface to develop an in house time recoding solution, and have settled on treating time records as events, and presenting users with a calendar view of their time entered so far...

Everything went pretty well when we released to a small set of users last month and feedback was positive. However now that we've made it to April, everyone's records have disappeared.

On further investigation, it seems that all "event records" (time records in our speak!) show up in the calendar view fine on odd numbered months (e.g. January, March etc). On even numbered months, such as April, June etc, any event records do not show up in the calendar, despite being recorded in the database.

I've been through all the customisation that we've done (very little, actually) and cannot find anything that would interfere with the calendar's behaviour.

Any help would be much appreciated!
RossC
 
Posts: 4
Joined: Wed Apr 01, 2009 5:02 am

Postby RossC » Wed Apr 01, 2009 6:41 am

Update:

it seems the calendar widget assumes every month has 31 days, by setting date=2009-04-01..2009-04-31 in the URL (or defaulting internally if date is not specified in the URL).

If the month doesn't have 31 days, no events are displayed!

So does anyone have any idea where these numbers are set, both in the links to view previous / next months, and the internal defaults?

Help!
RossC
 
Posts: 4
Joined: Wed Apr 01, 2009 5:02 am

Postby shannah » Thu Apr 02, 2009 6:49 pm

Hi Ross,

This is a strange problem. My installs don't seem to have this problem with the length of the months. Would you be able to give me access to your app to take a look and see if there are any clues?

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Postby RossC » Tue Apr 21, 2009 2:55 am

Hi Steve,

Unfortunately not :(

<<edit>>
However I could check the legal position or package up a sanitised version for you... our database schema includes all our charge rates and invoicing information unfortunately!
<<edit>>

we're running v1.1.5 as well. for the time being I've written some code that validates the dates and rewrites them if necessary.

Does 1.1.5 include any functionality for customising the new record form? Specifically we have the following fields make up a single time record:

time category
activity
notes
hours worked
date that the hours were worked

I'd like to edit the form to duplicate the hours / date combination, so that users can create multiple records from the one form, without continually saving and re-entering the time category / activity and notes fields.

Any ideas how I could do this?

Thanks again,

Ross
RossC
 
Posts: 4
Joined: Wed Apr 01, 2009 5:02 am

Postby shannah » Tue Apr 28, 2009 12:40 pm

Code: Select all
I'd like to edit the form to duplicate the hours / date combination, so that users can create multiple records from the one form, without continually saving and re-entering the time category / activity and notes fields.


One good way to do this would be to normalize the database a bit so that you are storing the date/times in a separate table, and use a relationship. (since each activity record can have multiple dates and times associated with it).

You can then use the grid widget to be able to add/remove date/time rows within the edit form.

The grid widget definition in your fields.ini file would look something like:
Code: Select all
[hours_worked]
   transient=1
   widget:type=grid
   relationship=hours_worked
   widget:columns = "hours_worked,date"


Then in your relationships.ini file:
Code: Select all
[hours_worked]
    __sql__ = "select * from hours_worked where activity_id='$activity_id'"


Note that in this example, i'm assuming that we've made a separate table called 'hours_worked' with columns:
id (primary key auto increment)
activity_id (foreign key referencing activity record)
hours_worked
date

I've also created a relationship called 'hours_worked' (it need not be named the same thing as the table, but I did for convenience here).

I've also created a transient field called 'hourse_worked' (it need not be named the same as the relationship nor the table, but I did for convenience here), to allow you to edit the hours worked directly on the edit form for an activity record.

-STeve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 13 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved