Skip to content

Commit 67da0f9

Browse files
committed
Merge branch 'test-github-actions' of https://github.com/PublicisSapient/knowhow-processors into test-github-actions
2 parents 3d39409 + 5387c5b commit 67da0f9

File tree

22 files changed

+532
-19
lines changed

22 files changed

+532
-19
lines changed

.gitignore

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Gradle template
3+
.gradle
4+
build/
5+
6+
# Ignore Gradle GUI config
7+
gradle-app.setting
8+
9+
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
10+
!gradle-wrapper.jar
11+
12+
13+
### JetBrains template
14+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
15+
16+
*.iml
17+
18+
## Directory-based project format:
19+
.idea/
20+
# if you remove the above rule, at least ignore the following:
21+
22+
# User-specific stuff:
23+
# .idea/workspace.xml
24+
# .idea/tasks.xml
25+
# .idea/dictionaries
26+
27+
# Sensitive or high-churn files:
28+
# .idea/dataSources.ids
29+
# .idea/dataSources.xml
30+
# .idea/sqlDataSources.xml
31+
# .idea/dynamic.xml
32+
# .idea/uiDesigner.xml
33+
34+
# Gradle:
35+
# .idea/gradle.xml
36+
# .idea/libraries
37+
38+
# Mongo Explorer plugin:
39+
# .idea/mongoSettings.xml
40+
41+
## File-based project format:
42+
*.ipr
43+
*.iws
44+
45+
## Plugin-specific files:
46+
47+
# IntelliJ
48+
/out/
49+
50+
# mpeltonen/sbt-idea plugin
51+
.idea_modules/
52+
53+
# JIRA plugin
54+
atlassian-ide-plugin.xml
55+
56+
# Crashlytics plugin (for Android Studio and IntelliJ)
57+
com_crashlytics_export_strings.xml
58+
crashlytics.properties
59+
crashlytics-build.properties
60+
61+
62+
### Eclipse template
63+
*.pydevproject
64+
.metadata
65+
bin/
66+
tmp/
67+
*.tmp
68+
*.bak
69+
*.swp
70+
*~.nib
71+
local.properties
72+
.settings/
73+
.loadpath
74+
75+
# Eclipse Core
76+
# Eclipse Core
77+
.project
78+
79+
# External tool builders
80+
.externalToolBuilders/
81+
82+
# Locally stored "Eclipse launch configurations"
83+
*.launch
84+
85+
# CDT-specific
86+
.cproject
87+
88+
# JDT-specific (Eclipse Java Development Tools)
89+
.classpath
90+
91+
# PDT-specific
92+
.buildpath
93+
94+
# sbteclipse plugin
95+
.target
96+
97+
# TeXlipse plugin
98+
.texlipse
99+
100+
101+
### Java template
102+
*.class
103+
104+
# Mobile Tools for Java (J2ME)
105+
.mtj.tmp/
106+
107+
# Package Files #
108+
*.jar
109+
*.war
110+
*.ear
111+
112+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
113+
hs_err_pid*
114+
115+
116+
### Maven template
117+
target/
118+
pom.xml.tag
119+
pom.xml.releaseBackup
120+
pom.xml.versionsBackup
121+
pom.xml.next
122+
release.properties
123+
dependency-reduced-pom.xml
124+
buildNumber.properties
125+
.mvn/timing.properties
126+
127+
128+
### Grails template
129+
# .gitignore for Grails 1.2 and 1.3
130+
# Although this should work for most versions of grails, it is
131+
# suggested that you use the "grails integrate-with --git" command
132+
# to generate your .gitignore file.
133+
134+
# web application files
135+
/web-app/WEB-INF/classes
136+
137+
# default HSQL database files for production mode
138+
/prodDb.*
139+
140+
# general HSQL database files
141+
*Db.properties
142+
*Db.script
143+
144+
# logs
145+
/stacktrace.log
146+
/test/reports
147+
/logs
148+
/**/logs
149+
150+
# project release file
151+
/*.war
152+
153+
# plugin release files
154+
/*.zip
155+
/plugin.xml
156+
157+
# older plugin install locations
158+
/plugins
159+
/web-app/plugins
160+
161+
# "temporary" build files
162+
/target
163+
.DS*
164+
165+
/**/.pmd
166+
/**/.ruleset
167+
168+
application-local.properties
169+
customapi/test-output/
170+
171+
**/.factorypath
172+
173+
customapi/.eclipse-pmd
174+
175+
176+
# compiled output
177+
/**/dist
178+
/**/tmp
179+
/**/out-tsc
180+
/**/coverage
181+
/**/.scannerwork
182+
183+
184+
# dependencies
185+
/**/node_modules
186+
187+
# IDEs and editors
188+
.c9/
189+
*.sublime-workspace
190+
191+
# IDE - VSCode
192+
.vscode/*
193+
!.vscode/settings.json
194+
!.vscode/tasks.json
195+
!.vscode/launch.json
196+
!.vscode/extensions.json
197+
198+
# misc
199+
/**/.sass-cache
200+
/**/connect.lock
201+
/**/UI/libpeerconnection.log
202+
npm-debug.log
203+
yarn-error.log
204+
testem.log
205+
**/UI/typings
206+
207+
# System Files
208+
.DS_Store
209+
Thumbs.db
210+
package-lock.json
211+
212+
.github/CODEOWNERS

argocd/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</parent>
2727
<groupId>com.publicissapient.kpidashboard</groupId>
2828
<artifactId>argocd-processor</artifactId>
29-
<version>13.0.0-SNAPSHOT</version>
29+
<version>13.1.0-SNAPSHOT</version>
3030
<packaging>jar</packaging>
3131
<description>ArgoCD Processor</description>
3232
<scm>

azure-boards/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</parent>
2727
<groupId>com.publicissapient.kpidashboard</groupId>
2828
<artifactId>azure-processor</artifactId>
29-
<version>13.0.0-SNAPSHOT</version>
29+
<version>13.1.0-SNAPSHOT</version>
3030
<description>Azure processor fetches data from Azure api</description>
3131
<scm>
3232
<tag>4.6.1</tag>

azure-boards/src/main/java/com/publicissapient/kpidashboard/azure/client/azureissue/ScrumAzureIssueClientImpl.java

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import java.time.format.DateTimeFormatter;
2424
import java.util.ArrayList;
2525
import java.util.Arrays;
26+
import java.util.Collections;
2627
import java.util.HashMap;
2728
import java.util.HashSet;
2829
import java.util.LinkedHashSet;
@@ -153,8 +154,8 @@ public int processesAzureIssues(ProjectConfFieldMapping projectConfig, String pr
153154

154155
Map<String, LocalDateTime> startTimesByIssueType = new HashMap<>();
155156

156-
maxChangeDatesByIssueType
157-
.forEach((k, v) -> startTimesByIssueType.put(k, v.minusMinutes(azureProcessorConfig.getMinsToReduce())));
157+
maxChangeDatesByIssueType.forEach(
158+
(k, v) -> startTimesByIssueType.put(k, v.minusMinutes(azureProcessorConfig.getMinsToReduce())));
158159

159160
int pageSize = azureAdapter.getPageSize();
160161

@@ -390,6 +391,7 @@ public int saveAzureIssueDetails(List<Value> currentPagedAzureRs, ProjectConfFie
390391

391392
// ADD Production Incident field to feature
392393
setProdIncidentIdentificationField(fieldMapping, issue, azureIssue, fieldsMap);
394+
setLateRefinement188(fieldMapping, azureIssue, fieldsMap);
393395

394396
setIssueTechStoryType(fieldMapping, issue, azureIssue, fieldsMap);
395397

@@ -1209,4 +1211,50 @@ private void saveExecutionTraceLog(ProcessorExecutionTraceLog processorExecution
12091211
processorExecutionTraceLog.setExecutionEndedAt(System.currentTimeMillis());
12101212
processorExecutionTraceLogService.save(processorExecutionTraceLog);
12111213
}
1214+
1215+
private void setLateRefinement188(FieldMapping fieldMapping, JiraIssue azureIssue, Map<String, Object> fieldsMap) {
1216+
azureIssue.setUnRefinedValue188(null);
1217+
if (!isCustomFieldCriteriaValid(fieldMapping, fieldsMap)) {
1218+
return;
1219+
}
1220+
1221+
String azureValue = fieldsMap.get(fieldMapping.getJiraRefinementByCustomFieldKPI188().trim()).toString();
1222+
if (StringUtils.isBlank(azureValue)) {
1223+
azureIssue.setUnRefinedValue188(Collections.singleton("No Value"));
1224+
return;
1225+
}
1226+
1227+
Set<String> customFieldSet = Arrays.stream(azureValue.toLowerCase().split("\\s+")).collect(Collectors.toSet());
1228+
if (StringUtils.isNotEmpty(fieldMapping.getJiraRefinementMinLengthKPI188())
1229+
&& CollectionUtils.isNotEmpty(customFieldSet)) {
1230+
int i = Integer.parseInt(fieldMapping.getJiraRefinementMinLengthKPI188());
1231+
if (customFieldSet.size() >= i
1232+
&& CollectionUtils.isNotEmpty(fieldMapping.getJiraRefinementKeywordsKPI188())) {
1233+
Set<String> fieldMappingSet = fieldMapping.getJiraRefinementKeywordsKPI188().stream()
1234+
.map(String::toLowerCase).collect(Collectors.toSet());
1235+
if (!checkKeyWords(customFieldSet, fieldMappingSet)) {
1236+
// when fields are not matching then we will set values
1237+
azureIssue.setUnRefinedValue188(customFieldSet);
1238+
}
1239+
}
1240+
} else {
1241+
azureIssue.setUnRefinedValue188(customFieldSet);
1242+
}
1243+
1244+
}
1245+
1246+
private static boolean checkKeyWords(Set<String> stringSet, Set<String> fieldMappingSet) {
1247+
for (String keyword : fieldMappingSet) {
1248+
if (!stringSet.contains(keyword.toLowerCase())) {
1249+
return false;
1250+
}
1251+
}
1252+
return true;
1253+
}
1254+
1255+
private boolean isCustomFieldCriteriaValid(FieldMapping fieldMapping, Map<String, Object> fieldsMap) {
1256+
return StringUtils.isNotEmpty(fieldMapping.getJiraRefinementCriteriaKPI188())
1257+
&& CommonConstant.CUSTOM_FIELD.equalsIgnoreCase(fieldMapping.getJiraRefinementCriteriaKPI188())
1258+
&& fieldsMap.get(fieldMapping.getJiraRefinementByCustomFieldKPI188().trim()) != null;
1259+
}
12121260
}

azure-boards/src/main/java/com/publicissapient/kpidashboard/azure/client/metadata/MetaDataClientImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,10 @@ private FieldMapping mapFieldMapping(Map<String, List<String>> issueTypeMap, Map
271271
fieldMapping.setStoryFirstStatusKPI171(firstStatusList.get(0));
272272
fieldMapping.setStoryFirstStatusKPI148(firstStatusList.get(0));
273273
fieldMapping.setJiraDefectCreatedStatusKPI14(firstStatusList.get(0));
274+
fieldMapping.setJiraStatusKPI187(firstStatusList);
274275
} else {
275276
fieldMapping.setStoryFirstStatus(CommonConstant.OPEN);
277+
fieldMapping.setJiraStatusKPI187(firstStatusList);
276278
fieldMapping.setStoryFirstStatusKPI171(CommonConstant.OPEN);
277279
fieldMapping.setStoryFirstStatusKPI148(CommonConstant.OPEN);
278280
fieldMapping.setJiraDefectCreatedStatusKPI14(CommonConstant.OPEN);

0 commit comments

Comments
 (0)