Forums

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

Automation: Need to count words across fields and total amount notated in another field

Caressa September 24, 2024

Goal: create an automation to count the amount of times the word "yes" has been selected across custom drop-down fields in an issue and inputting the total amount of the word "yes" into another custom number field on the same issue.

Context:

  • I have confirmed that the custom field ids I am mentioning in my smart value equation are accurate
  • all the custom fields apart of this automation have been confirmed to exist on the issue
  • the dropdown field options are "Yes" or "No"

 

  • I have changed the smart value equation many times but continue to hit a similar error message in the automation audit log it states "Error rendering smart-values when executing this rule: Missing parameter(s) for operator +u: + + +" when I was utilizing ".match()" in my equation
  • I also attempted a direct value comparison and that returned similar errors.

 

Yes count auto image.png

 

Here is the most recent version of my smart value equation that's experiencing errors.

 

{{#=}} ({{issue.customfield_10630.value == "Yes" ? 1 : 0}} + {{issue.customfield_10633.value == "Yes" ? 1 : 0}} + {{issue.customfield_10631.value == "Yes" ? 1 : 0}} + {{issue.customfield_10632.value == "Yes" ? 1 : 0}}) {{/}}

2 answers

0 votes
Vijay Dadi
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.
September 27, 2024

Hello @Caressa ,

Here is how it can be done, hope it helps.

Create a field of type “Number”

1.png

I have created three questions with Yes/No answer.

2.png

Next comes automation

 3.png

4.png

5.png

6.png

Now since I have selected Yes as 3 times, the count is set to 3.

7.png

 Vijay

 

 

Vijay Dadi
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.
September 30, 2024

Hi @Caressa ,

did you try this?

Vijay

0 votes
Vijay Dadi
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.
September 25, 2024

Hello @Caressa ,

You can use the trigger "Value Changed" and provide all the field which are eligible for this requirement.

When "Yes" is selected for any of the selected field, you can have a counter defined on another field, increment it by 1 and if selected as "No", decrement it by 1.

By this, you can have the actual count of Yes selected for all the available fields with such option. Hops this helps.

Regards,

Vijay

Caressa September 26, 2024

Hello Vijay,

Thank you for your response!

Could you expand in more detail on how I can create a counter in my field as that is what I am currently struggling with?

Also, if selected as "No", increment it by 0. I do not want No's to affect the total amount, only "Yes".

 

Have a great day and appreciate your insight :)

Vijay Dadi
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.
September 27, 2024

Hello @Caressa ,

I will create an sample use case and share it.

Vijay

Suggest an answer

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

Atlassian Community Events