Hello Atlassian-World,
i am trying to send an auto-reply on for users that are not known to JIRA.
The senders mail adress is stored in a custom field by the JETI mail handler.
A custom event is raised in the create step of the workflow.
When i add a notification for that event that sends email to the field containing the email address and a different static address the mail only arrives at the static adress. The mail is not even adressed to the other adress which makes me think the custom field is still empty when the email is generated.
The event is triggered after the indexation in the workflow.
The same problem seems to exist when i try to add an JQL clause "reporter = mail_robot" to the notification, but i can Script around that.
To confirm wether the fields are empty i set up a groovy listener for the creation event and logged the field values there.
They are set.
It seems to me like there is a weird timing problem.
When i use the same notification for the issue_updated event it works just fine.
Does that sound familiar and does someone know a workaround?
Community moderators have prevented the ability to post new answers.
Hi Jens, how do you set the email addresses in the custom field?
Do you use field rules to initialize it, or have the mail handler save recipients?
Tibor
Hi Tibor,
the mail handler saves the recipients.
Cheers
Jens
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The solution is to send the mail via a post-function (see above)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mhh i get a little further this was:
I created a loop transition that is autotriggered and set up a postfunction there.
The mail is only sent if i dont query sender = mail_robot (which is the sender)
I can also apply that filter in the auto trigger
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i will try that, thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Jens, have you tried to use the Email This Issue post-function instead of a custom event and notificaitons?
You can add a JETI postiunction to the Create transition (last post-function position), and have it send the email instead of notifications.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just one creation event.
And one Status change.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is strange indeed. The fields are populated before the issue is created in the database.
Can you open the issue's history. Do you see "issue updated" entries or only initial "issue created"?
We are investigating it further.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mhh this is weird: I analyzed the Timing:
1: 2016-08-26 09:57:01.305 (Issue Created Timestamp that is saved to the issue)
2: 2016-08-26 09:57:01,528 (The moment when i check the issue with a groovy script triggered by the same event that i use in JETI)
3: 2016-08-26 09:57:01,550 (The Email is rendered at this timestamp, rendered into the email via the velocity template)
1 and 2. are timestamps from the JIRA log
3. is a timestamp i printed out in the jeti template
when i log at 2. i can see the fields are already in place.
Maybe the rendering of the email starts earlier and the issue data is read before they are set?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.