Commit graph

9184 commits

Author SHA1 Message Date
Manuel Rego Casasnovas
cbc7c3c169 jira-integration: Add checkings to prevent remove or disable type of work hours for JIRA connector
FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
2013-01-30 11:16:50 +01:00
Manuel Rego Casasnovas
ae3b7610f1 jira-integration: Modify bootstraps in order to set JiraConfiguration properly
* 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
2013-01-30 11:16:50 +01:00
Manuel Rego Casasnovas
44dca50bc9 jira-integration: Add new field jiraConnectorTypeOfWorkHours in JiraConfiguration
* 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
2013-01-30 11:16:50 +01:00
Manuel Rego Casasnovas
b68315595a jira-integration: Add messages to the user if default data is not found
Add information for the user if required work report type or type of hours are
not found.

FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
2013-01-30 09:40:38 +01:00
Manuel Rego Casasnovas
31c3247344 jira-integration: Inline startSync method
startSync is private and only used from syncJiraTimesheetWithJiraIssues. So it's
not needed.

FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
2013-01-30 09:36:50 +01:00
Manuel Rego Casasnovas
a7fb973a61 jira-integration: General refactorization JiraOrderElementSynchronizer.updateOrCreateProgressAssignmentAndMeasurement
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
2013-01-30 09:30:54 +01:00
Manuel Rego Casasnovas
cbc3af5973 jira-integration: Change way to calculate estimated hours
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
2013-01-29 22:32:37 +01:00
Manuel Rego Casasnovas
9e04e0c56f jira-integration: Use EffortDuration to calculate estimated and logged hours
EffortDuration already provide methods to convert seconds in hours and to divide
EffortDuration values.

FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
2013-01-29 22:32:34 +01:00
Manuel Rego Casasnovas
f912cb6dc5 jira-integration: Prevent error if found OrderElement is not a line
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
2013-01-29 19:30:30 +01:00
Manuel Rego Casasnovas
da13e85326 jira-integration: Fix typo in syncProgressMeasurement method name
FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
2013-01-29 19:30:28 +01:00
Manuel Rego Casasnovas
cc2568aca2 jira-integration: Move path for search operation in JIRA REST API to constant
As this path is used in several classes it has been moved to a constant in
JiraRESTClient.

FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
2013-01-29 19:30:26 +01:00
Manuel Rego Casasnovas
9821014c9b jira-integration: Avoid 3 queries to get JIRA configuration from database
Extracts JiraConfiguraion to a variable and uses it to get the data. This will
do only 1 database query.

FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
2013-01-29 19:30:23 +01:00
Manuel Rego Casasnovas
a113bf4275 jira-integration: Avoid getConfigurationWithReadOnlyTransaction as transaction was already opened
JiraOrderElementSynchronizer.getAllJiraLabels() is marked as transactional, so
getConfiguration() is enough.

FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
2013-01-29 19:30:21 +01:00
Manuel Rego Casasnovas
89e9a58b6b jira-integration: Move code prefix for JIRA entities to a constant
As the same prefix is used in several files it has been defined as a constant in
JiraConfiguration.

FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
2013-01-29 19:30:17 +01:00
Manuel Rego Casasnovas
d2fe100ca3 jira-integration: Changed params order in IJiraOrderElementSynchronizer.syncOrderElementsWithJiraIssues
This makes it coherent with method in IJiraTimesheetSynchronizer.

FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
2013-01-29 19:30:15 +01:00
Manuel Rego Casasnovas
aad23eb4fe jira-integration: Add information about JIRA issue
Include link to JIRA issue in
org.libreplan.importers.IJiraOrderElementSynchronizer.getAllJiraLabels().

FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
2013-01-29 19:30:09 +01:00
Manuel Rego Casasnovas
bb914e7d10 jira-integration: Add missing protected constructor to JiraConfiguration
Missing protected constructor in order to avoid wrong usage of the class (maybe
someone could try to do "new JiraConfiguration()" instead of
JiraConfiguration.create()).

FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
2013-01-29 19:30:05 +01:00
Miciele Ghiorghis
0bd1066d20 Jira-integration: Copy right changed from Igalia, S.L. to St. Antoniusziekenhuis 2013-01-29 18:30:49 +01:00
Miciele Ghiorghis
1ae8d9b1b7 Jira-integration: importedLabel variable with set and get methods added
When order elements of an existing order are synchronized for an specified label, the specified
label will be stored in order_table. This is to prevent that different labels being imported for
the specified order
2013-01-29 18:30:49 +01:00
Miciele Ghiorghis
0c0ad5f3c2 Jira-integration: to get all labels from jira database
At this moment Jira Webservice doesn't support get Jira labels. This is a workaround
for getting jira labels. The php script gets all distinct labels from jira database
2013-01-29 18:30:49 +01:00
Miciele Ghiorghis
5171d028fe Jira-integration: jira configuration properties for testing jiraRESTClient 2013-01-29 18:30:49 +01:00
Miciele Ghiorghis
f25f65b735 Jira-integration: new dependency groupId=org.codehaus.jackson added
jackson-jaxrs provided and jackson-xc added and is used bij JiraREST client
to parse the json response and map to jira beans
2013-01-29 18:30:49 +01:00
Miciele Ghiorghis
77756a7712 Jira-integration: extended with UI for synchronization with jira issues 2013-01-29 18:30:49 +01:00
Miciele Ghiorghis
544cfeedb5 Jira-integration: start point of synchronization with jira
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.
2013-01-29 18:30:49 +01:00
Miciele Ghiorghis
553b19e5e0 Jira-integration: tabpanel for jira configuration added 2013-01-29 18:30:49 +01:00
Miciele Ghiorghis
e72948516c Jira-integration: make the hours column in WBS screen read only if an order-element is a jira issue
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.
2013-01-29 18:30:49 +01:00
Miciele Ghiorghis
cc0614c249 Jira-integration: addHyperlink method is added and addCodeCell method is modified
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
2013-01-29 18:30:49 +01:00
Miciele Ghiorghis
c4d226ee56 Jira-integration: A bind method which return a hyperlink to jira is added 2013-01-29 18:30:49 +01:00
Miciele Ghiorghis
a0af0241d2 Jira-integration: get and set JiraConfiguration added 2013-01-29 18:30:49 +01:00
Miciele Ghiorghis
cbc536c050 Jira-integration: set and get JiraConfiguration added 2013-01-29 18:30:49 +01:00
Miciele Ghiorghis
6cf37005df Jira-integration: testJiraConnection method added
testJiraConnection method added, to test if user can be connected to jira
and also getter and setter -JiraConfiguration methods added
2013-01-29 18:30:49 +01:00
Miciele Ghiorghis
58e45c8a9b Jira-integration: new dependency groupId=org.codehaus.jackson added
jackson-jaxrs provided and jackson-xc added and is used bij JiraREST client
to parse the json response and map to jira beans
2013-01-29 18:30:49 +01:00
Miciele Ghiorghis
ab87c3875a Jira-integration: extended with ImporedLabel property 2013-01-29 18:30:49 +01:00
Miciele Ghiorghis
56e1700477 Jira-integration: extended with jira-configuration properties 2013-01-29 18:30:49 +01:00
Miciele Ghiorghis
894c1b12ba Jira-integration: new columns jira-configurations and importedLabel added
New jira-configurations columns added to configuration table
New imported_label column added to order_table
2013-01-29 18:30:49 +01:00
Miciele Ghiorghis
7eb5587a84 Jira-integration: create and set JiraConfiguration added to loadRequiredData method 2013-01-29 18:30:48 +01:00
Miciele Ghiorghis
22a24990aa Jira-integration: JiraConfiguration entity added 2013-01-29 18:30:48 +01:00
Miciele Ghiorghis
629ff6fad1 Jira-integration: Test for JiraRESTClient
Configuration properties are located in ..scripts/jira-connector/jira-conn.properties
2013-01-29 18:30:48 +01:00
Miciele Ghiorghis
2bc8fbec6d Jira-integration: Test for JiraTimesheetSynchronizer 2013-01-29 18:30:48 +01:00
Miciele Ghiorghis
ead5bd8a11 Jira-integration: Test for JiraOrderElementSynchronizer 2013-01-29 18:30:48 +01:00
Miciele Ghiorghis
59f9f0e628 Jira-integration: modal dialog to show the synchronization's success or failer info 2013-01-29 18:30:48 +01:00
Miciele Ghiorghis
f78eb2a8c4 Jira-integration: Keeps track the synchronization info. 2013-01-29 18:30:48 +01:00
Miciele Ghiorghis
3174f886fa Jira-integration: non persistent beans to map jira's REST response 2013-01-29 18:30:48 +01:00
Miciele Ghiorghis
887d0ae650 Jira-integration: a jira client to interact with jira RESTful web service
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()
2013-01-29 18:30:48 +01:00
Miciele Ghiorghis
13b649fb93 Jira-integration: synchronize the timesheets with jira issues
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.
2013-01-29 18:30:48 +01:00
Miciele Ghiorghis
23aef762a5 Jira-integration: synchronize order-elements with jira issues
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
2013-01-29 18:30:48 +01:00
Miciele Ghiorghis
b51905911f 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
2013-01-29 18:30:48 +01:00
Miciele Ghiorghis
a8f56820f9 Jira-integration: synchronize order-elements with jira issues
An interface that JiraOrderElementSynchronizer implements.
It synchronizes order-elements inclusive progress assignments and measurements of
an existing order with jira issues
2013-01-29 18:30:48 +01:00
Miciele Ghiorghis
6af732164a Jira-integration: Jira configuration entity 2013-01-29 18:30:48 +01:00
Manuel Rego Casasnovas
2bf13fef80 Bug #1607: Fix issue filtering the resources load window
The issue was introduced in commit 05132fd5a7.
Where it was defined an algorithm:
  2.4) FSD is not null and FED is not null:
    2.4.1) APED is null: Check if APSD is between FSD and FED

This was wrong, it should be:
  2.4) FSD is not null and FED is not null:
    2.4.1) APED is null: Check if APSD is lower or equals than FSD or APSD is
    lower or equals than FED

FEA: ItEr77S04BugFixing
2013-01-29 14:05:48 +01:00