Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.
/ sonar Public archive

Service for showing Slack status in Jira

License

Notifications You must be signed in to change notification settings

essentialkaos/sonar

Important

This project is discounted. You can try to use it as is or fork it.

InstallationContributingLicense


Sonar is a utility for showing user Slack status in Atlassian Jira.

Screenshots

Sonar Preview Sonar in Jira 6.x (with Remixed Theme)

Installation

sudo yum install -y https://pkgs.kaos.st/kaos-repo-latest.el$(grep 'CPE_NAME' /etc/os-release | tr -d '"' | cut -d':' -f5).noarch.rpm
sudo yum install sonar

Slack app

Create classic Slack App (this application requires RTM and can't work with socket mode due to lack of presence events).

Add next OAuth scopes to your app:

  • dnd:read
  • users:read

Integration with Jira

Go to atlassian-jira/WEB-INF/classes/templates/plugins/userformat and modify next files.

actionProfileLink.vm

<a $!{userHoverAttributes} id="$!{id}" href="${baseurl}/secure/ViewProfile.jspa?name=${velocityhelper.urlencode($username)}">${renderedAvatarImg} ${author}</a><img class="slack-status" src="https://sonar.domain.com/status.svg?token=YOUR_TOKEN_HERE&mail=$user.emailAddress" />

profileLinkWithAvatar.vm

${textutils.htmlEncode($fullname)}<img class="slack-status" src="https://sonar.domain.com/status.svg?token=YOUR_TOKEN_HERE&mail=$user.emailAddress" />

avatarFullNameHover.vm

$textutils.htmlEncode($fullname)
<img class="slack-status" src="https://sonar.domain.com/status.svg?token=YOUR_TOKEN_HERE&mail=$user.emailAddress" />

Then restart your Jira instance.

Also, you can add sonar.js to your announcement banner for a periodic status update.

Contributing

Before contributing to this project please read our Contributing Guidelines.

License

Apache License, Version 2.0