Closed sjDCC closed 7 years ago
Quick question - can organisation be mandatory?
I assume selecting 'other org' and stating a name will be sufficient here? Testing issue #285 made me wonder whether we ever expect people to have no org affiliation and if it's desirable or feasible to make this mandatory?
Another addition to this. I think we absolutely need to make a name and email mandatory. We have some accounts with just a shib link and org name, which is going to make it hard to administer accounts if they come asking for admin rights
@sjDCC what should we do with the 4739 users from migrated data who lack names?
There are no users with no email or shib link in its place - just 4 who have been assigned a <random>@replacement-email.org
for data integrity purposes during migration (see https://github.com/DMPRoadmap/roadmap/issues/108#issuecomment-285781927 ) because they had invalid emails.
Hmmm I don't know. What are typical solutions in this kind of circumstance? If we make it mandatory, do we just replace all with First name, last name? It may prompt people to change it as it's clearly not their name but would be a valid piece of data!
@sjDCC I'm not really sure what we can/should do here. Even if you make it mandatory, and (try to) enforce a real-name-only policy, people will circumvent it by entering "Thisismy Realname" (just look at Facebook)
I'm not sure we'll really have that problem as it's not a facebook like system. People do actually want to use their real names on research proposals and DMPs.
I think the only reason they haven't been filled in so far is laziness, but including a first name and last name is mandatory in DMPTool and will be in roadmap so we need some way to deal with legacy non-compliant data. Putting some stock placeholder text into the fields seems the best fix to write into a migration path.
@vyruss has fixed the issues in current data by adding placeholder text in the above commit. Testing the edit profile page, I am currently able to delete my username and password and still submit the form and have it save.
Should we create an error message and enforce the manditory fields in code?
Yes, I think we need to. If you've managed to delete username and password, surely that account is no longer valid and can't be accessed? At a minimum username and password need to be there, but ideally first and last name too. Thanks
oh sorry, first and last name was what i deleted, not username and password I clearly need coffee before i comment on tickets.
I will add error messages for these if they attempt to save the page without them filled in
phew!
The mandatory bit kind of works on DMPonline-test. However, I can't get rid of the error message - 'save unsuccessful: please enter a first name' and for some reason, my email address is enterred in the organisation field. So, I deleted my first name, hit 'save', I was told 'save unsuccessful'. I re-entered my first name (in fact, the system re-entered it for me), I hit save but still got the 'save unsuccesful' message. I puzzled over it for a bit until I spotted that my organisation had been replaced with my email address, which is perhaps why the saved unsuccessful message doesn't go away? Corrected my profile, tried it again, the same error happened again. See screen grab below.
investigating the issue further, it looks like the @default_org variable never got set in the controller.
looks like this is now working on dmponline-test
This works fine and I've tested deleting and re-entering content. My name automatically re-entered too. @dsisu I guess getting your name entered in the org field may be an issue with the browser auto-populating fields. That didn't happen to me and any error messages went away when I saved.
Do you want to double check all is ok for you and close this out?
@sjDCC Re-filling my first name could be down to the browser but replacing organisation with email address is not down to the browser. I hadn't touched the organisation field so it shouldn't have changed at all. Sam was next to me, got him to witness what was happening. He tried it, it happened to him too.
@xsrust Things work now so this can be closed.
Looks good. Closing out.
There's an asterix against several fields under edit profile suggesting they're mandatory. You can clear the selections though and still save. Not sure if this is a bug or a placeholder towards MVP as the fields haven't been mandatory in DMPonline before. Recording it to make sure a validation is added though.![mandatory-fields](https://cloud.githubusercontent.com/assets/6169940/26300790/0b9c7728-3ed7-11e7-8ed3-1e6d13f54087.PNG)