Commit graph

633 commits

Author SHA1 Message Date
Lorenzo Tilve Álvaro
e5450066de Added relationship between Criterion and CostCategories
FEA: ItEr77S17AutomaticBudgeting
2013-06-06 19:15:00 +02:00
Oscar Gonzalez Fernandez
3713198a93 Use a connection data pool when running tests
It cuts 40 seconds or around from the tests running time.
2013-06-05 12:33:57 +02:00
Oscar Gonzalez Fernandez
1045a1a171 Remove no longer applicable comments 2013-06-01 17:26:28 +02:00
Oscar Gonzalez Fernandez
b0b0d662dc Fix failing test when running mvn install
Some test cases in DerivedAllocationGeneratorTest were failing during
a mvn install. It might not happen in all systems since it depends
on the order the tests are executed. It's also failing if run
individually.

The problem is that ScenarioBootstrap must be executed before
executing these tests. When distributing the resources, the
DayAssignments of the resource for the current scenario are queried.
An IScenarioManager must have been registered in Registry plus the
main scenario initialized.

The stack trace is:

java.lang.IllegalStateException: loadRequiredData should have been called on org.libreplan.business.scenar
ios.bootstrap.ScenariosBootstrap
        at org.libreplan.business.scenarios.bootstrap.ScenariosBootstrap.getMain(ScenariosBootstrap.java:81)
        ...
        at com.sun.proxy.$Proxy42.getMain(Unknown Source)
        at org.libreplan.business.scenarios.OnlyMainScenarioAwareManager.getCurrent(OnlyMainScenarioAwareManager.java:38)
        at org.libreplan.business.resources.entities.Resource$UsingScenarioManager.calculateAssignments(Resource.java:185)
        at org.libreplan.business.resources.entities.Resource$DayAssignmentsState.getAssignments(Resource.java:172)
        at org.libreplan.business.resources.entities.Resource.getAssignments(Resource.java:886)
        at org.libreplan.business.resources.entities.Resource.getAssignmentsForDay(Resource.java:153)
        at org.libreplan.business.resources.entities.Resource.getAssignedDurationDiscounting(Resource.java:861)
        at org.libreplan.business.planner.entities.AssignedEffortForResource$AssignedEffortDiscounting.getAssignedDurationAt(AssignedEff
ortForResource.java:169)
        at org.libreplan.business.planner.entities.EffortDistributor$ResourceWithDerivedData.withAvailableCapacityOn(EffortDistributor.j
ava:232)
        at org.libreplan.business.planner.entities.EffortDistributor.resourcesFromMoreDesirableToLess(EffortDistributor.java:408)
        at org.libreplan.business.planner.entities.EffortDistributor.assignAllPossibleWithoutOvertime(EffortDistributor.java:387)
        at org.libreplan.business.planner.entities.EffortDistributor.distributeForDay_(EffortDistributor.java:356)
        at org.libreplan.business.planner.entities.EffortDistributor.distributeForDay(EffortDistributor.java:341)
        at org.libreplan.business.planner.entities.DerivedAllocationGenerator.createAssignments(DerivedAllocationGenerator.java:114)
        at org.libreplan.business.planner.entities.DerivedAllocationGenerator.generate(DerivedAllocationGenerator.java:68)
        at org.libreplan.business.test.planner.entities.DerivedAllocationGeneratorTest.forOneResourceTheHoursGeneratedAreGotFromAlpha(De
rivedAllocationGeneratorTest.java:205)
2013-06-01 17:25:51 +02:00
Manuel Rego Casasnovas
4e06cbe71a Bump version number to 1.4.0
FEA: ItEr77S03Community
2013-04-29 19:05:17 +02:00
Lorenzo Tilve Álvaro
b2ccc9e0eb Fix MySQL problem when loading connector properties bootstraps
There was some issue regarding connector_properties columns
names that was causing that the bootstraps launched an SQL
exception when deploying over MySQL.

FEA: ItEr77S04BugFixing
2013-04-17 18:23:47 +02:00
Lorenzo Tilve Álvaro
cc246eedfa Merge branch 'master' into mpxj-import
Conflicts:
	libreplan-business/src/main/java/org/libreplan/business/orders/entities/Order.java
	libreplan-webapp/pom.xml
	pom.xml
2013-04-16 09:34:31 +02:00
Lorenzo Tilve Álvaro
a7adf8429f Bug #1610: Fix problem accessing company view with limited permissions
When the user had restricted access to the company view, and the list
of specific projects that he could read is empty, an HibernateQueryException
was being raised.

FEA: ItEr77S04BugFixing
2013-04-15 10:05:46 +02:00
Lorenzo Tilve Álvaro
909eab9f52 Merge branch 'master' into mpxj-import
Conflicts:
	libreplan-business/src/main/java/org/libreplan/business/orders/entities/Order.java
	libreplan-business/src/main/resources/db.changelog-1.3.xml
2013-03-27 17:57:03 +01:00
Lorenzo Tilve Álvaro
24326238a2 Fix problems with calendar exception types bootstrap
When deploying again after having imported projects, the calendar bootstrap was wrongly trying to save
a repeated calendar exception day.

FEA: ItEr77S05BasicProjectImport
2013-03-27 17:34:57 +01:00
Lorenzo Tilve Álvaro
a9d974e0ce Configures a new userRole to restrict access to import project functionality
FEA: ItEr77S05BasicProjectImport
2013-03-27 17:10:42 +01:00
Manuel Rego Casasnovas
28e56f8ae1 Merge branch 'master' into tim-connector 2013-03-27 10:31:48 +01:00
miciele Ghiorghis
111b780752 jira and tim-connector: Constraints for OrderSyncInfo 2013-03-27 10:20:44 +01:00
miciele Ghiorghis
94f3763e32 jira and tim-connector: Constraints for JobSchedulerConfiguration 2013-03-27 10:20:41 +01:00
Javier Moran Rua
9b3ab84cf0 Adds calculator to obtain the ratios of a resource as a spring bean
Two load ratios are defined:

   * Overload = overload / (load + overload)
   * Availability = min (0,(1 - load/capacity))

FEA: ItEr77S10ResourceAllocationLoadInformation
2013-03-26 12:54:10 +01:00
Javier Moran Rua
eac5c860c3 Adds method to collect the day assignments of a resource in a scenario between two dates.
FEA: ItEr77S10ResourceAllocationLoadInformation
2013-03-26 12:26:20 +01:00
Manuel Rego Casasnovas
c7508fbfa3 tim-connector: Rename connectorId to connectorName in OrderSyncInfo
FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
2013-03-26 10:59:37 +01:00
miciele Ghiorghis
ba8024aae7 jira and tim-connector: new job for Jira order element synchronizer and some improvement
- New Job implementation for Jira order element synchronizer
- Some imporvements to manage/display errors
2013-03-26 10:21:48 +01:00
miciele Ghiorghis
cea2996917 jira-and-tim-connector: correction on OrderSyncInfo
- In OrderSyncInfoDAO the method name findByKeyAndConnectorId is changed to findByKeyOrderAndConnectorId and
a parameter Order is added. The files that uses this method are  modified accordingly
- In JiraSynchronizationController refresh added. If OrderSyncInfo is saved the jira sync info screen will be
updated to show the change
2013-03-26 10:07:08 +01:00
miciele Ghiorghis
2fc452d1b7 jira and tim -connector: Refactoring OrderCRUDController and other improvements
- OrderCRUDController refactored
- Save or update for OrderSyncInfo instead of creating new instance for each sync
- Name change for TimImpExpInfo to SynchronizationInfo
- JiraSyncInfo is removed instead SynchronizationInfo is used
- All files which are affected by name changes are modified
- Translations added where applicable
- clean up unused variables etc
2013-03-25 14:44:15 +01:00
Manuel Rego Casasnovas
babe4ffa79 Mark as non-lazy the relationship between a user and its related entities (Label and Criterion)
This avoids problems saving a project when entering directly via the entry
points with a user that has a label associated.

