public ArrayList<Task> initiateTaskList(Connection conn) throws SQLException {
        ArrayList<Task> tasks = new ArrayList<>();
        int taskID;
        int parentID;
        int estimatedtime;
        int priority;
        Type t = null;
        Statuss s = null;
        Customer c = null;
        User u = null;
        String description;
        String taskName;
        Date startDate;
        Date endDate;

        ArrayList<User> userOnTask = new ArrayList<>();

        CallableStatement cs = conn.prepareCall("{call getAllTasks}");
        ResultSet rs = cs.executeQuery();

        while (rs.next()) {
            taskID = rs.getInt("taskID");
            parentID = rs.getInt("parentID");
            estimatedtime = rs.getInt("estimatedTime");
            priority = rs.getInt("priority");
            description = rs.getString("description");
            taskName = rs.getString("taskName");
            startDate = rs.getDate("startDate");
            endDate = rs.getDate("endDate");

            for (int i = 0; i < Controller.statusList.size(); i++) {
                if (Controller.statusList.get(i).getStatusID() == rs.getInt("status")) {
                    s = Controller.statusList.get(i);
                }
            }

            for (int i = 0; i < Controller.customerList.size(); i++) {
                if (Controller.customerList.get(i).getCustomerID() == rs.getInt("customer")) {
                    c = Controller.customerList.get(i);
                }
            }

            for (int i = 0; i < Controller.userList.size(); i++) {
                if (Controller.userList.get(i).getUserID() == rs.getInt("taskLeader")) {
                    u = Controller.userList.get(i);
                }
            }

            for (int i = 0; i < Controller.typeList.size(); i++) {
                if (Controller.typeList.get(i).getTypeID() == rs.getInt("type")) {
                    t = Controller.typeList.get(i);
                }
            }
            Task task = new Task(taskID, parentID, taskName, t, s, c, u, startDate, endDate, estimatedtime, priority, description, userOnTask);
            tasks.add(task);
        }
        return tasks;

    }