Menu

#158 Date format - Form for activity entry

open
5
2005-06-30
2005-06-30
saidmsl
No

Hi,
It should be interesting to have all date in
international format.
ie : for french : dd/mm/yyyy

For activity :
a form to create directly a new activity.
The user will then search via a new window :
- the company,
- the contact,
- the opportunity/case

Separation of date and time.
default duration of an activity (begin, end)
Thanks

Discussion

  • Brian Peterson

    Brian Peterson - 2005-06-30

    Logged In: YES
    user_id=204919

    First, on dates:

    You may enter dates in whatever format you wish in the user
    interface. We use the PHP strtotime function to convert it
    to a database date. For display, the development team has
    decided that database dates are fine, as the work involved
    to allow a different date format would be quite significant.

    Next, on your consolidated new activity form:

    This is a good idea. Others have also asked for similar
    functionality. We would gladly welcome code to do this. If
    you would like to work on it, please let us know.

    Finally, on separation of date and time:

    You can already set different start and end dates/times for
    activities. The calendar widget that we use allows both to
    be set, and I think it works quite well. Perhaps I don't
    understand specifically what you are looking for?

    Regards,

    - Brian

     
  • Brian Peterson

    Brian Peterson - 2005-06-30
    • assigned_to: cdwtech --> vanmer
     
  • saidmsl

    saidmsl - 2005-07-01

    Logged In: YES
    user_id=1265952

    Hi,
    Sorry had a bad connection yesterday.
    Ok for the date format. It means that i can enter my dates
    like :
    01/07/2005 08:45

    For the form, i can developp it but you'll have to look at
    it after.
    just for testing. and validation.

    When you enter a new activity, the begin and the end dates
    are the same.
    when using it with the calendar, and for managing meetings,
    .... it should be better that the end date is calculated
    automatically with a predefined period.
    ex :
    meeting begins at 09:00
    and ends at 09:30.
    so the default duration for meeting is 30min.
    Perhaps by adding a duration field in the activity type table?

    i forget to add this request :
    in calendar view, (iconic), we should be able to distinct
    each user.
    by using a different color for each user. ( the limit is the
    number of color) .

     
  • Brian Peterson

    Brian Peterson - 2005-07-01

    Logged In: YES
    user_id=204919

    We're going to be changing the 'New Activity' widgets that
    appear on most pages to set the scheduled end time rather
    than the start time, as I too believe that activities that
    start and end at the same time are not very useful.

    I believe that our use of the strtotime function will allow
    you to enter the date the way that you have shown it without
    causing problems (you may need AM/PM notation, I haven't
    checked)

    strtotime also allows notation like 'next week' or 'next
    month' or '+30 minutes' (in English only, sorry, that's a
    limitation of the strtotime function)
    see:
    http://php.net/strtotime

    We've talked about adding a 'duration' field to the form
    that would take a strtotime duration string. I think that a
    separate duration field probably doesn't really help, which
    is why we've never done anything about it in the past.

    We've also talked about parsing the Scheduled end field as a
    strtotime duration if it looks like that's the right answer.

    For example:

    Scheduled Start: 01/07/2005 08:45
    Scheduled End: 30 minutes

    If we parse the scheduled end and get a date that is before
    the scheduled start, we could easily reprocess it as
    strtotime($scheduled_end, strtotime($scheduled_start))
    This seems like it would be a good addition to the form in
    any event, and I'll probably make that change soon.

    I think it would make sense to have a system parameter and a
    user preference that set the default duration of an
    activity. I believe that this is what you are suggesting.
    Many calendar/task management applications provide this
    functionality. I think that a default duration as a user
    preference would be easily localized/i18n so that we could
    take advantage of strtotime's ability to calculate, but
    display the preference in a translated language string. I
    would be very interested in contributed code to add such a
    user preference or system parameter. If you are interested
    in working on this, take a look at how user preferences are
    defined.

    I believe that the calendar widget also has some control
    over how dates are displayed. We could investigate making
    this display format a user preference or system parameter as
    well. Then, users in other countries could see a more
    familiar date format by default. This is also an area that
    you may wish to investigate.

    Regards,

    - Brian

     
  • saidmsl

    saidmsl - 2005-07-08

    Logged In: YES
    user_id=1265952

    Hi,
    It is more interesting using the duration field rather than
    the end time.
    Users are always lazy and don't want to type a lot.
    There is a pear package on pear.php.net that can do all
    calendar calculations. date
    http://pear.php.net/package/Date

    Why not using it?
    I had tested the french format but it doesn't work.
    entering a date like 05/07/2005 09:00:00 is resulting in a
    incoherent date (1970). Users must follow the format
    yyyy-mm-dd whereas the calendar widget allows to enter in
    different formats.
    There will be, i think, the need to use some locales or the
    setlocale function.
    It's great that you are moving all activities related data
    to a single file.

    The activity type can be used to define a default duration
    for each activity type.
    the user can, when he enters the data, change the value but
    the form will be filled with the default one.
    ex :
    a meeting can have a duration of 1hour
    a call => 30mins
    a demonstration/presentation => 2hours
    This concept is more precised than the system parameter.
    This system param defines only a default duration for all
    activities types.

    for the display, as the language is already defined in the
    user preference, why not using it to set up the format for
    all dates in the system?
    for english => mm/dd/yyyy
    for french => dd/mm/yyyy
    .......

    I think using the date package will be more flexible than using
    the strtotime, date functions.

     

Log in to post a comment.

MongoDB Logo MongoDB