Send an email Function issue

Issue #404 resolved
ME created an issue

Hi Fidel,

User in assignee field not receiving email sent via your send email post function. When testing with sending to user in reporter field, email is received.

Logs show that it can't retrieve email from assignee field.

Line 715: 2016-08-31 12:54:42,180 ajp-bio-127.0.0.1-8009-exec-531 ERROR mosheeh 774x2696080x1 lzq9hq 192.168.66.25 /secure/QuickCreateIssue.jspa [jira.plugins.workflowToolbox.SendEmailFunction] *** Error while retrieving email address of the destinatary from field 'Assignee': unexpected value type for object 'null'.

The only thing I can think of that might be causing the problem is the automation plugin that populates the assignee field. Maybe cause it happens at the same time, but I'm not sure.

Please assist.

Thanks,

Moshe

Comments (7)

  1. Fidel Castro Armario repo owner

    Hi Moshe,

    Please, try moving "Send an email" post-function BEFORE post-function "Fire a Issue Created event..."

    I also recommend you to update to version 2.2.18, since many bugs related with "Send an email" post-function has been fixed in versions released after 2.2.9.

  2. Fidel Castro Armario repo owner

    I think we can update Assignee using a post-function instead of a listener at issue creation (not a issue edition). This way we will ensure that assignee is set at the moment Send an email post-function will run.

    To do it we would use Copy a parsed text to a field post-function with the following configuration:

    • Target field: Assignee
    • Parsing mode: basic
    • Text to be parsed: mosheeh
    • Conditional execution:
    %{00018} = "project_key" AND %{00014} = "Sub-task" AND %{00016} = "New" AND %{nnnnn} = "Others"
    

    replacing nnnnn with field code for Team

  3. ME reporter

    We have 4 different assignees based on a custom field in the create issue screen. How would I go about it? Will I need to do 4 different "Copy a parsed text to a field" post-functions?

  4. Fidel Castro Armario repo owner

    Then you use "Set a field as a function of other fields" post-function with the following configuration:

    • Field to be checked...: custom field in the create screen
    • Target field: Asignee
    • Setting rules:
    (value_1)user_1
    (value_2)user_2
    (value_3)user_3
    (value_4)user_4
    

    replacing value_1 to value_4 with the values of the custom field in the create issue, and user_1 to user_4 with the user names (not to be confused with user's full name) of the users you want to assign the issue depending on the custom field on create screen.

  5. Log in to comment