Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Timing Problems with a JETI notification on Issue Create

Jens Kisters __SeibertSolutions
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2016

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?

7 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Tibor Hegyi _META-INF_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
August 25, 2016

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

Jens Kisters __SeibertSolutions
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2016

Hi Tibor,

the mail handler saves the recipients.

Cheers

Jens

Jens Kisters __SeibertSolutions
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2016

The solution is to send the mail via a post-function (see above)

0 votes
Jens Kisters __SeibertSolutions
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2016

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

0 votes
Jens Kisters __SeibertSolutions
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2016

i will try that, thanks!

0 votes
Tibor Hegyi _META-INF_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
August 25, 2016

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.

0 votes
Jens Kisters __SeibertSolutions
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2016

Just one creation event.
And one Status change.

0 votes
Tibor Hegyi _META-INF_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
August 25, 2016

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.

0 votes
Jens Kisters __SeibertSolutions
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 25, 2016

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? 

 

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events