#133 activites_widget.php update

closed
5
2007-10-17
2007-06-02
No

* - added scheduled start date field to "GetNewActivityWidget" Lines 721 & 731-732 & 743-750 - in case someone wants to put the time window when adding without having to edit the record after adding it.

* - added H:i:s to "GetActivitiesWidget" line 177-178 to one can see the time for the event without opening the record.

Discussion

  • Randy Martinsen

    Randy Martinsen - 2007-06-06
    • assigned_to: nobody --> braverock
     
  • Randy Martinsen

    Randy Martinsen - 2007-06-06

    Logged In: YES
    user_id=1640978
    Originator: YES

    I have discovered that the ends_at field is not transferring to the activity (/activities/new_2.php) properly but I'm stumped as to why- the code appears to be correct to me. Any suggestions would be helpful.

    Thanks!
    Randy

     
  • Randy Martinsen

    Randy Martinsen - 2007-06-07

    Logged In: YES
    user_id=1640978
    Originator: YES

    My last comment was premature because I have discovered that it is an intermittent problem. I will go into activities/new2.php and see what it's doing with the data that makes the stickyness intermittent.

     
  • Randy Martinsen

    Randy Martinsen - 2007-06-15

    Logged In: YES
    user_id=1640978
    Originator: YES

    Found the answer: The problem is NOT in the widget or the new-2.php - it is in /activities/one.php

    This code causes an open activity that has an ends_at field less than current time to remove it. This doesn't work for entering past activities, which "in real life" happens every day. I commented OUT lines 83-95:

    //check for uncompleted activity with equal start and end times
    if (!strlen($completed_at)) {
    //check if ends_at is in the past
    if (strtotime($ends_at)<time()) {
    //check if start and end time are equal
    if ($ends_at=$scheduled_at) {
    //clear $ends_at
    $ends_at='';
    // hopefully the user will pick an ends_at time in the UI
    // otherwise, activities/edit-2.php will set the ends_at to the current time
    }
    }
    } // end time rationalization on uncompleted activities

     
  • Brian Peterson

    Brian Peterson - 2007-06-17

    Logged In: YES
    user_id=204919
    Originator: NO

    Randy,

    A 'completed' activity can have an ends_at time in the past. A new uncompleted activity could, in theory, simply be overdue.. but that doesn't seem to make a lot of sense. Perhaps I just don't understand what you're trying to do.

    ??

    Thanks for contributing...

    - Brian

     
  • Randy Martinsen

    Randy Martinsen - 2007-07-08

    Logged In: YES
    user_id=1640978
    Originator: YES

    Brian,
    What I needed was to be able to add past activities. The original code kept automatically setting the end date/time to NOW when the activity was closed rather than allowing me to force the end date/time. That's why it needed to be changed.

    Randy

     
  • Randy Martinsen

    Randy Martinsen - 2007-10-17
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks