You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Join now to unlock these features and more
We are trying to reproduce a scenario where we are trying to create a user ID with the format below:
The users we have created so far have the format
which is working as part of a custom Jira workflow solution with ScriptRunner. However, the script fails when the user ID format changes as above.
Please help so that we can create user IDs with the above format, reproduce the scenario, and fix our solution.
Thank you for your question.
If your string is always the same number of characters and you need to add separator characters at certain points, then you could use the Groovy Substring method to take the user Id generated string and generate sub-strings of each group of characters.
You could finally join all the strings back together, adding in the separator characters required to ensure you get the string into the format which you require.
I hope this helps,