Structure formula to calculate progress in percentage from Smart Checklist Progress custom field

Lean Li
Contributor
February 3, 2024

Hi,

I'm trying to find a way to calculate (or show) progress as a percentage of the smart checklist items that are recorded to an issue. 

Smart Checklist Progress custom field has this kind of String values:

 

Custom field (Smart Checklist Progress)
2/5 - Done
3/3 - Done
1/2 - Done
8/9 - Done

Could anyone help me with the formula or syntax to use? Thank you already in advance!

3 answers

1 accepted

1 vote
Answer accepted
Olena Brazhko_TitanApps_
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.
February 8, 2024

Hi @Lean Li 

It's Olena from the Smart Checklist team here :) 

There are several ways to achieve what you are asking for.

 

Option 1: Using automation from Jira

  1. Create a Number Field custom field with any name (example: Progress %)
  2. Create the first automation rule:
    1. When the value changes for Smart Checklist Progressimage (35).png

    2. If Smart Checklist Progress contains DONEimage (36).png
    3. Then Edit field and choose the created custom field (Progress % in our example) and assign the value 100image (38).png

  3. Create a second automation rule:
    1. When the value changes for Smart Checklist Progressimage (35).png
    2. If Smart Checklist Progress does not contain DONEimage (37).png
    3. Then Edit field and choose the created custom field (Progress % in our example) and assign the value as below:image (39).png
{{#=}} {{issue.customfield_10102.split("/").first.asNumber}} * 100 / {{issue.customfield_10102.split("/").last.asNumber}}{{/}}


It will display progress like this:image (40).png

 

Option 2: Using Smart values

  1. Create a Short Text custom field with any name (example: Progress %)
  2. Create the first automation rule:
    1. When the value changes for Smart Checklist Progressimage (45).png
    2. If Smart Checklist Progress contains DONEimage (46).png
    3. Then Edit field and choose the created custom field (Progress % in our example) and assign the value 100%image (47).png
  3. Create a second automation rule:
    1. When value changes for Smart Checklist Progressimage (45).png
    2. If Smart Checklist Progress does not contain DONEimage (35).png
    3. Then Edit field and choose the created custom field (Progress % in our example) and assign the value as below:image (49).png
{{#=}} {{issue.customfield_10102.split("/").first.asNumber}}*100 / {{issue.customfield_10102.split("/").last.asNumber}} {{/}}%

It will display like this:

image (50).png

 

I hope one of the options will suit your needs. If you have anything else you need help with -- be sure to let us know.

Kind regards,

Olena

Lean Li
Contributor
February 15, 2024

Thank you for this answer! I could not get the JSON in your example to work, but with this minor tweak it is doing what I needed: 

{{#=}}{{issue.customfield_10102.split("/").first}}*100/{{issue.customfield_10102.split("/").last}}{{/}}

Olena Brazhko_TitanApps_
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.
February 19, 2024

@Lean Li that's great to hear! We'll look into it on our side too, thank you for sharing!

0 votes
Ditte Simard
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2024

Since Smart Checklist Progress is a custom field, you should be able to access its values in a Formula using any of the three methods described here: Retrieving Custom Field Values 

This formula is not exactly what you are looking for but I would recommend playing around with it and seeing if you can modify it to use your custom field: Custom Progress Bar  That would at least get you part of the logic you need to calculate % complete.

Good luck!

0 votes
Stepan Kholodov _Tempo_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 5, 2024

Hello @Lean Li 

There is no support for checklists in Structure's Formula at this time. If you would like to leave a feature request, please reach out to us directly at our support portal with more details, and we'll get back to you shortly.

Best regards,
Stepan
Tempo (the Structure app vendor)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events