object ApiDatabase: TApiDatabase
  OnCreate = DataModuleCreate
  Height = 475
  Width = 996
  object ucETaskApi: TUniConnection
    AutoCommit = False
    ProviderName = 'MySQL'
    Database = 'eTask'
    LoginPrompt = False
    Left = 267
    Top = 395
    EncryptedPassword = '9AFF92FF8CFF86FF8CFFCFFFCEFF'
  end
  object MySQLUniProvider1: TMySQLUniProvider
    Left = 416
    Top = 398
  end
  object uqUsers: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'SELECT USER_ID, NAME, STATUS from users ORDER BY NAME')
    OnCalcFields = uqUsersCalcFields
    Left = 538
    Top = 24
    object uqUsersUSER_ID: TIntegerField
      FieldName = 'USER_ID'
      Required = True
    end
    object uqUsersNAME: TStringField
      FieldName = 'NAME'
      Size = 40
    end
    object uqUsersSTATUS: TStringField
      FieldName = 'STATUS'
      Size = 7
    end
    object uqUsersREPRESENTATIVE: TStringField
      FieldKind = fkCalculated
      FieldName = 'REPRESENTATIVE'
      Calculated = True
    end
  end
  object uqSaveTaskRow: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'UPDATE task_items'
      'SET'
      '  APPLICATION   = :APPLICATION,'
      '  APP_VERSION   = :APP_VERSION,'
      '  TASK_DATE     = :TASK_DATE,'
      '  REPORTED_BY   = :REPORTED_BY,'
      '  ASSIGNED_TO   = :ASSIGNED_TO,'
      '  STATUS        = :STATUS,'
      '  STATUS_DATE   = :STATUS_DATE,'
      '  FIXED_VERSION = :FIXED_VERSION,'
      '  FORM_SECTION  = :FORM_SECTION,'
      '  ISSUE         = :ISSUE,'
      '  NOTES         = :NOTES'
      'WHERE TASK_ITEM_ID = :TASK_ITEM_ID')
    Left = 538
    Top = 232
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'APPLICATION'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'APP_VERSION'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_DATE'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'REPORTED_BY'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'ASSIGNED_TO'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'STATUS'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'STATUS_DATE'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'FIXED_VERSION'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'FORM_SECTION'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'ISSUE'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'NOTES'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_ITEM_ID'
        Value = nil
      end>
  end
  object uqTaskItems: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'select'
      '  TASK_ITEM_ID,'
      '  TASK_ID,'
      '  ITEM_NUM,'
      '  APPLICATION,'
      '  APP_VERSION,'
      '  TASK_DATE,'
      '  STATUS_DATE,'
      '  REPORTED_BY,'
      '  ASSIGNED_TO,'
      '  STATUS,'
      '  FIXED_VERSION,'
      '  FORM_SECTION,'
      '  ISSUE,'
      '  NOTES'
      'from task_items'
      'where TASK_ID = :TASK_ID'
      'order by ITEM_NUM')
    Left = 56
    Top = 26
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end>
    object uqTaskItemsTASK_ITEM_ID: TIntegerField
      FieldName = 'TASK_ITEM_ID'
    end
    object uqTaskItemsTASK_ID: TStringField
      FieldName = 'TASK_ID'
      Required = True
      Size = 7
    end
    object uqTaskItemsITEM_NUM: TShortintField
      FieldName = 'ITEM_NUM'
      Required = True
    end
    object uqTaskItemsAPPLICATION: TStringField
      FieldName = 'APPLICATION'
      Required = True
      Size = 255
    end
    object uqTaskItemsAPP_VERSION: TStringField
      FieldName = 'APP_VERSION'
      Required = True
      Size = 50
    end
    object uqTaskItemsTASK_DATE: TDateField
      FieldName = 'TASK_DATE'
      Required = True
    end
    object uqTaskItemsSTATUS_DATE: TDateField
      FieldName = 'STATUS_DATE'
      Required = True
    end
    object uqTaskItemsREPORTED_BY: TStringField
      FieldName = 'REPORTED_BY'
      Required = True
      Size = 50
    end
    object uqTaskItemsASSIGNED_TO: TStringField
      FieldName = 'ASSIGNED_TO'
      Required = True
      Size = 50
    end
    object uqTaskItemsSTATUS: TStringField
      FieldName = 'STATUS'
      Required = True
      Size = 100
    end
    object uqTaskItemsFIXED_VERSION: TStringField
      FieldName = 'FIXED_VERSION'
      Required = True
      Size = 50
    end
    object uqTaskItemsFORM_SECTION: TStringField
      FieldName = 'FORM_SECTION'
      Required = True
      Size = 255
    end
    object uqTaskItemsISSUE: TStringField
      FieldName = 'ISSUE'
      Required = True
      Size = 1000
    end
    object uqTaskItemsNOTES: TStringField
      FieldName = 'NOTES'
      Required = True
      Size = 1000
    end
  end
  object uqAddTaskRow: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'insert into task_items ('
      '  TASK_ID,'
      '  ITEM_NUM,'
      '  APPLICATION,'
      '  APP_VERSION,'
      '  TASK_DATE,'
      '  STATUS_DATE,'
      '  REPORTED_BY,'
      '  ASSIGNED_TO,'
      '  STATUS,'
      '  FIXED_VERSION,'
      '  FORM_SECTION,'
      '  ISSUE,'
      '  NOTES'
      ')'
      'values ('
      '  :TASK_ID,'
      '  :ITEM_NUM,'
      '  null,'
      '  null,'
      '  null,'
      '  null,'
      '  null,'
      '  null,'
      '  null,'
      '  null,'
      '  null,'
      '  null,'
      '  null'
      ')')
    Left = 536
    Top = 282
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'ITEM_NUM'
        Value = nil
      end>
  end
  object uqTaskHeader: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'select'
      '  t.TASK_ID,'
      '  t.PARENT_ID,'
      '  t.TASK_NUM_1,'
      '  t.TASK_NUM_2,'
      '  t.TASK_NUM_3,'
      '  t.TASK_NUM_4,'
      '  t.TASK_NUM_5,'
      '  t.TASK_NUM_6,'
      '  t.PROJECT_ID,'
      '  t.SUBJECT,'
      '  p.NAME as PROJECT_NAME'
      'from tasks t'
      'left join project p'
      '  on p.PROJECT_ID = t.PROJECT_ID'
      'where t.TASK_ID = :TASK_ID')
    Left = 54
    Top = 82
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end>
    object uqTaskHeaderTASK_ID: TStringField
      FieldName = 'TASK_ID'
      Required = True
      Size = 7
    end
    object uqTaskHeaderPARENT_ID: TStringField
      FieldName = 'PARENT_ID'
      Size = 7
    end
    object uqTaskHeaderTASK_NUM_1: TIntegerField
      FieldName = 'TASK_NUM_1'
    end
    object uqTaskHeaderTASK_NUM_2: TIntegerField
      FieldName = 'TASK_NUM_2'
    end
    object uqTaskHeaderTASK_NUM_3: TIntegerField
      FieldName = 'TASK_NUM_3'
    end
    object uqTaskHeaderTASK_NUM_4: TIntegerField
      FieldName = 'TASK_NUM_4'
    end
    object uqTaskHeaderTASK_NUM_5: TIntegerField
      FieldName = 'TASK_NUM_5'
    end
    object uqTaskHeaderTASK_NUM_6: TIntegerField
      FieldName = 'TASK_NUM_6'
    end
    object uqTaskHeaderPROJECT_ID: TStringField
      FieldName = 'PROJECT_ID'
      Size = 7
    end
    object uqTaskHeaderSUBJECT: TStringField
      FieldName = 'SUBJECT'
      Size = 80
    end
    object uqTaskHeaderPROJECT_NAME: TStringField
      FieldName = 'PROJECT_NAME'
      ReadOnly = True
      Size = 30
    end
  end
  object uqTaskItemCodes: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'SELECT'
      '  CODE,'
      '  CODE_DESC,'
      '  CODE_TYPE'
      'FROM etask.task_item_codes'
      'WHERE CODE_TYPE = '#39'STATUS'#39
      'ORDER BY CODE')
    Left = 60
    Top = 140
    object uqTaskItemCodesCODE: TStringField
      FieldName = 'CODE'
      Required = True
      Size = 50
    end
    object uqTaskItemCodesCODE_DESC: TStringField
      FieldName = 'CODE_DESC'
      Size = 255
    end
    object uqTaskItemCodesCODE_TYPE: TStringField
      FieldName = 'CODE_TYPE'
      Size = 50
    end
  end
  object uqGetTaskRowPosition: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'select'
      '  TASK_ITEM_ID,'
      '  TASK_ID,'
      '  ITEM_NUM'
      'from task_items'
      'where TASK_ITEM_ID = :TASK_ITEM_ID'
      '  and TASK_ID = :TASK_ID')
    Left = 240
    Top = 16
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ITEM_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end>
    object uqGetTaskRowPositionTASK_ITEM_ID: TIntegerField
      AutoGenerateValue = arAutoInc
      FieldName = 'TASK_ITEM_ID'
    end
    object uqGetTaskRowPositionTASK_ID: TStringField
      FieldName = 'TASK_ID'
      Required = True
      Size = 7
    end
    object uqGetTaskRowPositionITEM_NUM: TSmallintField
      FieldName = 'ITEM_NUM'
      Required = True
    end
  end
  object uqMoveTaskRowTemp: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'update task_items'
      'set ITEM_NUM = :TEMP_ITEM_NUM'
      'where TASK_ITEM_ID = :TASK_ITEM_ID'
      '  and TASK_ID = :TASK_ID')
    Left = 238
    Top = 72
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TEMP_ITEM_NUM'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_ITEM_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end>
  end
  object uqShiftTaskRowsDown: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'update task_items'
      'set ITEM_NUM = ITEM_NUM + 1'
      'where TASK_ID = :TASK_ID'
      '  and ITEM_NUM >= :NEW_ITEM_NUM'
      '  and ITEM_NUM < :OLD_ITEM_NUM')
    Left = 234
    Top = 132
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'NEW_ITEM_NUM'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'OLD_ITEM_NUM'
        Value = nil
      end>
  end
  object uqShiftTaskRowsUp: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'update task_items'
      'set ITEM_NUM = ITEM_NUM - 1'
      'where TASK_ID = :TASK_ID'
      '  and ITEM_NUM > :OLD_ITEM_NUM'
      '  and ITEM_NUM <= :NEW_ITEM_NUM')
    Left = 236
    Top = 186
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'OLD_ITEM_NUM'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'NEW_ITEM_NUM'
        Value = nil
      end>
  end
  object uqSetTaskRowFinalPosition: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'update task_items'
      'set ITEM_NUM = :NEW_ITEM_NUM'
      'where TASK_ITEM_ID = :TASK_ITEM_ID'
      '  and TASK_ID = :TASK_ID')
    Left = 234
    Top = 242
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'NEW_ITEM_NUM'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_ITEM_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end>
  end
  object uqGetTaskMaxItemNum: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'select'
      '  coalesce(max(ITEM_NUM), 0) as MAX_ITEM_NUM'
      'from task_items'
      'where TASK_ID = :TASK_ID')
    Left = 234
    Top = 296
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end>
  end
  object uqDeleteTaskRow: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'delete from task_items'
      'where TASK_ITEM_ID = :TASK_ITEM_ID'
      '  and TASK_ID = :TASK_ID')
    Left = 536
    Top = 180
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ITEM_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end>
  end
  object uqShiftTaskRowsAfterDelete: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'update task_items'
      'set ITEM_NUM = ITEM_NUM - 1'
      'where TASK_ID = :TASK_ID'
      '  and ITEM_NUM > :OLD_ITEM_NUM')
    Left = 536
    Top = 126
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'OLD_ITEM_NUM'
        Value = nil
      end>
  end
  object uqShiftTaskRowsForInsert: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'update task_items'
      'set ITEM_NUM = ITEM_NUM + 1'
      'where TASK_ID = :TASK_ID'
      '  and ITEM_NUM > :INSERT_AFTER_ITEM_NUM')
    Left = 538
    Top = 76
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'INSERT_AFTER_ITEM_NUM'
        Value = nil
      end>
  end
  object uqProjectReportedUsers: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'select'
      '  min(tiu.TASK_ITEM_USER_ID) as TASK_ITEM_USER_ID,'
      '  tiu.NAME'
      'from task_item_user tiu'
      'join tasks project_tasks'
      '  on project_tasks.TASK_ID = tiu.TASK_ID'
      'join tasks target_task'
      '  on target_task.PROJECT_ID = project_tasks.PROJECT_ID'
      'where target_task.TASK_ID = :TASK_ID'
      '  and tiu.USER_TYPE = '#39'Reported'#39
      'group by tiu.NAME'
      'order by tiu.NAME')
    Left = 58
    Top = 256
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end>
    object uqProjectReportedUsersTASK_ITEM_USER_ID: TStringField
      FieldName = 'TASK_ITEM_USER_ID'
      ReadOnly = True
      Size = 50
    end
    object uqProjectReportedUsersNAME: TStringField
      FieldName = 'NAME'
      Required = True
      Size = 50
    end
  end
  object uqTaskAssignedUsers: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'select distinct'
      '  TASK_ITEM_USER_ID,'
      '  TASK_ID,'
      '  USER_TYPE,'
      '  NAME'
      'from task_item_user'
      'where TASK_ID = :TASK_ID'
      '  and USER_TYPE = '#39'Assigned'#39
      'order by NAME')
    Left = 60
    Top = 200
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end>
    object uqTaskAssignedUsersTASK_ITEM_USER_ID: TStringField
      FieldName = 'TASK_ITEM_USER_ID'
      Required = True
      Size = 50
    end
    object uqTaskAssignedUsersTASK_ID: TStringField
      FieldName = 'TASK_ID'
      Required = True
      Size = 7
    end
    object uqTaskAssignedUsersUSER_TYPE: TStringField
      FieldName = 'USER_TYPE'
      Required = True
      Size = 8
    end
    object uqTaskAssignedUsersNAME: TStringField
      FieldName = 'NAME'
      Required = True
      Size = 50
    end
  end
  object uqAssignedInsert: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'insert into task_item_user ('
      '  TASK_ITEM_USER_ID,'
      '  TASK_ID,'
      '  USER_TYPE,'
      '  NAME'
      ')'
      'values ('
      '  :TASK_ITEM_USER_ID,'
      '  :TASK_ID,'
      '  '#39'Assigned'#39','
      '  :NAME'
      ')')
    Left = 382
    Top = 24
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ITEM_USER_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'NAME'
        Value = nil
      end>
  end
  object uqAssignedRename: TUniQuery
    LocalUpdate = True
    Connection = ucETaskApi
    SQL.Strings = (
      'update task_item_user'
      'set NAME = :NEW_NAME'
      'where TASK_ITEM_USER_ID = :TASK_ITEM_USER_ID'
      '  and TASK_ID = :TASK_ID'
      '  and USER_TYPE = '#39'Assigned'#39)
    Left = 382
    Top = 84
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'NEW_NAME'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_ITEM_USER_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end>
  end
  object uqAssignedDelete: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'delete from task_item_user'
      'where TASK_ITEM_USER_ID = :TASK_ITEM_USER_ID'
      '  and TASK_ID = :TASK_ID'
      '  and USER_TYPE = '#39'Assigned'#39)
    Left = 384
    Top = 140
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ITEM_USER_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end>
  end
  object uqRenameAssignedTo: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'update task_items'
      'set ASSIGNED_TO = :NEW_NAME'
      'where TASK_ID = :TASK_ID'
      '  and lower(ASSIGNED_TO) = lower(:OLD_NAME)')
    Left = 386
    Top = 196
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'NEW_NAME'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'OLD_NAME'
        Value = nil
      end>
  end
  object uqBlankAssignedTo: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'update task_items'
      'set ASSIGNED_TO = null'
      'where TASK_ID = :TASK_ID'
      '  and lower(ASSIGNED_TO) = lower(:NAME)')
    Left = 388
    Top = 254
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'NAME'
        Value = nil
      end>
  end
  object uqProjectApplications: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'select distinct'
      '  tia.TASK_ITEM_APPLICATION_ID,'
      '  tia.PROJECT_ID,'
      '  tia.NAME'
      'from task_item_application tia'
      'join tasks target_task'
      '  on target_task.PROJECT_ID = tia.PROJECT_ID'
      'where target_task.TASK_ID = :TASK_ID'
      'order by tia.NAME')
    Left = 58
    Top = 314
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end>
    object uqProjectApplicationsTASK_ITEM_APPLICATION_ID: TIntegerField
      FieldName = 'TASK_ITEM_APPLICATION_ID'
    end
    object uqProjectApplicationsPROJECT_ID: TStringField
      FieldName = 'PROJECT_ID'
      Required = True
      Size = 7
    end
    object uqProjectApplicationsNAME: TStringField
      FieldName = 'NAME'
      Required = True
      Size = 255
    end
  end
  object uqApplicationInsert: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'insert into task_item_application ('
      '  PROJECT_ID,'
      '  NAME'
      ')'
      'values ('
      '  :PROJECT_ID,'
      '  :NAME'
      ')')
    Left = 700
    Top = 28
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'PROJECT_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'NAME'
        Value = nil
      end>
  end
  object uqApplicationRename: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'update task_item_application'
      'set NAME = :NEW_NAME'
      'where TASK_ITEM_APPLICATION_ID = :TASK_ITEM_APPLICATION_ID'
      '  and PROJECT_ID = :PROJECT_ID')
    Left = 700
    Top = 82
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'NEW_NAME'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_ITEM_APPLICATION_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'PROJECT_ID'
        Value = nil
      end>
  end
  object uqApplicationDelete: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'delete from task_item_application'
      'where TASK_ITEM_APPLICATION_ID = :TASK_ITEM_APPLICATION_ID'
      '  and PROJECT_ID = :PROJECT_ID')
    Left = 700
    Top = 136
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ITEM_APPLICATION_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'PROJECT_ID'
        Value = nil
      end>
  end
  object uqRenameTaskItemApplication: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'update task_items ti'
      'join tasks t'
      '  on t.TASK_ID = ti.TASK_ID'
      'set ti.APPLICATION = :NEW_NAME'
      'where t.PROJECT_ID = :PROJECT_ID'
      '  and lower(ti.APPLICATION) = lower(:OLD_NAME)')
    Left = 698
    Top = 188
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'NEW_NAME'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'PROJECT_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'OLD_NAME'
        Value = nil
      end>
  end
  object uqBlankTaskItemApplication: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'update task_items ti'
      'join tasks t'
      '  on t.TASK_ID = ti.TASK_ID'
      'set ti.APPLICATION = null'
      'where t.PROJECT_ID = :PROJECT_ID'
      '  and lower(ti.APPLICATION) = lower(:NAME)')
    Left = 696
    Top = 244
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'PROJECT_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'NAME'
        Value = nil
      end>
  end
  object uqReportedInsert: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'insert into task_item_user ('
      '  TASK_ITEM_USER_ID,'
      '  TASK_ID,'
      '  USER_TYPE,'
      '  NAME'
      ')'
      'values ('
      '  :TASK_ITEM_USER_ID,'
      '  :TASK_ID,'
      '  '#39'Reported'#39','
      '  :NAME'
      ')')
    Left = 858
    Top = 32
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ITEM_USER_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'NAME'
        Value = nil
      end>
  end
  object uqReportedRename: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'update task_item_user tiu'
      'join tasks t'
      '  on t.TASK_ID = tiu.TASK_ID'
      'join tasks target_task'
      '  on target_task.PROJECT_ID = t.PROJECT_ID'
      'set tiu.NAME = :NEW_NAME'
      'where target_task.TASK_ID = :TASK_ID'
      '  and tiu.USER_TYPE = '#39'Reported'#39
      '  and tiu.TASK_ITEM_USER_ID = :TASK_ITEM_USER_ID')
    Left = 858
    Top = 88
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'NEW_NAME'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_ITEM_USER_ID'
        Value = nil
      end>
  end
  object uqReportedDelete: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'delete tiu'
      'from task_item_user tiu'
      'join tasks t'
      '  on t.TASK_ID = tiu.TASK_ID'
      'join tasks target_task'
      '  on target_task.PROJECT_ID = t.PROJECT_ID'
      'where target_task.TASK_ID = :TASK_ID'
      '  and tiu.USER_TYPE = '#39'Reported'#39
      '  and tiu.TASK_ITEM_USER_ID = :TASK_ITEM_USER_ID')
    Left = 858
    Top = 144
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_ITEM_USER_ID'
        Value = nil
      end>
  end
  object uqBlankTaskItemReportedBy: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'update task_items ti'
      'join tasks t'
      '  on t.TASK_ID = ti.TASK_ID'
      'join tasks target_task'
      '  on target_task.PROJECT_ID = t.PROJECT_ID'
      'set ti.REPORTED_BY = null'
      'where target_task.TASK_ID = :TASK_ID'
      '  and lower(ti.REPORTED_BY) = lower(:NAME)')
    Left = 860
    Top = 264
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'NAME'
        Value = nil
      end>
  end
  object uqRenameTaskItemReportedBy: TUniQuery
    Connection = ucETaskApi
    SQL.Strings = (
      'update task_items ti'
      'join tasks t'
      '  on t.TASK_ID = ti.TASK_ID'
      'join tasks target_task'
      '  on target_task.PROJECT_ID = t.PROJECT_ID'
      'set ti.REPORTED_BY = :NEW_NAME'
      'where target_task.TASK_ID = :TASK_ID'
      '  and lower(ti.REPORTED_BY) = lower(:OLD_NAME)')
    Left = 858
    Top = 202
    ParamData = <
      item
        DataType = ftUnknown
        Name = 'NEW_NAME'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'TASK_ID'
        Value = nil
      end
      item
        DataType = ftUnknown
        Name = 'OLD_NAME'
        Value = nil
      end>
  end
end
