Jira integration

Authentication

Bugsee supports both Basic Authentication (login/password) as well as OAuth when integrating with Jira. Basic is much easier to set up, it doesn't not require one to be an administrator of Jira to set up OAuth on the Jira end. It might, however, be considered less secure. In either case we strongly advise to create a special user in your Jira with limited scope and access.

Setting up OAuth

Navigate to Administration area of your JIRA dashboard and open "Application links" in "Application" section:

Administration area

Put Bugsee URL into "Application" field and click "Create new link". Use the following URL:

https://app.bugsee.com

After clicking "Create new link" button JIRA will bring you the following dialog:

Configure application URL

Ignore the warning and click "Continue".

JIRA will bring you next dialog:

Link applications

Fill application name field with the value that uniquely identifies Bugsee integration. Also don't forget to check "Create incoming link". When done click "Continue".

Finally, you will see the following dialog:

Link application keys

Supply Bugsee for both Consumer Name and Consumer Key and paste the following into public key:

-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCm9MCEVvMRwTGC+9lNrmWWhD03
UnSIPsxrLVVak700hZaV+hUgM8d7vNxx+C5640eFqHNOaba5FuveXr7JTXM9lCDf
te4pqldj59/lELQjjS9Y6uRk33TlJfJhDrUncNjMmYU0oviciLf29bobRDVa9aYb
VLy6zImCFbJfPz1qbwIDAQAB
-----END PUBLIC KEY-----

Once Jira end is ready to accept OAuth calls, start Bugsee integration wizard, chose OAuth and enter your Jira URL. You will be redirected to Jira and asked to grant Bugsee permissions:

Grant permissions

After completing this step, another screen will appear and will present you with a verification code:

Verification code

Copy the code, close the window and enter the code into Bugsee wizard to continue.

Custom recipes

Jira is very customizable, fields can be made mandatory, new fields can be added, issue types, priorities and other default types can be changed. Bugsee can accomodate all these customizations with the help of custom recipes. This section provides a few examples of using custom recipes specifically with Jira. For basic introduction, refer to custom recipe documentation.

Setting components field

function fields(context) {
    // ....

    return {
        // ...
        custom: {
            // This example sets component by its ID
            components: [{id: "12345"}]
        }
    };
}

Setting default priority for crashes

function fields(context) {
    const issue = context.issue;

    return {
        // ...
        custom: {
            // Lets override the priority only for crashes and leave it untouched otherwise 
            priority: (issue.type == 'crash') ? { id: "12345" } : undefined
        }
    };
}

Changing issue type for crashes

function fields(context) {
    const issue = context.issue;

    return {
        // ...
        custom: {
            // Lets override the issuetype only for crashes and leave it untouched otherwise 
            issuetype: (issue.type == 'crash') ? { id: "12345" } : undefined
        }
    };
}

Changing default assignee for an issue

function fields(context) {
    const issue = context.issue;

    return {
        // ...
        custom: {
            // All the bugs will go to 'joe' and all the crashes to 'jane' 
            assignee: (issue.type === 'crash') ? { name: "jane" } : { name: "joe" }
        }
    };
}

Setting version for an issue

function fields(context) {
    const issue = context.issue;
    const app = context.app;

    return {
        // ...
        custom: {
            // We use default Jira versions field, which is an array of available version in jira.
            // Important: This assumes the version with that name is already created in Jira prior to first issue
            // being reported, otherwise integration will break.
            versions : [ 
                {
                    name : app.version
                }
            ],
            // To store the build number, we have a custom field created in Jira, so lets store it there
            customfield_10308 : app.build
        }
    };
}