View Issue Details

IDProjectCategoryView StatusLast Update
2055Composrcorepublic2021-03-18 20:26
ReporterChris Graham Assigned ToChris Graham  
PrioritynormalSeverityfeature 
Status resolvedResolutionfixed 
Summary2055: Improve integer_format / INTEGER_FORMAT symbol
DescriptionAdd a parameter to integer_format to express in user-friendly standard-form.

E.g.

integer_format(1234,1)
-->
1.2k

integer_format(1234678,2)
-->
1.23m

integer_format(1234678,0)
-->
1m


Also make the INTEGER_FORMAT symbol be able to convert input already passed to integer_format back to a raw integer, so it can be re-processed (as often templates are often passed things having already been processed in a default way).


I think our default forumview has some hard-coded logic similar to above, so make that use the symbol.
TagsGood for training
Attach Tags
Time estimation (hours)1.5
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

Chris Graham

2021-03-18 20:26

administrator   ~7024

Implemented.

"Also make the INTEGER_FORMAT symbol be able to convert input already passed to integer_format back to a raw integer, so it can be re-processed (as often templates are often passed things having already been processed in a default way)."

Instead I just made sure any case of integer_format being passed to a template also had an strval version.

I've gone through all the integer_format calls in the code and made sure they use the new display method where appropriate.

Issue History

Date Modified Username Field Change
2017-11-26 15:53 Chris Graham Tag Attached: Can implement during live chat
2019-06-27 19:42 Chris Graham Tag Renamed Can implement during live chat => Good for training
2021-03-18 20:26 Chris Graham Assigned To => Chris Graham
2021-03-18 20:26 Chris Graham Status Not Assigned => Resolved
2021-03-18 20:26 Chris Graham Resolution open => fixed
2021-03-18 20:26 Chris Graham Note Added: 0007024