def customFieldManager = ComponentAccessor.getCustomFieldManager()
def emailField = customFieldManager.getCustomFieldObjectByName("Email du client")
def clientEmail = issue.getCustomFieldValue(emailField)
Hi @ghalia sidi amemou , and Welcome
This error "variable CustomFieldManager mask a binding variable of the same name" means that you have already defined a variable with the name "customFieldManager" earlier in your code, and you are trying to redefine it again in the current block of code.
To resolve this issue, you can try changing the name of one of the variables.
def cfManager = ComponentAccessor. getCustomFieldManager()
And then use cfManager instead of customFieldManager in the following lines of code.
Or, just use the customFieldManager provided by the binding, and don't try to override it because that is of no use other than to execute more code for no benefit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Radek Dostál I agree, this is also better than my solution, thanks
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.
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.