Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,367,439
Community Members
 
Community Events
168
Community Groups

Populate a user picker field from the description field

This workaround is meant to help JSM projects where it is necessary to pull someone mentioned in a text format from the description field into a user picker field, like the Reporter field.

At the moment, the lookup of a user picker field is by ID and not text. Therefore, the A4J will not be able to add the user account and the field will be "Anonymous".

Workaround steps:

  • Issue creation:

    Usually, anyone looking for this workaround is because they are using an automatic ticket creation method, for example, when a ticket is automatically created from a Slack channel, so you will need to have a default value in the Description field so that A4J can get the username, see below:

    "Please activate the offboarding process and ensure the account is terminated on the limited date. The owner of this account is xxxxxx."
    The automation rule will get the values that are after the "is" until the "dot".

     

  • Automation rule:
    • It will be necessary to create a variable, "username" for example with this smart value: {{description.match("The owner of this account is\s(.*)")}}Screen Shot 2022-09-14 at 16.51.27.png
    • It will be needed to create an API token for the Web Request process. The Web Request needs your credentials and an API token encoded with base64:Screen Shot 2022-09-14 at 16.55.52.png
       Note: the Get function of the Web Request to get a user account has some limitations. It will take the first option that appears in the search, so if you have two similar usernames, the last name must be entered.

      For more information about this procedure, please refer to the documentation below:

    • Add an edit action into the desired user picker field with this smart value: {{webResponse.body.first.accountid}}Screen Shot 2022-09-14 at 17.03.11.png
    •  Extra tip: if you want to mention the user in a comment, use the smart value: [~accountid:{{webResponse.body.first.accountid}}]Screen Shot 2022-09-14 at 17.11.11.png
  • For more information on how to configure these steps, please refer to the video below:

1 comment

Hana Kučerová Community Leader Sep 14, 2022

Awesome!

Like Bruno Altenhofen likes this

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events