Challenge

Improve the app https://bitbucket.org/atlassian/forge-risk-assessment-custom-field/src/master/ so it would co-exist with SoftComply Risk Manager (RMC).

This app has simple RISK class value if the Risk Assessment field is edited. Now we would like you to improve the app so it checks if RMC has same risk class value available in this project.

 

Prerequisites:

  1. Atlassian ID i.e. Atlassian account.

  2. JS dev environments (node, npm available).

  3. Simple forge knowledge - https://developer.atlassian.com/platform/forge/getting-started/

  4. Just a Jira Software dev instance. Get Jira - http://go.atlassian.com/cloud-dev

 

How it should work

  1. Create new forge app in forge cli. Use https://developer.atlassian.com/platform/forge/build-a-hello-world-app-in-jira/

  2. You just need app key from developer console -

    1. This key you can assign to the code you can download on next step.

  3. Get the app!

  4. Get Jira - http://go.atlassian.com/cloud-dev and install RMC there!

  5. Build and deploy the forge app and see how it originally works.

  6. Add your code.

    1. To call SC backend api you need authorization token.

      1. import * as jwt from 'atlassian-jwt'; import moment from 'moment'; export const token = (subject, issuer, secret) => { const now = moment().utc(); const tokenData = { sub: subject, iss: issuer, iat: now.unix(), // The time the token is generated exp: now.add(3, 'minutes').unix(), // Token expiry time (recommend 3 minutes after issuing) qsh: 'context-qsh', // [Query String Hash]() }; const token = jwt.encodeSymmetric(tokenData, secret); return token; };
    2. RMC backend can be found at https://risk-server.softcomply.net/api/projects/RISK/matrix/riskClasses


Other useful links: