Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,363,065
Community Members
 
Community Events
168
Community Groups

If I change the name of a custom field, will that affect filters, automation rules, SLAs etc.?

I want to change names of custom fields for them to be more clear and intuitive (e.g. from "cause" to "cause of downtime"). Will the name change however affect filters, automation rules, SLAs etc. where the fields have been used so that these suddenly will not work any more?

3 answers

2 accepted

0 votes
Answer accepted

Hi @Hai-Minh Tran
as @Krishnanand Nayak mentioned, if it's via customfield ID everything is alright.

You can check workflows where u have it used by ID or name via SQL .. something like:
" select * from jiraworkflows where ............... "

Behaviors, automation etc, i think you have to check it manually, I'm not sure. If someone has good idea at it, I would like to know it also. :)

0 votes
Answer accepted

It will impact all the filters, scripts etc, where you reference the filed by name. If you are referencing them using the custom filed id, then the name change will not impact.

Thanks for the quick response. Is there an easy way to get an overview over all the places where I a have used a custom field name?

import com.atlassian.jira.bc.issue.search.SearchService
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.search.SearchRequestEntity
import com.atlassian.jira.issue.search.SearchRequestManager
import com.atlassian.jira.util.Visitor

def filtersWithField = []
def myCustomFieldRegex = ~/(.*?Whatever You Call This Field.*?)|(.*?cf\[12345\].*?)/
def searchService = ComponentAccessor.getComponent(SearchService)
def searchRequestManager = ComponentAccessor.getComponent(SearchRequestManager)
searchRequestManager.visitAll(new Visitor<SearchRequestEntity>() {
@Override
void visit(SearchRequestEntity filter) {
def jql = filter.request
if (jql.findAll(myCustomFieldRegex)) {
/*
You don't have to get the search request object
as I am doing here. However, if you want to programatically
update search requests, you'll need to get the SearchRequest object itself, as I'm doing here. The SearchRequestEntity is a bit quicker to get, so I'm using that for this loop that iterates through the
entire list of saved filters.
*/
filtersWithField << searchRequestManager.getSearchRequestById(filter.id)
}
}
})
log.warn filtersWithField

this is a solution that was posted earlier in the community ...but not able to fins the link to that post.

Hi @Krishnanand Nayak thanks!

Just one question: how do I run that script? 

Cheers, Berry.

@Hai-Minh Tran just had this question myself regarding automation:

I can confirm that if you e.g. set a component via automation and later change that components name, the automation will NOT set the component anymore.

It is still listed in the automation settings with the old name but only the one with the new name is actually selectable via the component drowpdown.

So caution is required here...

Thank you for posting about this, I was about to go down the what if automations change rabbit hole. Seeing this has put the custom field rename on the back pedal 😅

Suggest an answer

Log in or Sign up to answer