Problem sending xporter attachment in send custom email

I have set up a post function that generates an xporter document and then attaches it to the issue at the transition.  Also in the post function, I have a Send Custom email (after the xporter function) that will send an email with all the attachments (including the one just added by xporter).  I find that all the other attachments are being sent with the email except the xporter document.  The document is attached to the issue but not included in the custom email. 

Using JIRA 6.4.10 and latest Xporter and Script Runner add ons.

Has anyone else experienced this type of problem?

1 answer

Hi Liesa,

Could you please post the code for the post function as well as the version of the Script Runner and Exporter plugin that you are using so that we can try to replicate your issue.

Many Thanks

Kristian

I used the standard items. 

The generation of the document is first.  The sending of the custom email is last.

The items in order are:

  1. Set issue status to the linked status of the destination workflow step
  2. Add a comment to the issue if one is entered during transition
  3. Update change history for an issue and store the issue in the database
  4. File will be created from the template <template name> in the PDF format and it will be attached to the issue
  5. Reindex an issue to keep indexes in sync with the database
  6. Fire a generic event that can be processed by the listeners
  7. Script workflow function:  Send an email based on the provided template if conditions are met., with subject:  <subject line>

The email is sent but the xporter attachment is not with the email.  Only attachments added before this transition.  The condition on the email is that the issue status is equal to that of the transition.

I am running Script Runner 3.1.4 and Xporter 3.4.6 

Hi Liesa,

In order to be able to replicate this. I will need the code and configuration for the script workflow function inside step 7 and the configuration for the template used to create the file in step 4.

Please can you screenshot how you have configured each post function.

Can you please provide this information if you require further assistance.

Thanks

Kristian

Step 4: 

image2016-1-28 15:56:26.png

Step 7:

image2016-1-28 16:4:28.png

image2016-1-28 16:5:41.png

Hi Liesa,

I notice from the screenshots that you have slected the All attachments checkbox which will ignore the code below.

Also with the post functions for creating the pdf and sending the email these should be the first to in the list.

Could you please try re ordering the list of post functions so that it is as shown below and see if it makes a difference.

  1. File will be created from the template <template name> in the PDF format and it will be attached to the issue
  2. Script workflow function:  Send an email based on the provided template if conditions are met., with subject:  <subject line>
  3. Set issue status to the linked status of the destination workflow step
  4. Add a comment to the issue if one is entered during transition
  5. Update change history for an issue and store the issue in the database
  6. Reindex an issue to keep indexes in sync with the database
  7. Fire a generic event that can be processed by the listeners

Thanks

Kristian

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 11, 2018 in Marketplace Apps

You + one app + a desert island...

Hi all! My name is Miles and I work on the Marketplace team. We’re looking for better ways to recommend and suggest apps that are truly crowd favorites, so of course we wanted to poll the Community. ...

2,633 views 5 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you