Issue Extra Message

Introduction

Issue Extra Message (iem to follow) aims to allow users to associate personalized information with Jira issues. The behavior of the plugin is similar to that of the comments: for each issue, users can insert "extra texts"; these texts are shown in a dedicated tab. Thus, the messages enjoy greater visibility than comments.

Use case: my company uses SVN but does not intend to adopt the related JIRA plugins. These, in fact, require a SVN user to connect to its repository. For internal policy, you do not want to create "robotic users" on SVN. The solution could be to add, manually or with the use of some REST API, a comment with the list of files that you have changed. The problem with this approach is that the svn comments "get lost" amid the standard comments.
Jira Issue Extra Message allows you to keep svn-messages separate from standard comments.
If the comments were initially entered through a script, with iem it should be sufficient to change the URL called by the script: the body format of the iem request, in fact, is equivalent to that of the comments.

Usage

Jira Issue Extra Message has its own administration area. From this area, it is possible to indicate

  • projects on which to activate the iem functions
  • operational roles that can be of two types:
    • reading: users have the right to read the messages in the iem sections
    • writing: users who are entitled to add iem messages

In this example, the iem features are active for the "Scrum Project" project (SCRUM project key) only. Users who can view and write iem messages are those belonging to the Developers role of the indicated projects.

The iem permissions are not "alternative" to those of jira:

  • to have read permissions on iem, the roles indicated must (obviously) have rights to "browse projects".
  • to have write permissions on iem, the roles indicated must have to "add comment" rights.

Users with read permission (read role) of iem messages, will have a new tab in the "activity" section of the single issue.

Iem messages are also visible from JIRA SW boards.

For each message you will see also

  • the author
  • date and time of insertion


Comments are shown sorted by descending adding date (most recent first).

REST

There are 3 REST calls supported:

  • GET message list
  • GET single message
  • POST (add) a new message

GET message list

Method
Url
GET/rest/iemessage/1.0/message/{issueKey}

Possible responses

  • STATUS 401 - ( html )
    • not logged user (standard JIRA)
  • STATUS 403 - ( application/json )
    • not valid license
    • missing plugin configuration
    • project not configured in the admin panel
    • user disabled 
    • missing "browse project" permission for the user
    • user who does not belong to a role with "read role" permission in the admin panel
  • STATUS 404 - ( application/json )
    • issue key not found
    • wrong issue key format
  • STATUS 200 - ( application/json )

    • if ok, returns the message list (not paginated)

      {
          "startAt": 0,
          "maxResults": -1,
          "total": 2,
          "messages": [
              {
                  "body": "In girum imus nocte et consumimur igni",
                  "id": 65,
                  "created": "2018-07-18T12:48:23.917+0200",
                  "updated": "2018-07-18T12:48:23.917+0200",
                  "author": {
                      "self": "http://localhost/rest/api/2/user?username=john.smith",
                      "name": "john.smith",
                      "displayName": "John Smith",
                      "active": true
                  },
      			"updateAuthor": {
                      "self": "http://localhost/rest/api/2/user?username=john.smith",
                      "name": "john.smith",
                      "displayName": "John Smith",
                      "active": true
                  },
                  "self": "http://localhost/rest/iemessage/1.0/message/SCRUM-2/65"
              },
              {
                  "body": "1. Lorem ipsum dolor sit amet ....",
                  "id": 33,
                  "created": "2018-07-18T09:16:48.387+0200",
                  "updated": "2018-07-18T09:16:48.387+0200",
                  "author": {
                      "self": "http://localhost/rest/api/2/user?username=admin",
                      "name": "admin",
                      "displayName": "admin",
                      "active": true
                  },
      			"updateAuthor": {
                      "self": "http://localhost/rest/api/2/user?username=admin",
                      "name": "admin",
                      "displayName": "admin",
                      "active": true
                  },
                  "self": "http://localhost/rest/iemessage/1.0/message/SCRUM-2/33"
              }
          ]
      }


GET Single message

Method
Url
GET/rest/iemessage/1.0/message/{issueKey}/{messageId}

Possible responses

  • STATUS 401 - ( html )
    • not logged user (standard JIRA)
  • STATUS 403 - ( application/json )
    • not valid license
    • missing plugin configuration
    • project not configured in the admin panel
    • user disabled 
    • missing "browse project" permission for the user
    • user who does not belong to a role with "read role" permission in the admin panel
  • STATUS 404 - ( application/json )
    • issue key not found
    • wrong issue key format
  • STATUS 500 - ( application/json )
    • wrong messageId
  • STATUS 200 - ( application/json )

    • if ok, returns single message in json format

      {
          "body": "In girum imus nocte et consumimur igni",
          "id": 65,
          "created": "2018-07-18T12:48:23.917+0200",
          "updated": "2018-07-18T12:48:23.917+0200",
          "author": {
              "self": "http://localhost/rest/api/2/user?username=john.smith",
              "name": "john.smith",
              "displayName": "John Smith",
              "active": true
          },
      	"updateAuthor": {
              "self": "http://localhost/rest/api/2/user?username=john.smith",
              "name": "john.smith",
              "displayName": "John Smith",
              "active": true
          },
          "self": "http://localhost/rest/iemessage/1.0/message/SCRUM-2/65"
      }


POST (add) a new message

Method
Url
POST/rest/iemessage/1.0/message/{issueKey}

In the POST body you must pass the body value (json format)

{
    "body": "In girum imus nocte et consumimur igni"
}

In the POST header you must add a "Content-Type: application/json" header

Possible responses

  • STATUS 401 - ( html )
    • not logged user (standard JIRA)
  • STATUS 403 - ( application/json )
    • not valid license
    • missing plugin configuration
    • project not configured in the admin panel
    • user disabled 
    • missing "browse project" permission for the user
    • missing "add comment" permission for the user
    • user who does not belong to a role with "write role" permission in the admin panel
  • STATUS 404 - ( application/json )
    • issue key not found
    • wrong issue key format
  • STATUS 500 - ( application/json )
    • problem saving the message
  • STATUS 200 - ( application/json )

    • if ok, returns single message just added in json format

      {
          "body": "In girum imus nocte et consumimur igni",
          "id": 99,
          "created": "2018-08-01T13:39:59.639+0200",
          "updated": "2018-08-01T13:39:59.639+0200",
          "author": {
              "self": "http://localhost/rest/api/2/user?username=john.smith",
              "name": "john.smith",
              "displayName": "John Smith",
              "active": true
          },
          "updateAuthor": {
              "self": "http://localhost/rest/api/2/user?username=john.smith",
              "name": "john.smith",
              "displayName": "John Smith",
              "active": true
          },
          "self": "http://localhost/rest/iemessage/1.0/message/SCRUM-1/99"
      }

Release

VersionDateNotes
1.0.0 RC2

2018/09/18

First release of the plugin