Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.6.018
    • Fix Version/s: 3.6.019
    • Component/s: Features
    • Labels:
      None

      Description

      Using TeamCal Pro Version: 3.6.018

      1) I go to Administration-> Absence Type Edit

      2) I put a name in the "create absence" box, fill out the rest of the desired fields; "Name", "Symbol", etc.

      3) Click "Create"

      And here is the result:

      TeamCal Pro Database Error
      Module: db_model.php
      Class: Db_model
      Function: db_query(), Line 125
      Error:
      Error: A problem was encountered while executing this query:
      INSERT INTO `my_tc_absences` (
      `name`,
      `symbol`,
      `icon`,
      `color`,
      b `bgcolor`,
      `bgcolor`,/b
      `bgtransparent`,
      `allowance`,
      `counts_as`,
      `show_in_remainder`,
      `show_totals`,
      `approval_required`,
      `counts_as_present`,
      `manager_only`,
      `hide_in_profile`,
      `confidential`,
      `admin_allowance`
      ) VALUES (
      'test_absence',
      'A',
      'No',
      '000000',
      'FFFFFF',
      '0',
      '1',
      '0',
      '0',
      '1',
      '1',
      '0',
      '0',
      '0',
      '0',
      '0',
      '0'
      )
      SQL Error:
      Column 'bgcolor' specified twice
      Execution halted

      It appears that "models/absence_model.php" has the wrong fields in it, there are two 'bgcolor' fields and no "factor" fields.
      I think that if I replace the second "bgcolor" field with "bgtransparent" and add a "factor" field it will work.

      Is there anything else this change might affect?

      codecodecodecodemysql> desc my_tc_absences
      -> ;
      ----------------------------------------------------------+

      Field Type Null Key Default Extra

      ----------------------------------------------------------+

      id int(11) NO PRI NULL auto_increment
      name varchar(80) NO   NULL  
      symbol char(1) NO   A  
      icon varchar(80) NO   NULL  
      color varchar(6) NO   NULL  
      bgcolor varchar(6) NO   NULL  
      bgtransparent tinyint(1) NO   0  
      factor float NO   NULL  
      allowance float NO   NULL  
      counts_as int(11) NO   NULL  
      show_in_remainder tinyint(1) NO   NULL  
      show_totals tinyint(1) NO   NULL  
      approval_required tinyint(1) NO   NULL  
      counts_as_present tinyint(1) NO   NULL  
      manager_only tinyint(1) NO   NULL  
      hide_in_profile tinyint(1) NO   NULL  
      confidential tinyint(1) NO   NULL  
      admin_allowance tinyint(4) NO   NULL  

      ----------------------------------------------------------+
      18 rows in set (0.00 sec)/code/code/code/code

        Attachments

          Activity

            People

            • Assignee:
              george George Lewe
              Reporter:
              george George Lewe
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 20m
                20m