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 attempting to use the feature called out in the Bitbucket Server 6.6 release notes to suggest changes directly in pull requests, via the suggestion block syntax.
Given the following in a pull request (as a trivial example):
val first = pair.first
val second = pair.second
I want to make a suggestion to replace both these lines with
```suggestion
val (first, second) = pair
```
however, I'm not finding any information on how to make it clear that this suggestion should be applied to both of the source lines.
I've used a similar feature in GitLab pull requests, and was able to provide an argument to indicate (say I clicked on the line containing the second line in the example given) - I don't recall the exact syntax, but something like `suggestion-2+1`. Is there any syntax like this that will allow multi-line snippets of code to be changed directly in a pull request via this feature?
Hi @Kajsa Anderson the multiline suggestions are not yet supported by Bitbucket. What you can do is to try to add suggestions to both lines individually.
We do have a feature request for adding support for multiline suggestions: https://jira.atlassian.com/browse/BSERV-12219
You can vote on that ticket and add yourself as a watcher.
Thanks,
Maciej
So in the example I gave, would that require commenting on the first line with an empty suggestion?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, the first suggestion would update the first line and an empty suggestion like this one below would remove the second line:
```suggestion
```
Here is the example
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is highly annoying for code suggestions that are more than 2-3 lines long.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the multiline suggestions are not yet supported by Bitbucket
And when it will be?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Most of the time I have to use multi line suggestions. so this is unusable for me. But glad that it is in progress and will be available soon.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.