Skip to content

Commit

Permalink
fix(jira): Fix project ojn single page task
Browse files Browse the repository at this point in the history
  • Loading branch information
with-shrey committed May 30, 2024
1 parent 0f14456 commit 11e51c8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
.idea/
5 changes: 3 additions & 2 deletions src/content/atlassian.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ const getDescription = (issueNumberElement) => () => {
};

function getProject () {
console.log('getProject')
const project = '';
let projectElement;

Expand All @@ -126,8 +127,8 @@ function getProject () {
}
}

projectElement = $('[data-test-id="issue.views.issue-base.foundation.breadcrumbs.breadcrumb-current-issue-container"]');

projectElement = $('[data-test-id="issue.views.issue-base.foundation.breadcrumbs.breadcrumb-current-issue-container"]') || $('[data-testid="issue.views.issue-base.foundation.breadcrumbs.project.container"]')
console.log({ projectElement })
if (projectElement) {
const projectWrapper = projectElement.parentElement.querySelector('a[href*="browse"] span + span');
return projectWrapper ? projectWrapper.textContent.trim() : '';
Expand Down

0 comments on commit 11e51c8

Please sign in to comment.