Commit graph

665 commits

Author SHA1 Message Date
Jeroen Baten
c764b09575 i18n: Add Norwegian Bokmal language to enum and modify pom.xml to use English userguide 2015-04-01 15:23:08 +02:00
Oscar Gonzalez Fernandez
b0d8bf4629 Upgrade Hibernate version
Move to a Hibernate version compatible with Jahira. When running with
Java 8 an exception was caused when initializing the session factory.

java.lang.NoSuchMethodError: org.hibernate.engine.jdbc.spi.JdbcServices.getConnectionProvider()Lorg/hibernate/engine/jdbc/connections/spi/ConnectionProvider;
at org.jadira.usertype.spi.shared.AbstractUserTypeHibernateIntegrator.use42Api(AbstractUserTypeHibernateIntegrator.java:80)
2014-05-07 01:05:16 +02:00
Oscar Gonzalez Fernandez
f27bc7dffc Upgrade to Spring 4.0.3 version
This is the latest stable version available.
2014-05-06 21:16:43 +02:00
Oscar Gonzalez Fernandez
2c7246f868 Remove uses of @NotTransactional
@NotTransactional is deprecrated and in the next major Spring version
is removed.
2014-05-06 21:16:00 +02:00
Oscar Gonzalez Fernandez
7b54a5063e Upgrade Spring to 3.2.8 and Hibernate to 4.2.8
Now Libreplan can be run on Java8.

This implied some changes:

* Latest versions of hibernate use the Bean Validation API. This
  implied renaming the imports and use ConstraintViolationException
  instead of InvalidValue. Besides some constraints had to be renamed,
  otherwise they wouldn't be recognized by Hibernate validation. In
  the new version of Hibernate validator @AssertTrue can only be
  applied to properties. So all methods it was applied to must follow
  the is.* format.

  Automatic execution of Bean Validation API is disabled, otherwise an
  infinite loop would happen. This is because there are some
  validation constraints that do launch queries to the database. This
  causes a flush of the objects in the session and automatic
  validation is called again.

* A new library for persisting JodaTime is necessary since
  joda-time-hibernate is incompatible with hibernate 4. This library
  can automatically register its types for Date conversion so they're
  removed from configuration.

* Now, in some places, an InvalidDataAccessApiUsageException is thrown
  instead of a DataIntegrityViolationException.

  This is because no constraint is violated, the API is being used
  incorrectly because a transient instance is being provided where a
  persisted one was expected.

* In hibernate 4 listeners cannot be configured via properties.
  HibernateDatabaseModificationsListener registers itself in its @PostConstruct method.

* ehcache classes used are now different.
2014-05-06 17:47:15 +02:00
Oscar Gonzalez Fernandez
4633da0140 Upgrade schema files for Spring configuration 2014-05-01 00:53:09 +02:00
Oscar Gonzalez Fernandez
368cbb7fa0 Reorder dependencies in libreplan-business/pom.xml
Follow the order defined in top pom.xml
2014-05-01 00:53:09 +02:00
Oscar Gonzalez Fernandez
bc675c7332 Upgrade Spring version 2014-04-30 20:04:32 +02:00
Oscar Gonzalez Fernandez
80f6f6e0cf Make tests independent of tests order execution
When changing JUnit and Spring version the test failed because of the
different order execution.
2014-04-29 20:15:03 +02:00
Oscar Gonzalez Fernandez
db7ef145a1 Improve test to avoid spurious errors 2014-04-20 18:18:47 +02:00
Oscar Gonzalez Fernandez
18b187fad8 Declare transaction declaratively
Use @Transactional attribute instead of opening transaction manually.
2014-04-20 17:57:42 +02:00
Jeroen Baten
e4b2f5783d Batch of changed english strings, including in po files 2014-03-26 12:36:00 +01:00
miciele Ghiorghis
9f15fecaea project-margins-and-status: added methods to calculate the workhours and budget with the specified margin for the project 2014-03-10 18:39:00 +01:00
miciele Ghiorghis
a8680adcb6 project-margins-and-status: two properties(hoursMargin and budgetMargin) are added to the Order object
The properties are added to hold the project's hours and budget margins
2014-03-10 18:39:00 +01:00
miciele Ghiorghis
3dc79c01cb project-margins-and-status: two columns(hours_margin and budget_margin) are added to the order-table 2014-03-10 18:39:00 +01:00
miciele Ghiorghis
917cf6005f project-margins-and-status: hoursMargin and budgetMargin fields added 2014-03-10 18:38:59 +01:00
Lorenzo Tilve Álvaro
a8eefaaa29 Modified automatic budget cell calculations and rearranged report
The manually introduced budget cell will be representing the total
amount for the budget on that item, and the expenses cell will
show the difference between that total and the resources costs
for the task hours and required criteria.

