Hi,
I have a custom field, where we enter the names of all customers who are interested in a feature. This is great to see who to contact, before conceptualizing a new feature. But I would also like to get some quantitative insights about how many customers are interested. So I would like to count the line of the custom field. Currently, we use unordered lists:
If I could get the length of the list, or the count of lines I would directly receive the number of interested customers.
I tried a workaround by just using the `{{issue.Interested Customer.length}}` but it returns the length of the entire string which is not really representative.
Does anybody have an idea how to solve this.
Hi @Nicolas Mezou -- Welcome to the Atlassian Community!
First thing: thanks for this question, as it helped me find a new defect in the automation rule conditions... Once a text field has been set, it cannot show as "is empty" ever again. (I will submit a defect for that.)
On to your question... I did this counting by splitting the text and counting the new line characters. Here is an example rule putting the customer list in Description and logging the results.
Note that when there is only one customer (one bullet), the count should still be correct even though there is no new-line character. That seems to be a behavior of split() returning the unmatched string.
Best regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.