Added the Feature to Combine/Join Values/Fields in the admin list view (called field relations)
MergedLlewellyn merged 7 commits from
master5 years ago
Reference in New Issue
There is no content yet.
Delete Branch 'staging'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Pull Request for Issue gh-287.
Summary of Changes
Watch the tutorial and do a combine/join fields in the admin view.
The result demonstrated in the tutorials.
Documentation Changes Required
The new tutorial will be added to the JCB playlist on youtube once the feature is released.
I tested this, and it appears to work. I will say that this appears to be a nice feature, but honestly don't see where I'll end up utilizing it in any of my components, at this point.
I have a similar feature right now, all using custom code, that takes what you did here a step further. I'll "throw this out" as something to think about.
In my case, I have a field called "Name". On save, if name is populated, then nothing gets done. However, if Name is empty, then it concatenates fields. Those concatenated fields are then saved in the Name field in the DB.
In this case, the name field I just called "Adline" which concatenates a unique record id, street, city, state, and postal code, if there is nothing manually typed in Adline. So, if the unique record id is a12345, street=123 Front Street, city=New York, state=NY, postal code=10001, then on save name becomes a12345 123 Front Street New York, NY 10001. I can then have that field, along with the street, city, state, etc on the list view.
That night be something to think about for the future of extending this functionality.
@mwweb I don't understand, this is what this new feature can do. Well basically the same and so much more. The ability to combine values in the list view.
The feature you are speaking about also is in JCB where you have fields in the admin edit view that on save gets combined into the database as one column.
But this feature we are looking at takes values from different columns and combines them in display only, while still allow the filtering and searching of those columns values separately.
I knew that with custom scripting you can already do this, but it seemed to me from reading the issues on github and feedback from the JAB that this needed to be done easier.
Okay so in my mind it seems like the header of the table is the issue here.
So to have the option to change the word Name should not be that hard... I can just add another field to override the header.
When I opened the issue gh-287 you were all for this feature. Now that I spend a week to build it you are like... ahaa wast of time! Facts are the feature does exactly what it was said to do, it combines/joins values in the admin list view in a very powerful way, and very easy.
If the greatest motivation for the feature is the limited space why add city again, or any other value that is being combined. Truth is the filter can still be loaded for those fields, and so also the search options. Not being able to add the field/value a second time as a list field is never going to change (sorry to say), but you can use any of the combine/join fields again and again... so there is the loop to use one field more then once in the list view.
Lastly, you do know that we added the option to build the alias dynamical with that kind of way you explained? well to do that with every field will be a complete other feature. Not the same as this one, as this feature focuses on the display of the value and not the creation/storing of the values. Further more as you said you already have nice custom script to deal with that. What is also true, is that you can achieve the same effect (in display) with this feature.
Nice Feature guys!
But the feature is working great, I like the updates you made to the area that builds the body of the list views.
The option to also model the fields during the creation of a new item in this kind of basic way could be a nice added bonus, @mwweb thanks for sharing.
I need feedback on this ASAP, so we can get this update out.
Step 1:From your project repository, check out a new branch and test the changes.
Step 2:Merge the changes and update on Gitea.