In order to simply code of JiraSyncInfo it has been used the method
Collections.unmodifiableList. Moreover, the type of syncFailedReasons has been
changed to List to make it easier.
FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
* Extracted paths for JIRA REST API to constants.
* Code simplification:
* Use StringUtils.split
* Use Collections.singletonList
FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
* Extract save part to a separated method as syncJiraTimesheetWithJiraIssues
doesn't deal with workReportModel and it could cause misunderstandings.
* Move some parts just needed for newly created objects inside the ifs.
* Use properly EffortDuration to create a new one from seconds.
* Avoid find in another transaction as transaction is already opened.
FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
* Renamed PersonalTimesheetsTypeOfWorkHoursBootstrap to
ConfigurationTypeOfWorkHoursBootstrapa in order to set up TypeOfWorkHours for
both personal timesheets and Jira connector.
* Modified ConfigurationBootstrap to ensure that the JiraConfiguration is
created properly.
* Removed unneeded code in ConfigurationModel.
FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
* The new field is added in JiraConfiguration similar to field
Configuration.personalTimesheetsTypeOfWorkHours.
* Added required bits for Hibernate mapping and Liquibase database changes.
* Modified Jira connector configuration UI to include the new field.
FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
Different stuff has been fixed in the method:
* Some parts were moved inside the ifs, as they were only needed for newly
created entities.
* Some unneeded lines were removed:
* directAdvanceAssignment.setOrderElement as this is already done by
orderElement.addAdvanceAssignment.
* advanceMeasurement.setAdvanceAssignment as this is already done by
directAdvanceAssignment.addAdvanceMeasurements.
* The progress PERCENTAGE is marked as spread to make sure that the task appears
as finished.
FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
Estimated hours are now calculated using the following formula:
* If there're remaining hours:
Estimated hours = Remaining estimated hours + Logged hours
* Otherwise:
Estimated hours = Original estimated hours
Moreover the calculation is done now just once, and after the logged hours one.
FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
EffortDuration already provide methods to convert seconds in hours and to divide
EffortDuration values.
FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
There was a cast without checking if the OrderElement was or not a line, so it
could cause exceptions in some cases.
On the other hand the OrderLine gotten or created in
JiraOrderElementSynchronizer.syncOrderLine is used in the next methods too.
FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
Extracts JiraConfiguraion to a variable and uses it to get the data. This will
do only 1 database query.
FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
JiraOrderElementSynchronizer.getAllJiraLabels() is marked as transactional, so
getConfiguration() is enough.
FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
As the same prefix is used in several files it has been defined as a constant in
JiraConfiguration.
FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
Include link to JIRA issue in
org.libreplan.importers.IJiraOrderElementSynchronizer.getAllJiraLabels().
FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
Here starts the process synchronization of order-elements with jira issues
First it request jira for all labels and renders the response as autocompleted list (in edition UI).
When a user selected a label and press 'startsync' button it requests jira for all issues of the selected label
and starts synchronizing order-elements(syncOrderElementsWithJiraIssues(order,issues). After finishing synchronization
it saves the order bij calling saveAndContinue() method. if save order is ok then starts synchronizing
timesheets. Finally diplays a dialog window with success or failer info.
Check if an order-element's code starts with 'JIRA'. if it is, the order-element is imported from
jira, so make intbox hours column of WBS(tasks) read only.
create a hyperlink to jira if an order-element was a jira issue. This check has been
performed in addCodeCell method. order-elements which has a code starts with 'JIRA' are
order-elements that were imported from jira
Interacts with Jira RESTful web service and supports only get method. Moreover it does
basic authentication check using org.libreplan.ws.common.impl.Util.addAuthorizationHeader()
An implementation of the interface IJiraTimesheetSynchronizer.
It synchronizes the timesheets of order-tasks of an existing order with jira issues.
Loops through all jira issues and creates or updates timesheets(WorkReports) for an
existing order. As a pre condition a WorkReportType with the name 'jira-connector'
must be created and configured properly prior to synchronization of timesheets.
An implementation of the interface IJiraOrderElementSynchronizer.
It synchronizes order-elements inclusive progress assignments and measurements of an
existing order with jira issues.
Loops through all jira issues and creates or updates order-lines/order-elements, hoursgroup,
progress assignments and measurements
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
An interface that JiraOrderElementSynchronizer implements.
It synchronizes order-elements inclusive progress assignments and measurements of
an existing order with jira issues