We have moved to GitHub Issues
Created by Shannon Deminick 06 Apr 2016, 08:53:50 Updated by Sebastiaan Janssen 25 May 2016, 11:29:10Tags: PR Community Contrib
Relates to: U4-6003
The label just stores data as a string in the database, but now that we have sortable custom fields in the list view, if you were to add something like umbracoBytes as a column (which will always be an int) when you sort it will sort based on it's string value because that is where the data is stored.
To fix that we'd need to have the Label property editor support a configured data type, then we would be able to create a Data Type for a Label that stores INT (for example). Then in the future we could install a label data type for each storage type by default and set the umbracoBytes, umbracoHeight, etc... properties to use the INT storage so sorting on these custom columns would work properly.
@abutland Hey! Great PR, makes sense and by my test I can properly sort on an integer field. I have written a couple of comments on the PR if you have a min to answer?
Thanks for looking at it. Have just done so - the fiddly bits are all around handling the fact that whilst the current label property type has no pre-values that can be saved, it can have them if it's been created from a legacy, now unsupported type.
OK. Have merged the PR with an additional commit that cleans up a few things. Want to have a look and confirm it's all OK?
Test/Review: create label properties of type string, integer. Ensure that in eg list views, sorting by integer works.
Looks fine to me - thanks.
Priority: Up for grabs
Backwards Compatible: True
Fix Submitted: Pull request
Due in version: 7.5.0
Sprint: Sprint 16