Thank you very much @Nic Brough -Adaptavist- @Alexey Matveev
Here is what worked for me:
issue.getProjectObject()?.getProjectLead()
This one works fine for me
issue.getProjectObject()?.getProjectLead()?.getDisplayName()
What is your Jira version and what is the error?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What does the tooltip show when you hover the cursor over the red cross to the left?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic Brough -Adaptavist- surprisingly now it is not showing the red cross. It is now throwing a warning if I use the initial script.
Below is the warning:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
getLead is deprecated and will go away in a later version. It's just warning you that you should not use it. Try .getProjectLead instead
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.