Forums

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

Count of times an event happens

Jaqueline da Silva Nicolau December 27, 2023

Hi community!

 

I have this automation configured with JMWE when I create a bug. My goal is to update the field "Número de bugs" with the amount of bugs an issue had. But using this value {{ issue.fields.customfield + 1 }}, it only adds once, It doesn't sum after the first bug, so in the field, always remains 1. What am I doing wrong?

 

imagem_2023-12-27_144848696.png

2 answers

1 accepted

0 votes
Answer accepted
David Fischer
Community Champion
December 29, 2023

Hi @Jaqueline da Silva Nicolau 

since this post function is created on the Create transition, it will run whenever an issue is created, and add 1 to its "Número de bugs" custom field. But since the issue is new, it will always start with 0 (in fact, not even 0 but no value at all).

Can you describe what you're trying to achieve?

Jaqueline da Silva Nicolau January 2, 2024

the information on top is hided, but the field "Numero de Bugs" is a field from the parent of the bug, and the automation is to set this field when (trigger) a bug is created

Jaqueline da Silva Nicolau January 2, 2024

imagem_2024-01-02_101819783.png

David Fischer
Community Champion
January 6, 2024

I see. In that case, you need to read the field of the parent issue, which is the target issue, and add 1. So the value should be:

{{targetIssue.fields.customfield_15670 + 1}}
Jaqueline da Silva Nicolau January 8, 2024

That makes sense! Thank you 

0 votes
Nikola Perisic
Community Champion
December 28, 2023

Heya @Jaqueline da Silva Nicolau ,

Have you tried to create a filter for specific project and an issue type of bug. Then to create a dashboard which will use that filter? Seems like a simpler option, if of course that would suit you

Cheers,

Nikola

Jaqueline da Silva Nicolau December 28, 2023

Yes, I already have that kind of information, but in addition to that, I need to know how many bugs in total were created per developer, since in the task I have a field to save the developer name, I added a field to count the number of subtasks (bugs only) so I can use both information to generate a Two Dimensional Filter Statistic with the developer and number of bugs fields. But the number of bugs field is not working (the automation).

Suggest an answer

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

Atlassian Community Events