jira-integration: Fix bug if comment length is lower than max length
If the comment length is lower than the max length of the DescriptionField, then it's not needed to truncate it. FEA: ItEr77S16JiraAndTimConnectorContributionIntegration
This commit is contained in:
parent
d736a512ec
commit
eea2ace0cc
1 changed files with 5 additions and 1 deletions
|
|
@ -245,7 +245,11 @@ public class JiraTimesheetSynchronizer implements IJiraTimesheetSynchronizer {
|
|||
private void updateOrCreateDescriptionValuesAndAddToWorkReportLine(WorkReportLine workReportLine,
|
||||
String comment) {
|
||||
DescriptionField descriptionField = workReportType.getLineFields().iterator().next();
|
||||
comment = comment.substring(0, descriptionField.getLength() - 1);
|
||||
|
||||
Integer maxLenght = descriptionField.getLength();
|
||||
if (comment.length() > maxLenght) {
|
||||
comment = comment.substring(0, maxLenght - 1);
|
||||
}
|
||||
|
||||
Set<DescriptionValue> descriptionValues = workReportLine
|
||||
.getDescriptionValues();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue