HI,
(disclosure: I'm very new to scripting, I took a C++ class about 8 years ago)
I'm trying to fire a custom email via scriptrunner when the reporter is "Remote User". What script would i use for this?
I cobbled together a condition script :
import com.atlassian.jira.component.ComponentAccessor
def userManager = ComponentAccessor.getUserManager()
issue.reporter == "Remote User"
But it always resolves as false, so i must be doing something very wrong.
Thank you
I think you just want:
currentUser.name == "username"
for the condition. If you want to compare the full name, which is not really advisable, you could use:
currentUser.displayName == "Mr. A User"
Hi Jamie,
Both suggestions return "Cannot get property 'name'(or displayName) on null object"
Hi Taha,
Returns a "The condition evaluated to false"
Thank you for the suggestions!!!
Would it be possible to have a condition that evaluates to true if a custom field has changed? The field in question will only ever have a value if the email sender does not have a JIRA account.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm not sure what the context of your question is, can you attach a screen-cap showing the configuration.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jared,
How about you try using this script in your condition
import com.atlassian.jira.ComponentManager def username = ComponentManager.instance.userUtil.getUserObject("jirausername") issue.reporter == "username"
Taha
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.