From b51905911fb1c0995947c5adc9c52f7bab068a43 Mon Sep 17 00:00:00 2001 From: Miciele Ghiorghis Date: Wed, 24 Oct 2012 11:53:27 +0200 Subject: [PATCH] Jira-integration: synchronize the timesheets of order-tasks with jira issues An interface that JiraTimesheetSynchronizer implements. It synchronizes the timesheets of order-tasks of an existing order with jira issues A WorkReportType object with the name 'jira-connector' must exist and configured properly prior to start synchronization of timesheets --- .../importers/IJiraTimesheetSynchronizer.java | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 libreplan-webapp/src/main/java/org/libreplan/importers/IJiraTimesheetSynchronizer.java diff --git a/libreplan-webapp/src/main/java/org/libreplan/importers/IJiraTimesheetSynchronizer.java b/libreplan-webapp/src/main/java/org/libreplan/importers/IJiraTimesheetSynchronizer.java new file mode 100644 index 000000000..93d5a32b2 --- /dev/null +++ b/libreplan-webapp/src/main/java/org/libreplan/importers/IJiraTimesheetSynchronizer.java @@ -0,0 +1,62 @@ +/* + * This file is part of LibrePlan + * + * Copyright (C) 2012 Igalia, S.L. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package org.libreplan.importers; + +import java.util.List; + +import org.libreplan.business.orders.entities.Order; +import org.libreplan.business.workreports.entities.WorkReportType; +import org.libreplan.importers.jira.Issue; + +/** + * Synchronize the timesheets of order tasks of an existing order with jira + * issues. + * + * A {@link WorkReportType} with the name "jira-connector" must also be exist + * and configured properly prior to start synchronization. + * + * Jira issues will be retrieved from Jira RESTful web service during + * synchronization of order elements + * + * @author Miciele Ghiorghis + */ +public interface IJiraTimesheetSynchronizer { + + /** + * Synchronize jira timesheet with the specified jira issues . + * + * + * Loop through all jira issues and check if timesheet is + * already exist for the specified issue item. If it is, update the + * timesheet with that issue item. If not create new one + * + * @param issues + * the jira issues + * @param order + * an existing order + */ + void syncJiraTimesheetWithJiraIssues(List issues, Order order); + + /** + * returns synchronization info, success or fail info + */ + JiraSyncInfo getJiraSyncInfo(); + +}