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?
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. :)
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this is a solution that was posted earlier in the community ...but not able to fins the link to that post.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 😅
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.