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

Mandatory fields in Project Focus (My RSR Project Editor) #2351

Closed
nadiagorchakova opened this issue Sep 1, 2016 · 7 comments
Closed

Mandatory fields in Project Focus (My RSR Project Editor) #2351

nadiagorchakova opened this issue Sep 1, 2016 · 7 comments

Comments

@nadiagorchakova
Copy link
Contributor

nadiagorchakova commented Sep 1, 2016

I encountered the following issue in RSR Test env:

  1. Fields 'Policy Marker' and 'Policy Marker Significance' fields are not marked as mandatory until you fill them in.
  2. Even after you fill in all mandatory fields, the progress bar for the section stays yellow.

This is true when IATI or DGIS standard was checked in the Project settings.

screen shot 2016-09-01 at 12 26 55

Please review. Thanks!

@nadiagorchakova
Copy link
Contributor Author

Same thing in RSR UAT env.
You can have a look at these (unpublished) projects:
RSR Test: http://rsr.test.akvo.org/en/myrsr/project_editor/4521/
RSR UAT: http://rsr.uat.akvo.org/en/myrsr/project_editor/4005/

@nadiagorchakova
Copy link
Contributor Author

Annabelle found same issue in RSR Live (Watershed)
http://rsr.akvo.org/en/myrsr/project_editor/4367/

@zzgvh
Copy link
Contributor

zzgvh commented Sep 2, 2016

Looking both here and here I cannot find that Policy marker should be mandatory. Sector seems to be the only classification that's required. But I've only done a quick read. Or do we have special rule sets that go above the IATI requirements?

@nadiagorchakova
Copy link
Contributor Author

Gabriel, you're right! Geert has just changed the settings in http://rsr.test.akvo.org/en/admin/, so now only sector is mandatory. The completion bar is yellow, not matter how many fields you enter though.

@gabemart
Copy link
Contributor

gabemart commented Sep 5, 2016

After having a look, I agree with theory of @zzgvh that this behaviour is caused by rsr_policymarker.policy and rsr_policymarker.significance being set to "read only" in the admin interface

image

This status is not implemented in the project editor, or in the project_editor.py template tag. mandatory_or_hidden only checks for validation_action values of "1" or "2", but "readonly" sets a validation action of "3".

If we wanted to implement this, we would have to edit mandatory_or_hidden to add something like a "readonly-{0}" class when the action is 3, and then edit the project editor to give elements with that class a readonly html attribute of "true". We could base this on markMandatoryFields which works in a very similar way.

If we don't want to implement this, we just need to disable "Read only" as an option in the django admin

zzgvh added a commit that referenced this issue Sep 8, 2016
In section 8 there are two linked fields for the sector vocabulary and sector code. The bug where you can never fully complete section 8 is because two of the three sector code fields are always hidden, but are counted among the mandatory fields.

Fix by adding a check in markMandatoryFields() to exclude fields that have a parent with the always-hidden class.
zzgvh added a commit that referenced this issue Sep 8, 2016
Removed the READ_ONLY_ACTION and all references to it for now.
zzgvh added a commit that referenced this issue Sep 16, 2016
Remove commented references to read-only fields in ProjectEditorValidation.

Also small edit in project_editor.py
punchagan added a commit that referenced this issue Sep 16, 2016
punchagan pushed a commit that referenced this issue Sep 19, 2016
In section 8 there are two linked fields for the sector vocabulary and sector code. The bug where you can never fully complete section 8 is because two of the three sector code fields are always hidden, but are counted among the mandatory fields.

Fix by adding a check in markMandatoryFields() to exclude fields that have a parent with the always-hidden class.
punchagan pushed a commit that referenced this issue Sep 19, 2016
Removed the READ_ONLY_ACTION and all references to it for now.
punchagan pushed a commit that referenced this issue Sep 19, 2016
Remove commented references to read-only fields in ProjectEditorValidation.

Also small edit in project_editor.py
@zzgvh
Copy link
Contributor

zzgvh commented Sep 19, 2016

A note for the deployment of this fix. Check that there are no validations set to Read-only. If there are any they should be removed before deploying, as they will break the admin page for project editor validation sets.

punchagan added a commit that referenced this issue Sep 20, 2016
@zzgvh
Copy link
Contributor

zzgvh commented Sep 22, 2016

Fixed in #2357

@zzgvh zzgvh closed this as completed Sep 22, 2016
@zzgvh zzgvh removed the In Progress label Sep 22, 2016
@nadiagorchakova nadiagorchakova added this to the 3.16 Tegucigalpa milestone Sep 28, 2016
@MichaelAkvo MichaelAkvo added this to RSR Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants