I've found the answer and would like to share it with the community.
First, the page should depend on
If you want to show this dialog from standard search page or view issue page, then this dependency has already been included.
In my case I have a custom page and my own web-resource with my button, so I've just added this dependency to the web-resource.
Second, need to know the ID of the issue.
And finally, the code:
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG