youngmon/atlassian-qna huggingface dataset:
Deployment Frequency Metric - How to populate from GitLab
Asked by robbie_kohler:

Hi, I connected to GitLab to Compass and I see metrics for the following:

* Build Success Rate
* Pull Request Cycle Time
* Build Time
* Open Pull Requests

<br />

It shows "Deployment Frequency" as having "no events" though. Is there something specific that needs to be configured on the GitLab CI side for the project to automatically know when deployments are going to Production?


Answers:
author: Steffen Opel _Utoolity_
body: Hi [@robbie_kohler](/t5/user/viewprofilepage/user-id/1607182), and welcome to the Atlassian Community!

The sibling GitHub app documents a fairly advanced GitHub [environment name mapping](https://developer.atlassian.com/cloud/compass/integrations/integrate-Compass-with-GitHub/#github-environment-name-mapping) to infer the environment type.

* NB: The Compass UI annoyingly still only supports staging and production environment types, even though the API supports more, see my answer to [Cannot see development environment for Compass component](https://community.atlassian.com/t5/Compass-questions/Re-Cannot-see-development-environment-for-Compass-component/qaq-p/2405027/comment-id/277#M277)).

This kind of documentation is missing for the GitLab app, but without being an active GitLab user myself, there seems to be the concept of [environment tiers](https://developer.atlassian.com/cloud/compass/integrations/integrate-Compass-with-GitHub/#github-environment-name-mapping), which are indeed used in the GitLab app's source code, see e.g. [mapEnvTierToCompassDeploymentEnv](https://github.com/atlassian-labs/gitlab-for-compass/blob/e1b780784a4ebf1b027d1e963e3b4a02b256b1c7/src/services/deployment.ts#L33):

```
export const mapEnvTierToCompassDeploymentEnv = (env: EnvironmentTier): CompassDeploymentEventEnvironmentCategory => {

  switch (env) {
    case EnvironmentTier.PRODUCTION:
      return CompassDeploymentEventEnvironmentCategory.Production;

    case EnvironmentTier.STAGING:
      return CompassDeploymentEventEnvironmentCategory.Staging;

    case EnvironmentTier.TESTING:
      return CompassDeploymentEventEnvironmentCategory.Testing;

    case EnvironmentTier.DEVELOPMENT:
      return CompassDeploymentEventEnvironmentCategory.Development;

    case EnvironmentTier.OTHER:

    default:
      return CompassDeploymentEventEnvironmentCategory.Unmapped;

  }
};
```

Accordingly, you can probably make the events show up when you ensure that your GitLab environments have either the staging or production tier.

Good luck!
Basic Users can't see metrics
Asked by paul.graves:

I'm setting up Compass for my organisation and have added compass.yml files to a number of repos so that certain metrics from Github automatically appear on each components page (open PRs, build time, etc).

As an Admin user I can see these fine, but I've set up most users in my org as Basic users. For some reason Basic users can only see the "Component Readiness" card on each page and none of the metrics.

From the pricing page, it would see that Basic users should be able to view all the metrics. I was planning to add many users both technical and non-technical and use Compass as the source of truth for our platforms components, engineering health etc. If everyone needs to be a full user then pricing-wise this isn't going to be an option.

So my question is, should Basic users be able to see all the metrics on a Components page?


Answers:
author: Alie Sesay
body: Hey Paul, and welcome to the community!

Since Basic users are primarily catalog consumers with limited permissions, they don't have access to view any metrics, whether **predefined/built-in** or **custom** metrics.

![Screenshot 2024-08-13 at 11.16.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/341470i5A339CC4EDA178BC/image-size/large?v=v2&px=999 "Screenshot 2024-08-13 at 11.16.jpg")

\* Reference: [Compass user roles](https://developer.atlassian.com/cloud/compass/getting-started/understand-user-roles-in-Compass/)

I hope this clarifies things! Please feel free to reach out if you need any further assistance.

<br />

Best regards,  
Alie
Changes related to specific module in a mono repo using compass.yml file
Asked by kiran_kantrathi:

Hi,  

I have a single repository on bitbucket which has sub modules for a projct. I would like to see code changes i.e., commits specific to the sub module on compass components activity. I have followed the below documentation to manage multiple components using config as code in a single repo.   

<https://developer.atlassian.com/cloud/compass/config-as-code/manage-components-with-config-as-code/>  

However, after adding compass.yml files in sub module in different commits, I see the same metrics for all components as well as the activity such as commits and deployments.   

But, I would like to see the same metrics and activities specific to the sub module, so that I can easily identify what changes are being done for each module as I have added different compass.yml files in different sub modules in a single repo.   

Here is one of the compass.yml file added to one of the sub modules. I have added the id after creating component through compass.yml. Is there anything I am doing wrong here. Thanks in advance for your help.   

```
configVersion: 1
name: dms-search
id: 'ari:cloud:compass:61623334-7326-4601-ae4e-7c8035c74bdd:component/0ebafb6b-9df8-47cf-931e-64ee8a16172e/28f1af45-e78d-4df8-b922-d1c02430e3ee'
description: This is a dms-search component in Compass.
typeId: SERVICE
fields:
  tier: 1
  lifecycle: Active
links:
  - name: My Jira project
    type: PROJECT
    url: 'https://plevenn.atlassian.net/browse/PPLM'
  - name: Service repository
    type: REPOSITORY
    url: 'https://bitbucket.org/plevenn-plm/dms/src/main/dms-search/'
labels:
  - foo:bar
  - baz
customFields: []
```


Answers:
author: Michelle Carr
body: Same Issue here


author: kiran_kantrathi
body: Hello @Compass,  

Could you please look into it question and reply back? We have recently subscribed to Compass components and now I have a road block here. I would be great if I can have some quick reply here.
Compass training
Asked by visby8em:

How do i learn about Compass and how to use it?

Is there any online training available?


Answers:
author: Tushar Gohel
body: Hello [@visby8em](/t5/user/viewprofilepage/user-id/3565089)

There no online training available but there are learning resources that you can use.

<https://www.atlassian.com/software/compass/resources>

<https://ace.atlassian.com/events/details/atlassian-live-learning-presents-get-started-with-compass-march-2024-cohort/>

Thanks,

Tushar
Integrate Compass components in Team-Managed Project
Asked by kiran_kantrathi:

I have a team-managed project created on Jira to monitor the project workflow. What I was understood from Jira is, we can use Jira components or Compass components only with in the company-managed projects. But, I would like to integrate my compass components with my team-managed project. It would be great, if there is any ideal way to do.   

So, here is what I am trying to achieve. I have a bitbucket repo which has sub modules of spring boot application. I would like to create an individual compass component for each sub module, then I can link my Jira issues by simply selecting the corresponding component within the Jira ticket. In this way, I would be easily manage what all Jira tickets are linked to the respective sub modules with in a single repository. I may also create different versions for different components. Currently, I don't see such option on the compass components. I am able to create new components, and for the exisiting repos on bitbucket, those components have been created automatically after I subscribed to the compass components.   

It would be really grateful if there is any way to achieve this one or I am missing anything in the existing features on both Jira Components or Compass Components to achieve my goal.


Answers:
author: Katie Silver
body: Hi [@kiran_kantrathi](/t5/user/viewprofilepage/user-id/5520043) , there isn't a way to do this today I'm afraid. However I am collecting feedback like this so we can prioritize it in the future, and I'll add you to the list. I'm hoping we can do it soon, but at present I can't commit to a timeline.

comments: author: Quan Vo
body: Hi [@Katie Silver](/t5/user/viewprofilepage/user-id/641274) , this type of request was raised from 2019 like this one <https://jira.atlassian.com/browse/JSWCLOUD-17601>

Why does it take you and the Atlassian team so long to prioritize the needs of many people and companies?


author: Joao Santos
body: hello [@Katie Silver](/t5/user/viewprofilepage/user-id/641274) any update on this? it is really important if you want us to use compass,..
Can we assign a Compass component to an individual instead of a team
Asked by Matt Richards:

It appears as though Compass components can only be assigned to teams. Is it possible to assign them to individual users?


Answers:
author: Dave Rosenlund _Trundl_
body: Hi, [@Matt Richards](/t5/user/viewprofilepage/user-id/5202592). As far as I know, the answer is no. Everything is spelled out in [this document](https://developer.atlassian.com/cloud/compass/components/assign-and-update-a-components-owner/).

Sorry to be the bearer of bad news,

-dave

comments: author: Matt Richards
body: Thanks for the clarification. Bummer!


author: Jonathan Appel
body: [@Matt Richards](/t5/user/viewprofilepage/user-id/5202592) not an ideal workaround but you could create teams of 1. ?

comments: author: Matt Richards
body: Yeah, that's what we are going to do, and we'll use the name of the individual for the team name. Ridiculous that we have to go about it this way, but typical of Atlassian.
Import from Jira not showing anything even though Jira is connected to Gitlab
Asked by Suzanne Cooley:

We have a self hosted Gitlab instance which is connected to our Jira instance.  

I've done the ['before you begin' steps from this article](https://developer.atlassian.com/cloud/compass/components/import-components-from-repositories-linked-to-Jira/#before-you-begin) and I see repos showing in the code section of my project in Jira. ![Screenshot 2024-06-04 105217.png](https://community.atlassian.com/t5/image/serverpage/image-id/327807iAA9848D679CF1C5F/image-size/large?v=v2&px=999 "Screenshot 2024-06-04 105217.png")  

However, when I click 'Import from Jira' in Compass, I get the following: ![Screenshot 2024-06-04 105039.png](https://community.atlassian.com/t5/image/serverpage/image-id/327806iFC91682430862224/image-size/large?v=v2&px=999 "Screenshot 2024-06-04 105039.png")

Does Compass not recognize self-hosted Gitlab repos in Jira? Or is there something else I'm doing wrong?


Answers:
author: Josh_Unito
body: Hi [@Suzanne Cooley](/t5/user/viewprofilepage/user-id/4931709), you're right - Compass doesn't support self-hosted repos in Jira. So you're not doing anything wrong! I found this in [an Atlassian developper doc](https://developer.atlassian.com/cloud/compass/components/import-components-from-GitLab/):
> *only GitLab.com SaaS/cloud hosted instances are supported, we do not currently support self-managed GitLab instances*

If you're looking for an alternative solution for connecting a self-hosted GitLab to Jira though, I can recommend [Unito's integration for Jira GitLab](https://bit.ly/ATL-KB-JiraGitLab). Here's a [guide to setting up the self-hosted server](https://bit.ly/ATL-GitLabOnPrem) to sync GitLab with Unito.

If this was a helpful answer, please don't forget to accept it as the solution!

Thanks,

Josh

comments: author: Josh_Unito
body: [@john smith](/t5/user/viewprofilepage/user-id/5501932) I just wrote this guide on [how to import issues from Jira to GitLab](https://bit.ly/ATL-GitLab-Jira-Guide) with Unito's 2-way integration.

It should be pretty clear, but let me know if it's not!

1. [Sign up for Unito](https://bit.ly/UnitoSignUp) (comes with a free trial!)
2. Create a flow (a no-code integration)
   1. Connect your GitLab and Jira accounts
   2. Set a flow direction (Unito can automatically create issues in GitLab based on your issues in Jira and vice versa)
   3. Apply rules (point and click interface to set conditions: e.g., only sync issues from Jira to GitLab with the XYZ label or issue status)
   4. Link fields (choose exactly which fields you need to sync between Jira and GitLab)
   5. Launch!

Feel free to reach out with any questions
Configuring a monolith
Asked by Jordan Stone:

We have a monolithic application in a single repository that we are breaking into modules. I reflected some of these modules in Compass as services and included links to the subdirectories for these modules, however it appears all of the metrics are scoped to the repository and not to the subdirectory within the repository. Is there a way to scope these metrics (e.g. only show open PRs that contain files in the subdirectory) or do we need everything in its own repository to take advantage of the metrics capabilities of Compass?


Answers:
author: Jonathan Appel
body: Sounds like you have a monorepo. A few others have asked similar questions but no clear direction yet.

1. <https://community.atlassian.com/t5/Compass-questions/Support-for-monorepos/qaq-p/2350062>
2. <https://community.atlassian.com/t5/Compass-questions/How-can-I-disable-derived-metrics/qaq-p/2645416>

comments: author: Jordan Stone
body: Thanks Jonathan; seems like Compass just doesn't support this use case.
Compass Components and JSM "Operations" Services in "new" JSM
Asked by Ken Young:

Hi All,

I am wondering if there is any changes (current or upcoming) in how Compass Components and JSM (Operations/Affected) Services interact with OpsGenie being folded into JSM. We haven't been upgraded because we are currently using JSM/OpsGenie, but I am wonder if there have been any changes that would effect their use, and possibly Automation opportunities. Thx


Answers:
author: Katie Silver
body: Hey [@Ken Young](/t5/user/viewprofilepage/user-id/4596309) , we're working out the details of this now. When we are closer to releasing the on call and alerting functionality in Compass, I'll make sure to update here.

comments: author: Ken Young
body: Thanks [@Katie Silver](/t5/user/viewprofilepage/user-id/641274) . I think I misread a different document and though a new feature had rolled out.. I thought I read if a "App Service" component was created in JSM, a Component was automatically created in Compass--- possibly thinking there had been a change with how the GitHub integration will now dynamically create a component when a new GitHub repo is created.

Thx


Tags: jira-service-management

service
Component not disconnected after removing compass.yml from GitHub repository
Asked by Luca Ferretti:

I followed the guide\[1\] to disconnect a couple of component from linked GitHub repositories, but the components are still "managed" by config-as-code and keep to fetch updates from github integration.

I tried to re-add the compass.yml file in the repo and remove it again, but with no success.

Any idea? The component in Compass seems "locked" in some weird state, but there is no way to apply any change.

\[1\] <https://developer.atlassian.com/cloud/compass/config-as-code/disconnect-managed-components-from-config-as-code/>


Answers:
author: Kelvin T
body: Hello [@Luca Ferretti](/t5/user/viewprofilepage/user-id/5494282)

I hope you are doing great. This is Kelvin from the Compass Support Team. Thanks for your question.

In order to further check this issue, I opened a ticket for you.

Please let me know if you have any questions.

Thank you!
How can we visualize the start and end times of deployment?
Asked by matthew wilson:

We've initiated the process of incorporating deployment information into Compass, aiming to generate a visualization in a component's activity timeline akin to the one depicted below on the Compass site. This visualization features the commencement and conclusion of a deployment delineated by a green line.

I've attempted two methods to achieve this, both without success. Initially, I endeavored to utilize the 'startedAt' and 'completedAt' timestamps within the deployment event in the JSON payload, specifically when the state was 'SUCCESSFUL'. Additionally, I experimented with sending two distinct events: one denoting the state 'IN PROGRESS' with the 'lastUpdated' timestamp indicating the start time, and another event denoting the state 'SUCCESSFUL' with the 'lastUpdated' timestamp marking the completion time. However, it appears that only the conclusion time is being recorded, represented by a single solid green tick, rather than a line connecting the two points as illustrated in the visualization below.

Could you advise if there's an aspect I might be overlooking?

Thanks,  
Matthew


Answers:
author: Alastair Wilkes
body: Hey Matthew - sorry, but your image(s) didn't come through. Can you try adding them again?
Details on predefined metrics
Asked by Spencer Robertson:

I am trying to figure out how the predefined metrics are calculated against a Github repo and haven't been able to find any documentation on the subject.

Ive managed to make some best guesses on some of the metrics but would be quite nice to have some extra documentation , specifically on how to set them up, best practises and how they are actually calculated. (I also think this could be helpful for peole making custom metrics, having a baseline on which data is being brought in)

I.E. Deployment time vs Build time:

My guess is this calculates the time for a workflow to finish, and the only difference is if one of the workflows is tagged as "environment: production" then it goes under the Deployment time metric?

Any help, or links to documentation please?


Answers:
author: Alastair Wilkes
body: Hi Spencer, thanks for your question!

Build time and deployment time are derived from build and deployment events sent from GitHub via the GitHub/Compass integration. More details are here:

<https://developer.atlassian.com/cloud/compass/integrations/integrate-Compass-with-GitHub/#supported-metrics>

You're correct that the integration looks for the environment tag to detect deployment events. The link above goes into this in a bit more detail.

You can see more info about other predefined metrics here: <https://developer.atlassian.com/cloud/compass/components/available-predefined-metrics/>

For the most part, you shouldn't *have* to do much to get things set up if you're using the out of the box integration (except check the environment name for deployments, as you pointed out). Let me know if you have any other questions!

Alastair

comments: author: Spencer Robertson
body: Most of the metrics worked but was just struggling to see how they were generated to "fine tune" them (turns out some of our workflows had incorrect enviroment tags so the metrics were being thrown off)

This page really helped <https://developer.atlassian.com/cloud/compass/integrations/integrate-Compass-with-GitHub/#supported-metrics>. Thanks for that!


Tags: metric
Automatic assignment based on components
Asked by Matthias Moll:

Using the old Jira components, issues are automatically assigned to the component lead of the component which is assigned to the issue. How is this dealt with using compass components? Are issues automatically assigned to team leads?


Answers:
author: YY Brother
body: Hi [@Matthias Moll](/t5/user/viewprofilepage/user-id/5103209)

Welcome to our Community.

I think you've asked a good question. I just tried it and we may need an automation rule to implement issue's auto assignment:

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/322083i6BBDEA60A8E8CE1A/image-size/large?v=v2&px=999 "image.png")

Hope it helps.

Thanks,

YY?


author: Matthias Moll
body: Thank you for the reply. Surely you can do everything (a lot) with automation. I could solve it by:

- create a custom field to the compass component defineing the 'default assignee'

- introduce a post function after creation of an issue type which assigns the issue automatically to the default assignee of the first compass component which is assigned to the issue

However, this would be more complex than working with the "old" components. I don't want to introduce new tooling that makes things more complicated that were previously simple. Does anyone have any other ideas?


Tags: assign
Linked Jira tickets not displayed in Goals
Asked by Janne Magnusson:

In Atlas Goals I link Jira issues but once added I cannot see the links anymore.

In the upper part of the picture below I added a Jira Epic to the Goals and it seems ok. But notice that "Contributing Jira issues" say 3, while only the recently added are displayed.

After moving to another section and going back to the same page the link to the Epic has diapered (lower part of below picture).

When looking at the issues in Jira I can see the link to Goals.

My objective is to find a way to track work in Jira at a higher level using Atlas Goals or Projects with links to multiple issues in Jira.

Any advice would be appreciated.

![Atlas_Jira.png](https://community.atlassian.com/t5/image/serverpage/image-id/334259i28FF3896E87F1DC4/image-size/large?v=v2&px=999 "Atlas_Jira.png")


Answers:
author: Carlos Garcia Navarro
body: Hi [@Janne Magnusson](/t5/user/viewprofilepage/user-id/5539452) ,

Welcome to the Community! I'm trying to reproduce this issue and it's working for me. I added a few Jira epics linked to Goals and they consistently appear in the 'Jira' tab under the Goals section. Is this issue still happening? What browser are you using? Can you please check with a different browser? Are other users experiencing the same issue? Thanks,

comments: author: Janne Magnusson
body: Hi [@Carlos Garcia Navarro](/t5/user/viewprofilepage/user-id/1031232)

Thanks for your reply. I've tested again in Chrome and Edge, same result. One of my colleges also tested with the same result.

/Janne


Tags: goals
While using Jira API to attach a file to an existing issue getting 500 Internal server error.
Asked by jporinchukutty:

Hi,

I am trying to use Jira API to attach a file to the issues we created by calling below AP

rest/api/3/issue/{Issue ID}/attachments

While doing so in postman getting 500 error, not sure what is the actual issue.

Please guide.


Answers:
author: jporinchukutty
body: Able to resolve the issue in Postman right now, modified content type as below and it worked.

Content-Type - multipart/form-data; boundary=\<calculated when request is sent\>

Thanks


author: Fernando Eug?nio da Silva
body: [@jporinchukutty](/t5/user/viewprofilepage/user-id/5541696) , Welcome to the Atlassian Community!

Have you added the special header: **X-Atlassian-Token: no-check**?

The documentation about add attachment in Jira mention this special header to be included in your REST API call: [The Jira Cloud platform REST API (atlassian.com)](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-rest-api-3-issue-issueidorkey-attachments-post)

Also generally 500 errors are associated with not being able to call the application server, check if you are using the entire url complete with the HTTPS protocol

comments: author: jporinchukutty
body: Thanks [@Fernando Eug?nio da Silva](/t5/user/viewprofilepage/user-id/4606715) ,

I do provide **X-Atlassian-Token: no-check,**but still same error, URL as well same, able to call other api's for get and put.

Please suggest for any other chance for this error code in postman.

Thanks


Tags: jira-api