Skip to content

Commit

Permalink
EPMRPP-97211 || BTS ticket tooltip. Show status only if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
AmsterGet committed Dec 9, 2024
1 parent d7ecfc0 commit 7ddf7e7
Showing 1 changed file with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const messages = defineMessages({
},
});

const isResolved = (status) => status.toUpperCase() === STATUS_RESOLVED;
const isResolved = (status = '') => status.toUpperCase() === STATUS_RESOLVED;
const getStorageKey = (activeProject) => `${activeProject}_tickets`;

const FETCH_ISSUE_INTERVAL = 900000; // min request interval = 15 min
Expand Down Expand Up @@ -186,14 +186,18 @@ export class IssueInfoTooltip extends Component {
<Fragment>
<h4 className={cx('header')}>{formatMessage(messages.issueSummaryTitle)}</h4>
<p className={cx('content')}>{issue.summary}</p>
<h4 className={cx('header')}>{formatMessage(messages.issueStatusTitle)}</h4>
<p
className={cx('content', {
resolved: isResolved(issue.status),
})}
>
{issue.status}
</p>
{issue.status && (
<>
<h4 className={cx('header')}>{formatMessage(messages.issueStatusTitle)}</h4>
<p
className={cx('content', {
resolved: isResolved(issue.status),
})}
>
{issue.status}
</p>
</>
)}
</Fragment>
) : (
<Fragment>
Expand Down

0 comments on commit 7ddf7e7

Please sign in to comment.