Forums

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

Is it possible to count the number of components selected?

Javanshir Mustafayev March 19, 2024

I would like to count the number of values selected in components.

I need this to restrict a transition if there are more than three components selected.

2 answers

1 vote
Avinash Bhagawati {Appfire}
Community Champion
March 24, 2024

Hi @Carlos Garcia Navarro , Good day!

You can follow below approach to your achieve your use case with default Jira architecture.

  • Create a custom field of  number field type called as "Component Size"
  • Add a below automation to update the "Component Size" size based on Components field change.

    01.png


    02.png
  • This will automatically update the component size field and you can make use of this field in transition validator/condition as per your requirements. 
  • Please refer screenshot for your reference.

    004.png

 

Thanks,

Avinash

Carlos Garcia Navarro
Community Champion
March 27, 2024

Very cool, @Avinash Bhagawati {Appfire} ! Thanks for sharing!

Javanshir Mustafayev _ HIT
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.
March 28, 2024

@Avinash Bhagawati {Appfire} a very interesting approach I would give it a try if it would:

1. Not use the automations. I'm looking for a solution to calculate the number of values within the workflow condition tab, if possible.

2. The main goal is to build a condition to allow/block a workflow transition based on the number of selected values. 

For example: if there are three components or more allow one transition, if there are less than three components selected allow only a second transition.

Avinash Bhagawati {Appfire}
Community Champion
April 1, 2024

Thanks @Javanshir Mustafayev ,

Based on above automation, you can calculate the component size field value and you can make use of this field to allow/block the transition based on the Component size count.

In order to count of components either you can have go with built in any automation or any third party apps like JMWE.

I hope this information helps you!

Thanks,
Avinash

 

0 votes
Carlos Garcia Navarro
Community Champion
March 22, 2024

Hi @Javanshir Mustafayev ,

I haven't tried this myself, but I wonder if this other post may be helpful for your use case: https://community.atlassian.com/t5/Jira-Software-questions/Help-with-counting-how-many-components-on-a-Jira-issue/qaq-p/1457354

Jira Misc Custom Fields (JMCF) is also available in Jira Cloud:

https://marketplace.atlassian.com/apps/27136/jira-misc-custom-fields-jmcf?tab=overview&hosting=cloud

Javanshir Mustafayev March 24, 2024

I would like to have this without purchasing additional plug-ins, I can do this with ScriptRunner or JMWE as well. I wonder if this can be somehow done within the default Jira architecture.

Suggest an answer

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

Atlassian Community Events