Using ExtractString to pull Issue Key Prefix

I have Issue Keys with varying lengths of prefixes such as ABCD-123, or ABCDEF-123. How can I use the ExtractString command to pull the prefix to the left of the dash ‘-’?

I would like ABCD-123 and ABCDEF-123 to return ABCD and ABCDEF.

Any help using this command would be appreciated


Hi @jeffscudder,

Yes, you may extract the project key part from the issue key using the function ExtractString().
In this case, you might want to capture the first (^ in front of the string) literar word (\w) of the string like this:

  [Measures].[<property or measure containing issue key>],

There are more details on regular expressions in calculations and reference to the documentation for Java regular expressions where are more examples:

Zane /