Skip to content

Commit

Permalink
Hope
Browse files Browse the repository at this point in the history
  • Loading branch information
CuddlyBunion341 committed Jan 14, 2025
1 parent 2dc2073 commit 3ff3989
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/helpers/timer_sessions_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ def issue_information(issue)
subject = issue.subject
issue_information = issue.id.to_s

truncated_subject = subject[0..(MAX_SUBJECT_LENGTH - issue_information.length)] if subject.length > MAX_SUBJECT_LENGTH
truncated_subject = subject if subject.length <= MAX_SUBJECT_LENGTH
truncated_subject = truncated_subject[0..(MAX_SUBJECT_LENGTH - issue_information.length)] if truncated_subject.length > MAX_SUBJECT_LENGTH
truncated_subject = truncated_subject if truncated_subject.length <= MAX_SUBJECT_LENGTH
truncated_subject = subject[0..(MAX_SUBJECT_LENGTH - issue.project.name.length - issue_information.length)]

[
issue_information,
"[#{issue.project.name}] #{truncated_subject}#{subject_label_trail(subject)}"
Expand Down

0 comments on commit 3ff3989

Please sign in to comment.