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

Org visibility plan will appear in the public DMPs only if filled 100% #3086

Closed
magdalenadrafiova opened this issue Jan 11, 2022 · 4 comments
Assignees

Comments

@magdalenadrafiova
Copy link

Currently when the researcher wants to make their plans visible, it says in the description that it has to be filled at least 50%, however, it is not true as a plan will not appear unless it is 100% filled.
Could we change this back to 50% percent of the plan has to be filled as appears in the text for the researchers?

@briri @raycarrick

@raycarrick-ed
Copy link
Contributor

or, alternatively, make the % of the plan that has to be filled in customisable by instance. That might be a slightly more flexible way to go with, maybe, an eventual jump to making it customisable by org if there is demand for this.

@nicolasfranck
Copy link
Contributor

The problem is also: 50% of what? There can be multiple phases..

johnpinto1 pushed a commit that referenced this issue May 10, 2022
one could only share plan if it is 100% completed. When this is set in
property config/initializers/_dmproadmap.rb, e.g.,
188:    config.x.plans.default_percentage_answered = 50.

Fix for Roadmap bug #3086.

In app/models/phase.rb method visibility_allowed?(plan) is broken
because the first line in method always return 0 unless the Rational()
is 1 in
  value = Rational(num_answered_questions(plan), plan.num_questions) * 100

Change:
- we fix issue by converting the Rational() value to a float as follows
    value = Rational(num_answered_questions(plan), plan.num_questions).to_f * 100
@johnpinto1
Copy link
Contributor

The fix in PR #3172

@pherterich
Copy link

Closing here as this is now included in release 3.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants