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

Wrong Error on contact.project.add if project not applicable #80

loechel opened this Issue Feb 19, 2015 · 3 comments


2 participants

loechel commented Feb 19, 2015

If you try to add a contact to a non existing project, or a project that has no CRM-Modul activated but Redmine CRM installed you get a wrong error.

*** ResourceRequirementsError: The following requirements must be installed for resource to function: CRM plugin >= 3.4.0

might there a way to give a better feedback?

@maxtepkeev maxtepkeev self-assigned this Feb 19, 2015


This comment has been minimized.


maxtepkeev commented Feb 19, 2015


Unfortunately before Redmine 2.6.0 is was impossible to get any information about what modules are enabled for a project via REST API, since 2.6.0 there is a include=enabled_modules option which will return all enabled modules for a project.

At the moment it works as follows: if a Redmine returned a 404 error and you're working with a RedmineCRM resource than a ResourceRequirementsError will be raised because chances are very high that you've just didn't enable the plugin. I know that this behaviour can lead to improper decisions but this is the only option that somehow works for all Redmine versions.

I can do 2 things to solve a problem:

  1. A ResourceRequirementsError message can be changed to better describe the situation
  2. A check for enabled_modules can be done and if a Redmine >=2.6.0 is used then it will work.

I will put this 2 things on my TODO list.


This comment has been minimized.


loechel commented Feb 19, 2015

Thanks, that would be fine.

You could actually do a third thing that would help, write a short hint in the documentation

Also for Redmine >=2.6.0 where you could check that it the modul is avaliable, you could lookup if the related project exists and is open. But that might not be necessary

Thanks for your work

maxtepkeev added a commit that referenced this issue Feb 20, 2015


This comment has been minimized.


maxtepkeev commented Feb 20, 2015

Fixed in 32a8f43.

I don't think that with these new error messages we'll need any hints in the docs. If you disagree, please let me know what hint exactly you would like to see in the docs.

Thanks for the bug report.

@maxtepkeev maxtepkeev closed this Feb 20, 2015

@maxtepkeev maxtepkeev added bug and removed improvement labels Feb 20, 2015

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