FEA: ItEr77S17AutomaticBudgeting
2013-07-31 19:57:33 +02:00
Lorenzo Tilve Álvaro
50a6f91b1a Modified calculations for the total column when automatic budgeting enabled
The budget cell will represent the total available budget, and the calculated
read-only total, will be the result of substracting the consumed budget due
to the hours and cost categories of the assinged task criteria.

FEA: ItEr77S17AutomaticBudgeting
2013-07-05 02:22:45 +02:00
Lorenzo Tilve Álvaro
48b29cc6aa Fixed wrong not-null restriction on Criterion to CostCagegory hibernate definition
FEA: ItEr77S17AutomaticBudgeting

This is also fixing the broken test on CriterionDAO
2013-06-20 16:30:04 +02:00
Lorenzo Tilve Álvaro
629f235823 Fixed problems in the algorithm when having criteria both on requirements and hours group
FEA: ItEr77S17AutomaticBudgeting
2013-06-19 12:38:16 +02:00
Lorenzo Tilve Álvaro
37858bb491 Implemented method to obtain criterion cost on HourCostDAO
FEA: ItEr77S17AutomaticBudgeting

Several components were using Criteria collections not initialized on the
planning state, so when adding dinamically new CriterionRequirements
or HourGroups the group hours were not attached.
2013-06-19 12:35:36 +02:00
Lorenzo Tilve Álvaro
b65c34382f Fixes on the resources budget calculation algorithm
FEA: ItEr77S17AutomaticBudgeting
2013-06-19 12:34:11 +02:00
Lorenzo Tilve Álvaro
a10f37d390 Added restriction to avoid deletion of costCategories assigned to criterion
FEA: ItEr77S17AutomaticBudgeting
2013-06-14 10:10:17 +02:00
Lorenzo Tilve Álvaro
4b5586d126 Modified ProjectStatusReport to include the Hours Budget column
FEA: ItEr77S17AutomaticBudgeting
2013-06-13 18:12:22 +02:00
Lorenzo Tilve Álvaro
4baa93d790 Moved criteria based budget calculation methods to OrderElement to use them from the OrderCRUD
FEA: ItEr77S17AutomaticBudgeting
2013-06-13 18:12:21 +02:00
Lorenzo Tilve Álvaro
5df152a9bd Implemented initial version for the budget calculation algorithm
FEA: ItEr77S17AutomaticBudgeting
2013-06-13 18:12:21 +02:00
Lorenzo Tilve Álvaro
25e45b65e8 Included new column for the calculated budget to the WBS
FEA: ItEr77S17AutomaticBudgeting
2013-06-13 18:12:21 +02:00
Lorenzo Tilve Álvaro
15883806f5 Added to configuration class accessors for automatic budget properties
FEA: ItEr77S17AutomaticBudgeting
2013-06-13 18:12:21 +02:00
Lorenzo Tilve Álvaro
024f30ab0b Included in the interface new settings to enable automatic budgeting and the type of hour to use on it
FEA: ItEr77S17AutomaticBudgeting
2013-06-13 18:12:21 +02:00
Lorenzo Tilve Álvaro
98f01f9824 Added database changes to store Criterion to CostCategory relationship
FEA: ItEr77S17AutomaticBudgeting
2013-06-13 18:12:15 +02:00
Lorenzo Tilve Álvaro
2b520e0733 Created new liquibase changelog file for 1.4 version
FEA: ItEr77S17AutomaticBudgeting
2013-06-13 13:38:47 +02:00
Lorenzo Tilve Álvaro
852eae4281 Defined persistence for the relationship between criteria and cost category
FEA: ItEr77S17AutomaticBudgeting
2013-06-06 19:19:32 +02:00
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