Skip to content

Commit

Permalink
improved the code time comp
Browse files Browse the repository at this point in the history
  • Loading branch information
TangoBeeAkto committed Dec 18, 2024
1 parent e1e8d45 commit c1ae78a
Showing 1 changed file with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ public String createIssue() {

BasicDBObject reqPayload = new BasicDBObject();
jiraIntegration = JiraIntegrationDao.instance.findOne(new BasicDBObject());
if(jiraIntegration == null) {
addActionError("Jira is not integrated.");
return ERROR.toUpperCase();
}
BasicDBObject fields = jiraTicketPayloadCreator(jiraMetaData);

reqPayload.put("fields", fields);
Expand Down Expand Up @@ -397,16 +401,13 @@ public String bulkCreateJiraTickets (){
Filters.in("_id", issuesIds),
Filters.exists("jiraIssueUrl", true)
));
for(TestingIssuesId testingIssuesId : issuesIds) {
TestingRunIssues issue = null;
for(TestingRunIssues testingRunIssues : testingRunIssuesList) {
if(testingIssuesId.equals(testingRunIssues.getId())) {
issue = testingRunIssues;
break;
}
}
Set<TestingIssuesId> testingRunIssueIds = new HashSet<>();
for (TestingRunIssues testingRunIssues : testingRunIssuesList) {
testingRunIssueIds.add(testingRunIssues.getId());
}

if(issue != null && (issue.getJiraIssueUrl() != null || !issue.getJiraIssueUrl().isEmpty())) {
for(TestingIssuesId testingIssuesId : issuesIds) {
if(testingRunIssueIds.contains(testingIssuesId)) {
existingIssues++;
continue;
}
Expand Down

0 comments on commit c1ae78a

Please sign in to comment.