Automation using lookup table

Douglas Henrique Braun November 8, 2024

 I'm working on an automation whose goal is to create issues and assign them to users every business day.

My goal is to use the lookup table where I provide the user name and their account ID as follows:

1.png

So, using the table provided, I would like to create a branch that will go through each of the entries and create a simple task assigning it to this user.

I'm having trouble iterating the table contents in the branch to create the task and assign it to the current user.

The problem I'm facing is, when converting the table to a String and checking the results of that string in the Log Action, using the smartvalue {{taas.entries}}, I getthe following:

2.png

I can't get rid of the following characters from this string using the .split.match extension:

  •  LookupTableEntry
  • {
  • ,
  • }

My goal is, when the branch is in fernando, I create a task and assign it using his accountID, after that, it goes to douglas and does the same.

I'm using the lookup table because this table can be easily configured by the team that will perform maintenance if a person is deactivated or if someone joins the team.

Any help is very much appreciated.

1 answer

1 accepted

1 vote
Answer accepted
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 8, 2024

Hi @Douglas Henrique Braun 

For a question like this, it is helpful to include an image of your complete automation for overall context.  Without seeing that...

When using the Lookup Table with entries this way, I would expect your Advanced Branch to look like this:

  • Advanced Branch
    • name: varEntry
    • smart value: {{taas.entries}}

And then when referencing a specific item being branched over, you may use:

{{varEntry.key}} and {{varEntry.value}}

 

Kind regards,
Bill

Douglas Henrique Braun November 8, 2024

Hello @Bill Sheboy

Thank you for helping on this.

Here is how I set my rule:

1.png

I'm certainly doing something very wrong but I don't know what.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 8, 2024

You do not need any of those Create Variable actions.

 

When using the entries function with the table, it returns the structured data as key and value pairs, allowing the branch to work with no additional parsing needed: https://community.atlassian.com/t5/Automation-articles/Update-Create-lookup-table-action-improvements/ba-p/2427798#:~:text=You can get all the rows as a list 

 

Instead, please change your advanced branch to what I showed earlier and use the branch variable to access the account id values.

  • action: Create Lookup Table... with the name of taas
  • Advanced Branch
    • name: varEntry
    • smart value: {{taas.entries}}
      • action: create issue
        • accessing the user name with {{varEntry.key}} for the Summary
        • and assigning it to {{varEntry.value}}

 

Douglas Henrique Braun November 8, 2024

OMG @Bill Sheboy

You're the Lookup Table GOD!

Thank you so much!!!

That worked perfectly and as I expected to.

You've saved me tons!!!!

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 8, 2024

Awesome; I am glad to learn that helped you!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events