Mailbox Integration - error messages

Hi,

I would like to seek for help about a recurring issue we have.

 

We have a mailbox integration with custom Post-processing:

  • Command for new issues and tickets: Private_purchaser_email "${from}"  Supplier's_email  "${to}" Carbon_Copy_(CC)  "${cc}" 

Keep in mind that these are 3 custom fields the project has. 

 

Occasionally we get an error message with this description:

 

Dear admin,
The following problem occurred while processing an email from mailbox:
Failed to apply command "Private_purchaser_email "Barnabas.Kormendi@bud.hu" Supplier's_email "" Carbon_Copy_(CC) "ytprocpo@bud.hu" " to issue created from email from Barnabas.Kormendi@bud.hu.

  1. Set Private_purchaser_email to Barnabas.Kormendi@bud.hu
  2. Supplier's_email expected: ""
  3. Set Carbon_Copy_(CC) to ytprocpo@bud.hu
    Sincerely yours, YouTrack 2024.1 (build #28928)

 

What would have I possibly made wrong? 

Regards,

Matyas

BUD Airport

0
5 comments

Hi Matyas,

The post-processing commands you specified cannot be run without parameters. Apparently, that's what's causing the issue - YouTrack tries to set the “Supplier's_email” field with a command, but no field value is provided. However,  it's unusual that the issue happens with the ${to} variable - unlike CC'd users, the recipient address should be present in any email.

Would it be possible for you to share the email that triggered the issue? You can do this privately by opening a ticket with us at https://jb.gg/ytsup.

0

Hi Julia,

The information you've mentioned helped me solve the issue. 

Indeed, the “to” was missing from an e-mail, what is rather unusual, but was causing the error.

Thank you for your answer!

0

Matyas, you're welcome, I'm glad to hear the issue is solved!

0

Hi Julia,

we have a similar problem: When evaluating the variables {cc} or {bcc}, the process should succeed even if the corresponding field was empty in the original message. In scenarios where our address appears in the CC or BCC field, we need these variables to be correctly passed into the target field — even though this case may occur only rarely.
Otherwise, using CC and BCC as variable inputs becomes pointless.

Expected Behavior

  • The variables {cc} and {bcc} should be evaluated without error, regardless of whether the original CC/BCC fields were empty.
  • If the system was included as a recipient in CC or BCC, the variable value should still be transferred as intended.

Question / Request
How can this be fixed so that variable evaluation works reliably in all cases, including when the source fields are empty?

0

Hi A&K-IT-Technik, to share some background: using these placeholders in the command to be applied to tickets was mostly relevant in the context of an earlier, workflow-based helpdesk implementation. These days, YouTrack has helpdesk projects where CCs are added automatically without any commands, so for most use cases, one can go for this approach.

The key problem here is that commands do not support empty inputs (as mentioned above by Julia). The way it used to work in the aforementioned approach is that the command added multiple emails to one single field: Last message related emails ${from} ${to} ${cc} ${bcc}. As values in ${from} and ${to} were definitely expected, the command would have some input even when ${cc} and ${bcc} values were empty. Then a different rule would use these space-separated values in the string field and send notification emails to each one.

This means that you can also use this approach and add multiple addresses to one field; or you might want to provide some fallback value in the string, like this: Carbon_Copy_(CC) “CC ${cc}”. Then at least “CC” will be added as a field value and the input won't be empty.

0

Please sign in to leave a comment.