Skip to content

Commit

Permalink
Merge pull request #15 from q-rapids/issue54
Browse files Browse the repository at this point in the history
Added activity 'Altres' to PRT connector
  • Loading branch information
marcoriol authored May 30, 2023
2 parents 60ac18c + 89bc3ea commit 1bb47bd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.fhg.iese</groupId>
<artifactId>qrapids-connect</artifactId>
<version>2.1</version>
<artifactId>qrapids-connect-sheets</artifactId>
<version>1.1</version>
<name>Q-Rapids Kafka connectors</name>
<description>Connectors for jenkins, jira, sonarcube, svn, and redmine</description>

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/connect/sheets/googlesheets/SheetsSchema.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class SheetsSchema {
public static final String GP_HOURS = "gp_hours";
public static final String DOC_HOURS = "doc_hours";
public static final String PRES_HOURS = "pres_hours";
public static final String ALT_HOURS = "alt_hours";



Expand All @@ -51,5 +52,6 @@ public class SheetsSchema {
.field(GP_HOURS, Schema.OPTIONAL_FLOAT64_SCHEMA)
.field(DOC_HOURS, Schema.OPTIONAL_FLOAT64_SCHEMA)
.field(PRES_HOURS, Schema.OPTIONAL_FLOAT64_SCHEMA)
.field(ALT_HOURS, Schema.OPTIONAL_FLOAT64_SCHEMA)
.build();
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ private IterationInformation generateImputationInformation(final String sprintNa
Double gph = information.get(7).toString().contains(",") ? Double.parseDouble(information.get(7).toString().replace(",", ".")) : Double.parseDouble(information.get(7).toString());
Double doh = information.get(8).toString().contains(",") ? Double.parseDouble(information.get(8).toString().replace(",", ".")) : Double.parseDouble(information.get(8).toString());
Double ph = information.get(9).toString().contains(",") ? Double.parseDouble(information.get(9).toString().replace(",", ".")) : Double.parseDouble(information.get(9).toString());
Double ah = information.get(10).toString().contains(",") ? Double.parseDouble(information.get(10).toString().replace(",", ".")) : Double.parseDouble(information.get(10).toString());
return new IterationInformation(teamId)
.teamName(teamName)
.spreadsheetId(spreadSheetId)
Expand All @@ -147,7 +148,8 @@ private IterationInformation generateImputationInformation(final String sprintNa
.desHours(dh)
.gpHours(gph)
.docHours(doh)
.presHours(ph);
.presHours(ph)
.altHours(ah);
}
private List<IterationInformation> generateImputationInformations(final List<ValueRange> googleSheetsData) {
ArrayList<IterationInformation> iterationInformations = new ArrayList<>();
Expand Down Expand Up @@ -242,6 +244,7 @@ private SourceRecord getSheetSourceRecord(IterationInformation iterationInformat
imputationSchema.put(SheetsSchema.GP_HOURS, iterationInformation.gpHours());
imputationSchema.put(SheetsSchema.DOC_HOURS, iterationInformation.docHours());
imputationSchema.put(SheetsSchema.PRES_HOURS, iterationInformation.presHours());
imputationSchema.put(SheetsSchema.ALT_HOURS, iterationInformation.altHours());

String key = iterationInformation.sprintName() + " - " + iterationInformation.developerName();

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/model/sheets/IterationInformation.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,6 @@ public class IterationInformation {
private Double docHours;

private Double presHours;

private Double altHours;
}

0 comments on commit 1bb47bd

Please sign in to comment.