Anyway to scrub a jql fragment?

I’ve got a field where the user puts in a jql fragment. Is there any way for me to convert the labels to the values when available?

I’m looking for 2 cases:

  1. Where the user puts in a project name - ie. project=“My project” - “My project” should be 10001 (the project id).
  2. Where the user puts in a custom field. ie. “Daniel’s field”=“foo” - “Daniel’s field” should be customfield_12333

I found but it’s experimental, only available for admin apps (we’re not) and still lets the labels through if an app has access to the real value.

Any pointers?



Probably best is to scrub it yourself, you can compare the displayNames of the outputs from and replace them for #2 and for #1 write a regex that will find the project = or project IN statements and replace the values according to

From my own experience, getting the regex right is quite tricky