Dear Community.
Need your help/guidance pls.
I am using custom email post function with a condition configuration as below.
Hi @Manoj Try to apply this condition :-
(issue.issueType.name == 'Bug' || issue.issueType.name == 'Story') && (issue.priority?.name == 'Major'|| issue.priority?.name == 'Minor')
@Vikrant Yadav Thanks for replying back, i replaced my written script with your shared one (replacing priorities) but at the bottom when i checked preview i got to see
Condition evaluated to false (note that for listeners the condition can't normally be tested) does that means my script is not true and email trigger will not happen?
This is mine
pls suggest.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Manoj Are you using Script runner "Send Custom email post function" or you are using some other custom email post function plugin ?
You can test the script by performing action on the issue. In Post function, you can't test script condition, you can only check preview of email.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Vikrant Yadav Hi,
I am suing Script runner "Send Custom email post function" and yes i can see the preview but while performing action, i mean when i create a ticket with set condition it does not trigger any email.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Manoj if you are applying this post function on create transition, then move it below "Creates the issue originally" post function.
All conditions ( issue and priority) meet when creating an issue ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Vikrant Yadav i have moved it below to "Creates the issue originally" post function. it works with Demand (issue type) and priorities but does not work with BUG (issue type)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Manoj it's weird. Working fine on my side.
Try to add another post function, use only.
(issue.issueType.name == 'Bug') && (issue.priority?.name == 'Major'|| issue.priority?.name == 'Minor')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Vikrant Yadav let me try this out, but question mark do here? after priority?.name and why its after issuetype? just for my knowledge
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Vikrant Yadav Thanks for your responses on my queries and support, i realized Bug and demand issue types has different workflows hence it was not working in a combined query, now its working applying separately.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad to hear it works for you :)
If Both issue type are using separate workflow, then you have to apply condition in both workflows.
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.