You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I'm not sure if this is the right place to suggest a UI feature request.
Hoping to have a list view option in the Metrics section inside the component under the Overview page.
Card and List views will suffice.
The reason is that when a component will have multiple metrics added, it will be difficult to see all the metrics because you have to scroll down the page.
Another feature would be to have a Status section where it will show if the metric passed/failed a scorecard.
An option to disconnect predefined metrics will be nice to have as well. Currently, this is not possible.
Is it also possible to allow metrics to accept a string value? Like a status Up/Down or Succeeded/Failed.
Here's the sample UI.
Thanks Andrew. I appreciate your response.
Can we forward non-numerical data to a custom field using REST API via cURL the same way with metrics?
Is there a limit of metrics that can be connected to a component because it is not allowing me to connect the 26th metric.
Not via REST unfortunately, accessing custom fields requires using our GraphQL API. updateComponent is what you're after. There's obviously a tradeoff between GraphQL and REST in terms of efficiency/power vs simplicity — does using GraphQL work for your situation, or is it important to have a REST API?
Yes, there was a soft limit of 25 metrics. Today we lifted that limit to 50 though! :D
Thanks for increasing the metrics limit.
Can you share a sample GraphQL query that puts a string value to a custom field?
Hi there Garyl!
I'd be happy to help you out with some sample GraphQL formats. If possible though, would you mind giving us your thoughts about the existing API documentation? Is it confusing or are there any pain points that make it hard for users to put together a sample query?
We're always looking to improve and feedback is greatly valuable for us!
Here is the updateComponent mutation though!
mutation updateComponentCustomField($input: UpdateCompassComponentInput!) { compass { updateComponent(input: $input) { success errors { message extensions { statusCode errorType } } componentDetails { id name customFields { definition { id name } ...on CompassCustomTextField { textValue } } } } } }
and the corresponding input:
{ "input": { "id": "<component_id>", "customFields": [{ "textField": { "definitionId": "<definition_id>", "textValue": "<my_value>" } }] } }
You'll want to replace the brackets + anything in them with your own data of course.
If you're looking for your component's id, here are some steps you can follow:
And if you need some help getting your custom field definition's id, here is a query for you:
query getComponentCustomFields($id: ID!) { compass { component(id: $id) { ... on QueryError { identifier message extensions { statusCode errorType } } ... on CompassComponent { id name customFields { definition { id name } } } } } }
and its input:
{ "id": "<component_id>" }
Thank you for this. Appreciate it.
As a newbie to GraphQL it is very difficult for me to follow the documentation.
For example "updateComponent". I don't see "updateComponentCustomField" in the documentation.
Is there a GraphQL component query that will pull the metricSourceId of a specific metric name within a component?
I tried to look into your documentation and can't find it. https://developer.atlassian.com/cloud/compass/graphql/#queries_component