Is it possible to control how Releases are named?

Monica Brazelton
Contributor
March 20, 2024

Hello community!

I'm wondering if it's possible to control how Releases are named.

I've looked at documentation and forum posts and have not seen anything that would, for example, allow a user in a certain project role/group to create a Release named "Parking Lot" but disallow that same user to create a Release named "15 Global".

I'd be fine hardcoding the disallowed Release names, since there aren't too many for my use case.

Does anyone know if this is possible with out-of-the-box Jira, or with a widely-used Jira plugin like Scriptrunner?

Thank you in advance for any suggestions or insight!

3 answers

1 vote
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 27, 2024

Hi Monica,

I can not see a way to do this on Cloud or DC with Scriptrunner.  This is because you can't do it in Jira.  There's no way to inject anything into the "create version" (or "release version") process, you would need to amend the screens at the beginning of the process to enable them to validate what was being put into the field before the user creates it (or not let them commit a release with a bad name)

The closest you could get is what Stephen suggests (I can't see why his automation doesn't work) - catch the create event in a listener and tell someone that someone has created a version with a bad name.  With SR, you could also rename the new version, but you'd have to write quite a lot of "work out what to call it" code.

 

Monica Brazelton
Contributor
April 3, 2024

Thanks for your response @Nic Brough -Adaptavist- , I really appreciate it. I'm on Jira Cloud, apologies for not including that in my original post.

See my response to Stephen below - I was able to create a rule that sent an email notification when a version with a certain word in the name was created, but I couldn't find a way to reference the version URL, or who created it, or what project it was created in from the notification email. This left me with a notification that didn't actually help me track down that version!

Do you have any ideas around a way to reference the newly-created version's URL, creator, or project in an email?

Thanks again for your reply.

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 3, 2024

You should be able to construct a URL to the version's configuration page - using https://aclsandbox.atlassian.net/projects/ANHBUPNIC/versions/10117/tab/release-report-all-issues as the basics, I think you can use  {{issue.fixVersion.id }} to replace the id I've got in there (10117.  And, obviously, change the base URL too)

That would at least give the mail recipient a link they can click through to so they can quickly edit the name.

0 votes
Verity Blake -Adaptavist-
Atlassian Partner
March 26, 2024


Hi @Monica Brazelton I’m sure this is something we’ve heard ScriptRunner customers ask before and I believe @Nic Brough -Adaptavist-  has an answer/can help. Thanks

Monica Brazelton
Contributor
April 3, 2024
0 votes
Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 23, 2024

Hi @Monica Brazelton 

It's not possible as a standard feature.

I did try using Automation for this, but it didn't seem to activate - perhaps it'll work on your instance?

The rule looked like this...

  • Trigger: Version created
  • Condition: {{smart values}} condition
    • First Value = {{issue.fixVersion.name}}
    • Condition = contains
    • Second Value = Global
  • Action: Send Email

---

I'm not sure if it's possible using Scriptrunner - but you could contact the vendors of such apps and ask them for direct support? Vendor contact details are in an App's Marketplace listing's support tab. For example, see Scriptrunner's contact details here.

If you do find a solution using an App, let us know what it is :)

Ste

Monica Brazelton
Contributor
April 3, 2024

Thanks for your answer @Ste Wright , I also tried using an automation rule that was very similar to what you shared here:

  • Trigger: Version created
  • Condition: If: Compare two values
    • First value = {{version.name}}
    • Condition = contains
    • Second value = <the particular word I'm looking for>
  • Action: Send email

My best guess as to why your automation rule didn't trigger is because the {{issue.fixVersion.name}} smart value would look for a specific issue, rather than a newly-created version that hasn't been associated with an issue yet. 

My automation rule worked in that it sent the email, but I wasn't able to find a way to create a link in the email to either the version itself (ie, the URL for the specific version created), the project where the version was created, or the name of the person who created the version.

This meant my automation rule would tell me when a version with a certain word in the name was created, but provide no way to actually track down that version in Jira! Not very useful with a large instance haha. The audit log for the automation rule also only shows the ID of the email that was sent, no information around the created version is present.

Any ideas around a smart value that could be used to direct me to the created version from the automated email?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events