[Jira] [Structure] - Formula Column - Type problem

Слава Гончаров
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 10, 2024


My
task is to make a column where the minimum value in the history of changes is taken from the Original story points field and compared with the current value.

My example:

IF itemType = 'issue': 
WITH
osp_history = history.changes.FILTER($.field = "Original story points").umin().totext:
IF osp_history = originalStoryPoints : """{panel:bgColor=#32CD32}$osp_history{panel}""" // LimeGreen
ELSE IF osp_history > originalStoryPoints : """{panel:bgColor=#00FFFF}$osp_history{panel}""" // Aqua
ELSE : """{panel:bgColor=#FF6347}$osp_history{panel}""" // else Tomato

 It

It works, but the values are returned as text and when you try to sort it, there is a problem around the lexographic order. How to start displaying


history.changes.FILTER($.field = "Original story points").umin().totext 


as a numeric value. I couldn't find a way to get this out of the changelog without bringing it to toText.

 

Structure for Jira by Tempov9.2.1

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
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.
July 10, 2024

Hello @Слава Гончаров 

Using .to instead of .toText in the formula should help.

Also, please note - sorting a column with markup in it rarely gives expected results because the values are not being sorted by their actual numbers, but by the values with added code as well. So, if you want to both sort by historical values and to have a column that returns a highlighted value, I suggest to have two separate columns - one for showing the highlighted value and another for being used for sorting.

I hope this helps. If you need further assistance or if you have other questions about Structure, please reach out to us directly at our support portal and we'll get back to you shortly.

Best regards,
Stepan
Tempo (the Structure vendor)

Слава Гончаров
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 10, 2024

it turned out to be treacherously easier than I was looking for options before. It worked. Thank you so much

Like Stepan Kholodov _Tempo_ likes this
TAGS
AUG Leaders

Atlassian Community Events