FEA: ItEr77S04BugFixing
2013-03-20 13:28:14 +01:00
miciele Ghiorghis
d764e0a3f8 Jira-connector: JIRA moved to connectors
- JIRA is moved to connectors and all files modified that has to do with this change.
- JiraConfiguration file is removed
- ImportedLabel attribute is deleted from Order and order.hbm.xml
- Imstead of importedLabel is now used the key from OrderSyncInfo
- and some more changes where applicable
2013-03-14 12:26:12 +01:00
miciele Ghiorghis
3891048f00 tim-connector: check if connector values are invalid and more
Better error handling:
* check if connector connection values are valid
* New ConnectorException
* New .zul file to show import/export failed/success information
* All files modified affected by these changes
2013-03-14 12:20:38 +01:00
Lorenzo Tilve Álvaro
cd17d48d28 Fix wrong behaviour of projects list filtering
The component that shows the filtering results is adding the unscheduled projects when they
are not excluded by the dates range, but they were appearing also when they were not matching
the combobox conditions.

FEA: ItEr77S15FilteringEnhancements
2013-03-12 12:08:08 +01:00
Manuel Rego Casasnovas
113f3455fe i18n: Add Chinese language to enum and modify pom.xml to use English userguide 2013-03-12 10:07:19 +01:00
miciele Ghiorghis
a610afa957 tim-connector: main changes in scheduler
* CRUD for scheduler
* The UI job_scheduling.zul for CRUD is splits to _editJobScheduling.zul and _listJobScheduling.zul
* Lots of changes in scheduler to make it generic
  - jobs can be scheduled, rescheduled and deleted
  - check if job has a connector and is enabled
  - check if job is allowed to be scheduled
  - do manual is moved to JobConfigurationController
* attributes connectorName and scheduled added to JobSchedulerConfiguration modified
* triggerGroup and triggerName deleted from JobScheduleerConfiguration
* In JobConfigurationDAO findByConnectorName added
* New JobClassNameEnum added to be used as data type for JobClassName in JobSchedulerConfiguration
* Import/Export Jobs read the beans that do the real work from ApplicationContext
* Some minor changes in ConfigurationController
2013-03-07 11:50:53 +01:00
Manuel Rego Casasnovas
21c788316a tim-connector: Refactor majorId attribute of Connector entity to name
FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
2013-02-27 19:14:14 +01:00
Manuel Rego Casasnovas
c29015e9af tim-connector: Created new entity Connector based on AppProperties
AppProperties entity has been removed as it stores the same information
(majorId) repeated in each database record and it doesn't match with the real
model that we need.

A new entity Connector with a majorId identifier has been created, this entity
contains a list of properties (pairs key-value).

Moreover it has been created the predefined Tim connector with its own
properties (predefined too).

For new connectors, apart from the specific classes implementing them it would
be only needed to modify PredefinedConnectors and PredefinedConnectorProperties.
The database will be updated automatically on LibrePlan startup thanks to the
ConnectorBootstrap.

FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
2013-02-27 14:41:48 +01:00
Manuel Rego Casasnovas
dbf3f0883a Fix orders filtered query
GROUP BY clause was being added in the middle of the query instead of at the
end.

FEA: ItEr77S15FilteringEnhancements
2013-02-22 20:14:43 +01:00
Manuel Rego Casasnovas
5d07599594 Bug #1609: Fix problem using a different transaction in validation methods
In order to avoid to have the same user in the session twice, the validation
query of User entity has been done in a different transaction.

The issue happens with resources too, so the same solution has been used in
both cases.

FEA: ItEr77S04BugFixing
2013-02-22 12:39:27 +01:00
miciele Ghiorghis
4aae86335e tim-connector: added attribute key and connectorId and removed code and label attributes
- attributes key and connectorId added
- modified findBys with this new change
- modified other files affected by this change
2013-02-21 17:32:19 +01:00
miciele Ghiorghis
81479a1850 tim-connector: comments improved and NotNull annotations added 2013-02-14 11:48:55 +01:00
Manuel Rego Casasnovas
6898dbdbf1 tim-connector: Rename page to "Job Scheduling" and associated files
* Renamed .zul file and page to "Job Scheduling".
* Include ROLE_JOB_SCHEDULING in default profile SYSTEMS_ADMINISTRATOR.

FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
2013-02-13 13:59:11 +01:00
Lorenzo Tilve Álvaro
35e1644cee Merge branch 'master' into filtering-improvements
FEA: ItEr77S15FilteringEnhancements
2013-02-13 12:19:45 +01:00
Manuel Rego Casasnovas
dc15df3d2e tim-connector: Add protected default constructor for Hibernate to new entities
Include proper comments warning about not using it directly.

FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
2013-02-11 13:47:23 +01:00
Manuel Rego Casasnovas
7fe5eb2350 Keep tasks converted into containers also in the filtered WBS
This allows to add a task over a leaf in a filtered WBS, and being able to keep
seeing the 3 elements: the new container (with the name of the previous leaf),
the previous leaf without name and the new task added.

It's easier to understand with an example. Imagine you have the following WBS:
* Task 1
* Task 2

And you filter by task name using "2", then you'll have:
* Task 2

Then you select "Task 2" and add a new task called "Subtask A".

Without this patch you'll only see:
* Task 2 (the new container using the name of the old leaf)
  |- Subtask A (the new task)

However, it's better you see the following
* Task 2 (the new container using the name of the old leaf)
  |- (empty task) (the old leaf that you should rename)
  |- Subtask A (the new task)

FEA: ItEr77S15FilteringEnhancements
2013-02-08 13:53:44 +01:00
Miciele Ghiorghis
48cdded3e0 Tim-connector: Classes renamed according Libreplan naming convention
DTO classes are renamed to class-name with suffix DTO according to Libreplan naming convention
Modified all classes which are affected by the renamed classes
Comments and author information added where applicable
Test cases modified
2013-02-08 11:16:19 +01:00
Miciele Ghiorghis
b622b68589 Tim-connector: Two mapping resource added
AppProperties.hbm.xml and JosSchedulerConfiguration.hb.mxl are added
2013-02-08 11:16:18 +01:00
Miciele Ghiorghis
21c65717a8 Tim-connector: Three new tables added
Three tables added:
order_sync_info: holds the order synchronization information
app_properties: holds app configuration properties
job_scheduler_configuratiion: holds job to be scheduled
Both app_properties and job_scheduler_configurations are filled with default values
2013-02-08 11:16:18 +01:00
Miciele Ghiorghis
3f606eab3c Tim-connector: An implementation of method findByOrderElementAndChildrenFilteredByDate
To find all WorkReportLines of an order between 2 dates
2013-02-08 11:16:18 +01:00
Miciele Ghiorghis
1ce4477c84 Tim-connector: new search method added
findByOrderElementAndChildrenFilteredByDate added, to find all workReportLines of an order between 2 dates
2013-02-08 11:16:18 +01:00
Miciele Ghiorghis
9463d94a84 Tim-connector: Method getWorkReportLines added
getWorkReportLines: gets all WorkReportLines of this order specified between start and end date.
2013-02-08 11:16:18 +01:00
Miciele Ghiorghis
ddce4b2f1d Tim-connector: Hibernate mapping for OrderSyncInfo is added 2013-02-08 11:16:18 +01:00
Miciele Ghiorghis
23b24f46fd Tim-connector: A new ROLE for job scheduler added 2013-02-08 11:16:18 +01:00
Miciele Ghiorghis
3ee39bcffe Tim-connector: Hibernate mapping file for JobSchedulerConfiguration 2013-02-08 11:16:16 +01:00
Miciele Ghiorghis
4ffd4e5b50 Tim-connector: Hibernate mapping file for AppProperties 2013-02-08 11:16:16 +01:00
Miciele Ghiorghis
f1762336ee Tim-connector: OrderSyncInfo entity 2013-02-08 11:16:16 +01:00
Miciele Ghiorghis
07c2ccaec9 Tim-connector: DAO for OrderSyncInfo
An implementation of the interface IOrderSyncInfoDAO
2013-02-08 11:16:16 +01:00
Miciele Ghiorghis
b459606e72 Tim-connector: Contract for OrderSyncInfo
An interface that OrderSyncInfoDAO implements.
2013-02-08 11:16:16 +01:00
Miciele Ghiorghis
8869325b60 Tim-connector: JobSchedulerConfiguration entity 2013-02-08 11:16:16 +01:00