Ive recently started getting a bug in code that was working fine.
The issue is I have a privacy rule which is
This requirements project is current users current project ( I have tried it the other way around as well)
Whatever project is selected first, that becomes the only project the user can see requirements for. As I change projects, the user cant see requirements for any other projects.
When I have some debug code, the users project has been changed. I can literally print current users current project and print out all the requirements in a search with no parameters and the only requirements that come back are from the original project the user saw then I started the session. But the current users current project is the correct value and is mismatched in a search of the requirements.
When I monitor the database record, I can see the current project changing correctly.
It is like current users current project is changing in the UI and the database, but the privacy rule is not seeing the value.
If I refresh the page, then I now can see requirements for the current project, but again, if I switch projects I can no longer see the requirements for other projects.