(Smart) Fields not shown on a specific team

Hello,
I’m experiencing some issues with the display of some new fields we have recently introduced on our environment.
Specifically, we have added 3 new fields:

  • A smart field called windows. It’s a string
  • 2 DB fields (i.e. directly matching DB columns). One is a DataTypes.STRING, the other one is a DataTypes.DATE

Our forest admin has 2 teams: support and operations. The difference between the 2 teams is that the views differ a bit from each other (the operations has less tech info displayed), but they display the same data.

Expected behavior

The 3 new fields should be displayed on both teams: support and operations

Actual behavior

The 3 new fields are displayed only on support team.

Failure Logs

None

Context

On support team, when clicking on the button to edit the layouts, I can see the 3 new fields in the list of available (displayable) fields for the table/view.

On operations team, the new fields are not even shown in the list of available fields.

I have checked that the fields are present inside the .forestadmin-schema.json file. They’re there.

  • Package Version: 7.9.1
  • Express Version: 4.17.1
  • Sequelize Version: 5.22.4
  • Database Dialect: Postgres
  • Database Version: 9.6.22
  • Project Name: Platform
1 Like

Hi @UrbanMarco and welcome in our community :champagne: ,

Could you please share a video reproducing your issue ?

Hey @vince here’s a video: Enregistrement de l’écran 2021-09-29 à 17.08.28.mov - Google Drive

Hey @MaximeRobion, @UrbanMarco

some new fields we have recently introduced

Do you have an approximated date of the introduction of these new fields?
I can see 2 recent .forestadmin-schema.json on your environment (28 & 29) and that would ease the search to know which one may have introduced the issue.

Thanks in advance

The window field has been merged to the staging env 2 days ago. While the other 2 fields have been merged yesterday

2 Likes

Did you eventually used the “Copy layout” from team to team or environment to environment after the addition of theses fields ?

I’m still digging, but indeed, I’m not able to locate the window field on one of your team.
Still, I’m looking at your project to check if I can spot the reason why, and I’ll let you know once I’m able to find something that may have cause this issue.

1 Like

I’m still not able to either reproduce or understand what is happening for this specific environment.

I’ve done a few actions on my end that may have fixed the issue. Could you eventually try again and share with me the result ?

Thanks in advance

1 Like

Hey @jeffladiray I checked everywhere, nothing really changed.

The problem is still there, the last fields we implemented, both smartfields and database fields appear very well on our Support view but not on our Operations view.

This is problematic since the Operations view is the user-facing one (people from the Operations team) and they need the information implemented in these new fields.

I was finally able to locate an issue on the project - Not sure that’s “the one”, but it appear that you have a collection which is set to restricted to segment only and that does not have any segment.

Sadly, even when searching, I’m not able to locate any such configuration (Which is normally not possible on our end). I’m not even sure how this was initially triggered. I’m looking at our code RN, but i’m currently not able to locate or reproduce.

This configuration (On this specific team) prevent the update of your frontend, thus prevent it to display your newly added fields. This is, so far, the latest update I can provide. Please tell me if this ring a bell on your end, maybe some recent changes were done this way recently on your end.

In the meantime, I’m still investigating to see if I can do anything on our side to unlock the situation.

Thanks for your patience :pray:

Hey,
I checked out collections:

  • Contracts had the segment only option checked
  • Invoices had the segment only option checked
  • Product skus had the segment only option unchecked

I unchecked it for all of them. Though, I don’t know what would be the link between this and the fields not appearing. Also, I checked on Projects settings the config of our Operations team, but there really is nothing to setup specifically.

Also, and that’s very important, I don’t want to apply the UI of the Support team view to the Operations team view globally, because we did a lot of UX study on the Operations team view and that would go to waste if we do.

Though, maybe a solution would be to try to apply the UI of the Support team view on these 3 specific collections (Contracts, Invoices and Products skus) to the Operations view. That would generate a bit of UI refacto for us after, but we could be able to deal with it.

I’m still scared that the new fields we implement get to the same situation, which would be quite terrible.

Thanks a lot for your time Jeff! Have a great day :slight_smile:

Also, and that’s very important, I don’t want to apply the UI of the Support team view to the Operations team view globally, because we did a lot of UX study on the Operations team view and that would go to waste if we do.

Totally understandable. To be completely transparent, I can see in our log tracker that the update of your frontend failed due to a serialization issue implying restricted to segments only applied on a collection with no segment (Even though I went through all your collections, and I wasn’t able to locate any issue whatsoever).

Since you did some changes recently, I’ll check on my end if the serialization issue is still present. Applying the UI may be a solution indeed, but since I’m not able to reproduce the issue on my end, I can’t really be sure (I would prefer understand the issue then fix it instead of copying valid data and erase the whole UI for theses 3 collections).

I’ll check the logs today to see if I can spot anything.

Really sorry for the inconvenience :pray:

EDIT: Seems like I’m not able to locate the issue on our end anymore. Would it eventually possible to try to remove then re-add the smart field in order for your schema to be re-sync as well?
(We are usually able to launch this operation by ourselves. However, in your specific case, the .forestadmin-schema.json is already the correct one on our side. Removing and re-adding your fields should trigger the whole process of updating your frontend layout - and hopefully fix your issue)

So, I attempted to revert the changes that introduced these 3 new fields and deployed our forest instance. The fields disappeared from the support team as well. That’s expected. Good.
Then I reverted the revert, bringing the system to its original state and deployed again. The fields showed up on the support team, but not on the operations one. Basically, the reverts didn’t do anything.

Another thing I noticed is that I am unable to save the state of the layout on operations team. As @MaximeRobion stated, we have disabled the option “Access to records through Segments only” on the three collections “Contracts”, “Invoices” and “Prod SKUs”.
I can see, however, that the option is still enabled after we disabled it, clicked save and refreshed.
I don’t understand if it’s a caching issue or a genuine forest bug. I have attempted to force refresh, but didn’t work either.

I believe we have to first find out why the layout option " Access to records through Segments only " is not correctly persisted.

Any clue on your side @jeffladiray ?

I can see, however, that the option is still enabled after we disabled it, clicked save and refreshed.
I don’t understand if it’s a caching issue or a genuine forest bug. I have attempted to force refresh, but didn’t work either.

Indeed, this is not normal.
From the logs I have, I can see that both of the .forestadmin-schema.json update did fail for the exact same issue. Since you disabled restricted to segment only, we clearly have an issue here.

Did you disable Access to records through Segments only on the two teams? (AFAIK, this is a layout settings, so doing it on one team will not impact the second one). If you only disabled it on one team, it might explain the issue.

On my local environment, I’ve tried disabling the Access to records through Segments only option on both teams. The support one is ok (it’s disabled for Contracts, Invoices and Prod SKUs), but on operations team I am unable to persist the change on Contracts. Every time I untick the option, save, exit from the layout editor and refresh, the option is still ticked.

Same issue on our staging environment

Ok - I’ve spotted something unusual.

It appear that 2 of your segments are duplicated (A lot - I did find 1940 occurences for some of them - and I’m pretty sure you did not create those manually :sweat_smile:).

I need to do a bit of cleaning here since I’m pretty sure this is the issue impacting you and your team. I’ll contact you in DM to further discuss how I can help here.

1 Like