Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't change status to "pending" on a contribution with empty required fields #263

Open
ghost opened this issue Jul 14, 2015 · 5 comments
Open
Labels

Comments

@ghost
Copy link

ghost commented Jul 14, 2015

We used to have this problem, have a look at this http://cm.geokey.org.uk/#/project/9/contribution/65?center=51.5550:-0.1447:15&layer=1&tab=3 and try to suspend contribution.

@ghost ghost added the bug label Jul 14, 2015
@ghost ghost assigned oliverroick Jul 14, 2015
@oliverroick
Copy link
Contributor

When you think about it, it makes sense. A mandatory field is a mandatory field. The reason this contribution is on the map dates back to a bug we fixed a while ago. It should not be possible for invalid contribution to have any other status than "draft".

@ghost
Copy link
Author

ghost commented Jul 14, 2015

But how it was active in the first place? Either a new field was added, which is mandatory, or an existing field was made mandatory.

Do I have to leave it like this? User gets a notification about empty mandatory fields, but if he's a moderator, not the creator of a specific contribution, he might not know what to fill in the mandatory field.

@oliverroick
Copy link
Contributor

but if he's a moderator, not the creator of a specific contribution, he might not know what to fill in the mandatory field.

In order to solve this, we have to touch the way status is updated. Currently it is handled as a normal update, hence the fields are validated each time, you change the status. You would have to separate status updates from property updates, if you want this behaviour.

@ghost
Copy link
Author

ghost commented Aug 24, 2015

Actually, I noticed CM already gives a message about empty required fields, when 400 response code is given by GeoKey.

It's up to you either to close the issue, or leave it if some other solution comes out.

@oliverroick
Copy link
Contributor

This can only be addressed by not updating the observation's properties when the status is updated to pending.

The actual problem is bigger—how do we deal with the following scenario:

Category plus fields and some contributions using that category are created. Later the project admin adds another required field to the category. When a moderator edits the contribution the required field has to be filled—how to we make sure that data is entered correctly? In order to ensure integrity of the data set, mandatory field should always be filled, hence the validation step when updating a contribution.

@ghost ghost unassigned oliverroick Jan 27, 2016
@ghost ghost added the wontfix label Jan 29, 2016
@ghost ghost removed the bug label Jul 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant