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.
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)
it turned out to be treacherously easier than I was looking for options before. It worked. Thank you so much
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.