Count values of a custom text field

Cem Tuğrul October 14, 2024

I have a custom text field as "A" and the values (enterable) like;

a,

b,

c,

d,

 

So this means I have 4 values  for my "A" so how can I create a computable field as "B" that equals =4 

1 answer

1 accepted

2 votes
Answer accepted
Dick
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.
October 14, 2024

Günaidin, @Cem Tuğrul 

By having A as a text field, you can receive a multitude of values. 

It also means, you need to define how you want to discern the difference in values:
For example:

  • Is "a" the same as "A" ?   (upper/lower case)
  • Is "ü" the same as "u" ?   (diacritic markings)
  • Is "a" the same as "a "     (trailing space)

To avoid having to answer (and program!) these questions, can you give a bit more insight as to why you want to count the amount of similar field entries?

Best regards,

Dick

By voting for helpful posts and marking answers to your question, you're helping people with similar questions find a solution more quickly. Sharing is caring applies to knowledge as well :)

 

 

Cem Tuğrul October 14, 2024

Hello Dick,

Thanks for your reply. In my create issue there is a custom field type as text lets say "X"

and the values have to entered like as ;

a,

b,

1,

3,

PT134,

 

means values seperating by comma(,) According to these counted values I am gonna create sub_task. The example as given above You can see there are 5 values entered because the values seperating by (,) so this means I have to create 5 sub-tasks as ;

a

b

1

3

PT134

 

that's why I need calculated values from my text custom field X

Dick
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.
October 18, 2024

Hi @Cem Tuğrul 

There's a different way to approach your problem (a way without counting).

you can use string manipulations on the value stored in your custom field. As you can search for a designated character in a string such as the mandatory comma, you can split the string into chunks of string that are in fact the names of the subtasks that need to be created.

Atlassian's page on Smart values & String manipulations 

substringbefore would be handy in your case

 

 

Hope this helps you getting your stories straight (pun intended)

Dick

By voting for helpful posts and marking answers to your question, you're helping people with similar questions find a solution more quickly. Sharing is caring applies to knowledge as well :)

Suggest an answer

Log in or Sign up to answer