Created by %current user% has wrong value when issue created by email

Issue #59 resolved
Scott Harman created an issue

Hi Fidel For some reason, the current user value reported when creating an issue by email is incorrect

Workflow is: user logs incident by email All fields appear to be copied correctly for all other fields - just this one, sets the 'created-by' custom field to a user not associated with the incident.

Comments (4)

  1. Fidel Castro Armario repo owner

    Hi Scott,

    Virtual field "Current user" represents the user currently logged in the system executing a transition. When an issue is created by email, there isn't any user logged in the system executing transition "Create issue".That is the reason that explains that virtual field in empty "Current user" on issues created by email at transition "Create issue".

    I don't consider this an issue, but a normal behavior. I suggest the following two alternative solutions for your case:

    1.- Use virtual field "Reporter" (field code %{00006}) instead of "Current user".

    2.- Use post-function "Set a field as a function of other fields" instead of Copy a parsed text to a field with the following configuration:

    Set field as function of other fields _ configuration.png

    Once configured, transition "Create Issue" will look like this: Create Issue transition configuration.png

    I'm supposing that your custom field "Created by" is a "Text field", that is the reason I assign the text "Issue Created by Email" when the virtual field "Current user" is not initialized (represented by regular expression ^$ ).

    Please, close this issue if any of the solutions provided is valid for you.

  2. Scott Harman reporter

    Hi Fidel - thanks for your feedback

    Could I use reporter if Current User is not set, and current user if it is?

    i.e. (^$)%{00006} (.*)%{00020}

    It's a user picker field, so would need to be a username, then this should logically evaluate correctly

    We often report issues on behalf of other users, so will generally change the reporter value if the incident is reported by a customer or off-site engineer.

  3. Fidel Castro Armario repo owner

    Yes, you can use %{00006} as value in your setting rules. Don't forget to write only one setting rule per line, that is:

    (^$)%{00006}

    (.*)%{00020}

  4. Log in to comment