Results 1 to 10 of 10

Thread: Change Datatype of Fields

  1. #1
    blendo is offline Sugar Community Member
    Join Date
    Mar 2005
    Posts
    25

    Default Change Datatype of Fields

    Hi @ projoectmanagement team,

    i change the database field types of

    estimated_effort
    and
    actual_effort

    into float.
    I had to change it in the ProjectTasks/vardefs.php, too.

    Now i can type in half hours as 0.5 or 15 minutes as 0.25

    Greets blendo

  2. #2
    intersol is offline Sugar Community Member
    Join Date
    Jun 2005
    Posts
    19

    Lightbulb Re: Change Datatype of Fields

    This change itţs a MUST. It should be integrated into the CVS:

  3. #3
    kimvette is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    18

    Default Re: Change Datatype of Fields

    Quote Originally Posted by intersol
    This change itţs a MUST. It should be integrated into the CVS:
    I agree. Any reasonable company bills in quarter-hour increments.

  4. #4
    kimvette is offline Sugar Community Member
    Join Date
    Jan 2006
    Posts
    18

    Default Re: Change Datatype of Fields

    (this is 4.0.1)

    Changed: the schema for estimated and actual effort to float (5,3) for max of 99,999 hours and 999 % of and hour

    Changed: ../ProjectTask/vardefs.php (data entry validation) to validate for a 'float' rather than an 'int' for estimated and actual effort form field submissions

    Changed: ../ProjectTask/EditView.html to allow entry of 9 characters and size of 10 for the estimated and actual effort input controls

    We allowed for nine digits - five to the left of the decimal and four to the right, because very large software projects may require tens of thousands of hours (with sub-tasks obviously taking less). Not allowing fractions of an hour is bad so you would obviously want to allow at least tenths and hundredths of an hour to enter .25. .50, etc. and likewise some companies may bill in five-minute or ten-minute increments depending on the nature of the business. Two additional decimal places (total of four): because they're there; no harm in allowing them.

    Change:

    vardefs.php:
    line 191 and
    line 197 from 'int' to 'float'

    Change:

    EditView.html:
    line 163 and
    line 188
    attributes changed from size="5" maxlength="4"
    size="10" maxlength="9"

    Change:
    Database Table: project_task
    columns: `estimated_effort` and `actual_effort`
    data type: from `int` to `float(5,3)`

  5. #5
    ryansa is offline Sugar Community Member
    Join Date
    Oct 2006
    Posts
    15

    Default Re: Change Datatype of Fields

    good job. i like the way.

  6. #6
    cywolf's Avatar
    cywolf is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    Toronto, Canada
    Posts
    223

    Default Re: Change Datatype of Fields

    ryansa: Please stop posting these inane responses. You should only post when you have something useful to add.
    Andrew Whitehead
    The Long Reach Corporation
    http://infoathand.com

  7. #7
    neusagudo is offline Sugar Community Member
    Join Date
    Jun 2006
    Posts
    13

    Default Re: Change Datatype of Fields

    In our case, a MUST would be to be able to see project tasks and tasks in calendar. We are coordinating many trainers for technical courses (every course is a project) . Every project task is a session, and we need to know the calendars out teachers are doing.

    Right now it cannot be done, but just making the project tasks visible from calendar view would solve that and would be wonderful for keeping track of your trainers avaiability!!!

    Neus Agudo
    neus.agudo@apif.info

  8. #8
    Generic is offline Junior Member
    Join Date
    Aug 2007
    Posts
    1

    Question Re: Change Datatype of Fields

    Hello,

    I'm using SugarCRM OpenSource v. Version 4.5.0g (Build 1234) at the moment but I would like to update to the most current version.

    I followed the instructions in this thread and my users work with the decimal amounts. So I'm wondering what happens to my customized installation if I apply the patch? Do I have to re-apply changes in the files or does the installer check if they were changed? I checked the database update script and at least those 2 customized fields seem not to be changed.

    I would be happy if anybody of you with such an customized installation would share his experience with updating SugarCRM, esp. if the installation could break...

    Thank you kindly,
    Generic
    Last edited by Generic; 2007-08-25 at 10:14 PM. Reason: spelling

  9. #9
    dotcomguy is offline Junior Member
    Join Date
    Aug 2007
    Posts
    1

    Default Re: Change Datatype of Fields

    Quote Originally Posted by kimvette
    (this is 4.0.1)
    Change:

    vardefs.php:
    line 191 and
    line 197 from 'int' to 'float'

    Change:

    EditView.html:
    line 163 and
    line 188
    attributes changed from size="5" maxlength="4"
    size="10" maxlength="9"

    Change:
    Database Table: project_task
    columns: `estimated_effort` and `actual_effort`
    data type: from `int` to `float(5,3)`
    Thanks for posting this. The patch works great!

  10. #10
    hamedu139 is offline Junior Member
    Join Date
    May 2008
    Posts
    2

    Default Re: Change Datatype of Fields

    please help me in update sugarCRM OpenSource v. Version 4.5.0g (Build 1234)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •