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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can you concatenate strings in scriptrunner JQL query?

I have a merge check I am trying to setup that prevents a merge from happening if the target branch does not match a field found in an associated JIRA Issue.

I am using the "Require that a pull request is associated with a valid JIRA issue" merge check that comes with scriptrunner and am also using the following JQL which almost gives me what I want.

Target_Baseline ~ '${mergeRequest.pullRequest.toRef.displayId}

Target_Baseline is a free text custom field in JIRA. The problem is that the right side of the equation evaluates to something slightly different than the left (shown below) and it fails the check and does not allow the merge

v1.0.0 ~ 'v1.0.0T'

that extra T at the end of the target branch is throwing a wrench in things. Is there any way to manually concatenate a string to the end of the Target_Baseline or perhaps even remove that character from the target branch?

Any and all help is appreciated!

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

2,581 views 1 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you