Skip to content

Commit

Permalink
Merge pull request #377 from maximAtanasov/release_1.1.1
Browse files Browse the repository at this point in the history
Changed SHEET_INDEX in the UBWworkRecordsImporter
  • Loading branch information
maximAtanasov authored Nov 5, 2019
2 parents 73c7cc5 + 64dbbc6 commit 156ec54
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

public class UBWWorkRecordsImporter implements WorkRecordsImporter {

private static final int SHEET_INDEX = 2;
private static final int SHEET_INDEX = 6;

private static final int COLUMN_INVOICABLE = 11;
private static final int COLUMN_INVOICEABLE = 11;

private static final int COLUMN_DATE = 3;

Expand Down Expand Up @@ -96,11 +96,11 @@ public ExampleFile getExampleFile() {
Calendar maxCalendar = Calendar.getInstance();
Calendar maxineCalendar = Calendar.getInstance();
XSSFWorkbook workbook = new XSSFWorkbook(getClass().getResourceAsStream("/example_ubw_report.xlsx"));
XSSFSheet sheet = workbook.getSheetAt(2);
XSSFSheet sheet = workbook.getSheetAt(SHEET_INDEX);
XSSFRow row;
XSSFCell cell;
int col = 3;
int i = sheet.getLastRowNum();
int i = sheet.getLastRowNum()-2;

XSSFCellStyle style = workbook.createCellStyle();
style.setBorderBottom(BorderStyle.THIN);
Expand Down Expand Up @@ -178,7 +178,7 @@ boolean checkValidity(Workbook workbook) {
r.getCell(COLUMN_DATE).getStringCellValue().equals("Tag") &&
r.getCell(COLUMN_BUDGET).getStringCellValue().equals("Subgruppe") &&
r.getCell(COLUMN_HOURS).getStringCellValue().equals("Aufwand [h]") &&
r.getCell(COLUMN_INVOICABLE).getStringCellValue().equals("KV");
r.getCell(COLUMN_INVOICEABLE).getStringCellValue().equals("KV");
} catch (Exception e) {
isValid = false;
}
Expand Down Expand Up @@ -229,7 +229,7 @@ private ImportedWorkRecord parseRow(Row row, ImportFile file) throws ImportExcep
}

private boolean isImportable(Row row) {
return row != null && ("ja".equalsIgnoreCase(row.getCell(COLUMN_INVOICABLE).getStringCellValue()))
return row != null && ("ja".equalsIgnoreCase(row.getCell(COLUMN_INVOICEABLE).getStringCellValue()))
&& (row.getCell(COLUMN_BUDGET).getStringCellValue() != null)
&& (!"".equals(row.getCell(COLUMN_BUDGET).getStringCellValue().trim()))
&& (row.getCell(COLUMN_PERSON).getStringCellValue() != null)
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void testGetSkippedDataSets() throws Exception {
UBWWorkRecordsImporter importer = new UBWWorkRecordsImporter();
importer.importFile(new ImportFile("file.xslx", importer.getExampleFile().getInputStream()));
List<List<String>> skippedRecords = importer.getSkippedRecords();
assertEquals(37, skippedRecords.size());
assertEquals(38, skippedRecords.size());

assertEquals("file.xslx", skippedRecords.get(1).get(0));
}
Expand Down
Binary file modified budgeteer-ubw-importer/src/test/resources/demo_ubw_report.xlsx
Binary file not shown.
2 changes: 1 addition & 1 deletion budgeteer-web-interface/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ bootRun {
//'-Dspring.datasource.url=jdbc:hsqldb:file:../../database/budgeteer;shutdown=true;hsqldb.write_delay=false;',
'-Dspring.datasource.url=jdbc:hsqldb:mem:budgeteer',
//'-Dspring.datasource.url=jdbc:hsqldb:hsql://localhost/budgeteer',
//'-Dspring.datasource.driverClassName=org.hsqldb.jdbcDriver',
'-Dspring.datasource.driverClassName=org.hsqldb.jdbcDriver',
'-Dspring.datasource.username=sa',
'-Dspring.datasource.password=',
'-Dflyway.enabled=false',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ spring.jpa.properties.hibernate.id.new_generator_mappings=false

# FLYWAY (FlywayProperties)
flyway.baseline-on-migrate=true
flyway.baseline-version=1_0_9
flyway.baseline-version=1_1_0
flyway.check-location=true
flyway.enabled=true
flyway.locations=classpath:db/migration
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ file('gradle.d').listFiles().sort().each {
}

allprojects {
version = '1.1.0.BETA'
version = '1.1.1.BETA'
}

buildscript {
Expand Down

0 comments on commit 156ec54

Please sign in to comment.