Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Salvar Valor gerador dentro de uma ramificação para cada e salvar no ticket acionador

Eric Silva
December 10, 2025

Olá Comunidade,

Estou configurando uma automação para processamento em lote de múltiplos itens e salvando um resumo formatado de volta no ticket que iniciou a regra. No entanto, o valor final não está sendo salvo corretamente no ticket acionador (ou está vindo vazio/parcial).

1. O Fluxo da Minha Automação:

  1. Gatilho: Formulário enviado (JSM).

  2. Busca/Ramificação: Use um bloco Branch issue(Para Cada) com JQL para encontrar ingressos múltiplos ( key IN ({{triggerIssue.customfield_chave_lista}})).

  3. Objetivo do Loop: Para cada ticket encontrado, eu transito o ticket e, ao mesmo tempo, acumulo ou keyeo Serial Numberem uma lista única.

  4. Ação de Acúmulo: Use a ação Edit issuecom o destino proposto para The trigger issueconstruir a lista, usando a sintaxe de concatenação:

    Campo Destino (Ex: customfield_11729): {{triggerIssue.customfield_11729}} {{issue.key}} - SN: {{issue.customfield_SN_ID}}\n

2. O Problema:

O campo customfield_11729do acionador de tickets não contém a lista completa de todos os tickets processados.

  • Se eu usar Set variableno loop: O valor está perdido fora do escopo do branch.

  • Se eu usar Edit issueno triggerIssue: O campo final no ticket acionador é, ou parcial (mostra apenas o último item do loop) ou fica vazio .

Parece que o campo {{triggerIssue.customfield_11729}}não está sendo lido corretamente nas iterações subsequentes para acumular o valor.

3. Minhas Perguntas:

  1. Qual é a melhor prática oficial para acumular (concatenar) valores de ingressos múltiplos ( {{issue}}) em um único campo {{triggerIssue}}dentro de um loop de Branch issue?

  2. Existe alguma restrição de tempo que requer a ação Waitentre a leitura e a escrita do mesmo campo ( customfield_11729) no ticket acionador durante o loop?

qualquer orientação sobre a sintaxe correta ou você deve usar o componente Create variablecom escopo global se estiver disponível.

3 answers

0 votes
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 Champions.
December 13, 2025

Hi @Eric Silva 

When a rule branches over more than one thing, it processes in parallel and asynchronously, with no guarantee when the branch will complete, up until the last step of the rule.

This means anything which happens inside the branch cannot be accessed afterwards, such as an accumulated, created variable.  And, if there are attempts to edit the same work item repeatedly inside the branch, it could fail or even collide with earlier writes.

Depending about the specifics of the scenario, one workaround is to use the Lookup Work Items action with JQL to gather and accumulate the data, and then perform one single edit with the content from the lookup.

 

Kind regards,
Bill

0 votes
Daniel Santiago
Contributor
December 10, 2025

Tinha postado algo mas a solução do Matteo é a melhor.

0 votes
Matteo Vecchiato
Community Champion
December 10, 2025

Hi @Eric Silva ,

Thank you for your post. I sugget to try to declare a variable before the branch and then assign values to that variables.

At the end, assign the variable value to field.

I hope it helps

Suggest an answer

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

Atlassian Community Events