Hello,
I try to create a button on bitbucket pull request overview page using ScriptRunner, but for some reason it doesn’t appears.
This button should open additional custom form.
My actions are:
Menu from step #2 [custom web item]:
My environment:
Atlassian Bitbucket v7.17.10
ScriptRunner version: 6.55.1
Chrome Version 106.0.5249.91 (Official Build) (64-bit)
P.s: I also try to follow adaptavist documentation, but the pictures are missing: https://docs.adaptavist.com/sr4bib/6.55.1/features/script-fragments/web-item
Code for myTestForm.groovy file [just for the test]
import com.atlassian.bitbucket.repository.RefService
import com.atlassian.bitbucket.repository.Repository
import com.atlassian.bitbucket.repository.ResolveRefRequest
import com.atlassian.sal.api.component.ComponentLocator
import com.onresolve.scriptrunner.parameters.annotation.RepositoryPicker
import com.onresolve.scriptrunner.parameters.annotation.ShortTextInput
import static com.atlassian.bitbucket.repository.StandardRefType.BRANCH
@RepositoryPicker(label = "Repository", description = "Enter the repository name")
Repository repository
@ShortTextInput(label = "Branch", description = "Enter the branch name")
String branchName
def refService = ComponentLocator.getComponent(RefService)
refService.resolveRef(new ResolveRefRequest.Builder(repository).with {
type(BRANCH)
refId("refs/heads/${branchName}")
}.build())
Can you assist please?
Thanks! Tamir
@Tamir.Kucherov did you ever figure this out?
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.