Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Report annotations order ?

Romain T_ November 3, 2022

Hello,

I submit my annotations in bulk and in a specific order.

Unfortunately when they are displayed in the report they are in an order that doesn't make sense (not alphabetically, not by their id, not in the order I sent them in...)
It makes it very hard to read them, as you jump from one thing to another without any context.

Is there a way to force their order ? Thanks!

1 answer

1 accepted

0 votes
Answer accepted
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 27, 2022

Hi @Romain T_,

Thank you for reaching out to the community.

For me to further check, would it be possible for you to confirm how exactly you've submitted annotations in bulk?
Are you using an API and/or scripting at the moment?
If yes, could you please provide the API endpoint you're using?

Looking forward to your response.

Regards,
Mark C

Romain T_ November 28, 2022

Hello!

I'm just using the WEB API endpoint

https://api.bitbucket.org/2.0/repositories/$Env:BITBUCKET_REPO_OWNER/$Env:BITBUCKET_REPO_SLUG/commit/$Env:BITBUCKET_COMMIT/reports/$ReportId/annotations
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 4, 2022

Hi @Romain T_,

Thank you for that information.

I checked this on our end with the help of our developers as well.
Unfortunately, viewing code insight reports on Bitbucket Cloud UI doesn't allow you to sort/order the result.
For that, I went ahead and created a feature request for it that can be located through this link. - https://jira.atlassian.com/browse/BCLOUD-22301
You can upvote and watch it for now so that you'll be notified of any updates from our team when the feature becomes available on Bitbucket Cloud.
Please do note that we don't have an exact ETA for the feature request as all new features will be implemented according to our policy here.

As a workaround, you can get code insight annotations report via the GET API endpoint below where you can pass the parameter ?sort=summary which will sort the result in ascending order. However, you can add a hyphen to reverse the sorting. (e.g. ?sort=-summary)
API sorting for reference: https://developer.atlassian.com/cloud/bitbucket/rest/intro/#filtering

curl -u bbusername:app_pasword "https://api.bitbucket.org/2.0/repositories/workspace_id/repo_name/commit/COMMIT_HASH/reports/REPORT_ID/annotations?sort=summary"

Please note that you'll need to use your Bitbucket Cloud username and an App password for authentication here.

Do let me know if you have further questions that I can help with.

Regards,
Mark C

Like Romain T_ likes this
Romain T_ December 5, 2022

Thank you for looking in this and creating the issue, I've voted for it then :)

Like Mark C likes this
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 5, 2022

Hi @Romain T_,

Glad to know you've voted for the feature request.

Do let me know if you have further questions that I can help with and feel free to mark this question as answered as well.

Regards,
Mark C

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events