Skip to content

Commit

Permalink
fix(jira): Fix timer descriptions in Jira
Browse files Browse the repository at this point in the history
The DOM changed, so we were no longer getting the issue title.
  • Loading branch information
tcrammond authored and shantanuraj committed Jun 3, 2019
1 parent fe7b3ec commit 4e36c6f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/scripts/content/atlassian.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ togglbutton.render(

// Title/summary of the issue - we use the hidden "edit" button that's there for a11y
// in order to avoid picking up actual page title in the case of issue-list-pages.
titleElement = $('#jira-frontend h1 ~ button[aria-label]');
titleElement = document.querySelector('h1 ~ button[aria-label]');

if (issueNumberElement) {
description += issueNumberElement.textContent.trim();
}

if (titleElement) {
if (titleElement && titleElement.previousSibling) {
if (description) description += ' ';
description += titleElement.textContent.trim();
description += titleElement.previousSibling.textContent.trim();
}

return description;
Expand Down

0 comments on commit 4e36c6f

Please sign in to comment.