Confiform Datetime interval sorting

Markisio May 19, 2023

Hi There

 

I have confiform with Datetime Interval field, when I display the data of that form and try to sort it by the Datetime interval it doesn't work, here is the details 

 

datetime interval field name is duration

 

in tableview, sorting by startDate of the duration: I did duration.startDate ASC

 

I notice its sorting it as a string, below is what get displayed

 

April 1, 2023

June 1, 2023

May 1, 2023

 

it seems its sorting by letters of the month rather by date. Please look at June and May

 

I tried using formatDate function: duration.startDate(MMM, UTC) ASC but no luck

 

please advise, much appreciated

1 answer

1 accepted

1 vote
Answer accepted
Alex Medved _ConfiForms_
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.
May 19, 2023

Hi

This works absolutely perfect for me when I try

Screenshot 2023-05-19 at 23.10.46.png

With the storage format as below

<ac:structured-macro ac:name="confiform" ac:schema-version="1" ac:macro-id="8515674c-1fe7-4d03-abfc-920405ea6d51"><ac:parameter ac:name="formName">f</ac:parameter><ac:rich-text-body><ac:structured-macro ac:name="confiform-entry-register" ac:schema-version="1" ac:macro-id="a835064e-d533-48b1-a114-ed27dfba04b1"><ac:rich-text-body>
<p><br /></p></ac:rich-text-body></ac:structured-macro>
<p><ac:structured-macro ac:name="confiform-field-definition" ac:schema-version="1" ac:macro-id="60a95d9a-36a3-4ac8-97bf-5a405cb899d8"><ac:parameter ac:name="fieldName">duration</ac:parameter><ac:parameter ac:name="fieldLabel">duration</ac:parameter><ac:parameter ac:name="type">datetimeinterval</ac:parameter></ac:structured-macro></p></ac:rich-text-body></ac:structured-macro><ac:structured-macro ac:name="confiform-table" ac:schema-version="1" ac:macro-id="14dac29d-5d9b-4deb-9b0a-4e366eb092a7"><ac:parameter ac:name="formName">f</ac:parameter><ac:parameter ac:name="sort">duration.startDate ASC</ac:parameter><ac:rich-text-body>
<p><br /></p></ac:rich-text-body></ac:structured-macro>

Alex

Markisio May 19, 2023

Hi @Alex Medved _ConfiForms_ 

 

not with me, see attached below, the only difference is I made interval 0 to remove time In form definition. Not sure if that’s why? 

 

IMG_0295.jpegIMG_0296.jpeg

Alex Medved _ConfiForms_
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.
May 19, 2023

Same correct result for me, no matter what the "interval for time slots" setting is chosen

What version of the ConfiForms plugin are you using?

Markisio May 20, 2023

hi @Alex Medved _ConfiForms_ 


My version 2.18.13

 See screenshot below where I have the table view in a different page than the form definition 

IMG_0299.jpeg

IMG_0300.jpeg

Alex Medved _ConfiForms_
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.
May 21, 2023

Hi

It does not matter where the form's data is used - sorting is applied on the backend, and works absolutely the same way

I can see that you are like few years behind the current version of ConfiForms

Consider updating the plugin

Alex

Like Markisio likes this
Markisio May 21, 2023

Ok thanks, will ask the team who is responsible of the tool to upgrade. Thanks again 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events