Skip to content

Commit

Permalink
refactor: change in jira issue title
Browse files Browse the repository at this point in the history
  • Loading branch information
TangoBeeAkto committed Dec 16, 2024
1 parent a501666 commit 81c5d1e
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,15 @@ public String createIssue() {
BasicDBObject fields = new BasicDBObject();

String endpoint = jiraMetaData.getEndPointStr().replace("Endpoint - ", "");
String lastPartOfEndpoint = endpoint.length() > 30 ? endpoint.substring(endpoint.length() - 30) : endpoint;
String truncatedEndpoint = endpoint;
if(endpoint.length() > 30) {
truncatedEndpoint = endpoint.substring(0, 15) + "..." + endpoint.substring(endpoint.length() - 15);
}

String endpointMethod = jiraMetaData.getTestingIssueId().getApiInfoKey().getMethod().name();

// issue title
fields.put("summary", "Akto Report - " + jiraMetaData.getIssueTitle() + " - " + lastPartOfEndpoint);
fields.put("summary", "Akto Report - " + jiraMetaData.getIssueTitle() + " (" + endpointMethod + " - " + truncatedEndpoint + ")");
jiraIntegration = JiraIntegrationDao.instance.findOne(new BasicDBObject());

// issue type (TASK)
Expand Down

0 comments on commit 81c5d1e

Please sign in to comment.