giddie / redmine_default_assign

Redmine ticket #482:Default assignment setting -- converted to a plugin and then extended.
Other
34 stars 26 forks source link

Few fixes #26

Closed ddk85 closed 8 years ago

giddie commented 8 years ago

Could you explain the purpose of the script?

ddk85 commented 8 years ago

If "interactive_assignment" didn't checked - you coldn't check "self_assignment". Maybe it's too much complexity...

2015-11-19 14:45 GMT+03:00 Paul Gideon Dann notifications@github.com:

Could you explain the purpose of the script?

— Reply to this email directly or view it on GitHub https://github.com/giddie/redmine_default_assign/pull/26#issuecomment-158032495 .

giddie commented 8 years ago

I think they're separate features; is there a link between self_assignment and interactive_assignment that I haven't thought of? I think it would still be useful to be able to set self_assignment if interactive_assignment is disabled.

ddk85 commented 8 years ago

The link is in code :))) In default_assign_issues_hooks.rb at line 10: return if not interactive_assignment

So it doen't work if only self_assignment checked :)

I think that you are right and functions could be used separatly, but we need to make changes in code.

2015-11-19 14:58 GMT+03:00 Paul Gideon Dann notifications@github.com:

I think they're separate features; is there a link between self_assignment and interactive_assignment that I haven't thought of? I think it would still be useful to be able to set self_assignment if interactive_assignment is disabled.

— Reply to this email directly or view it on GitHub https://github.com/giddie/redmine_default_assign/pull/26#issuecomment-158035710 .

giddie commented 8 years ago

I tested the functionality before pushing, and I think it already behaves correctly. The method in default_assign_issues_hooks is called as the issue form is rendered (or re-rendered via AJAX), so it affects what is visible on the form before it is submitted. This is the functionality that is switched off when interactive_assignment is switched off.

However, in the default_assign_issue_patch file, you'll find the method that is called when the form is submitted. This logic is applied regardless of whether interactive_assignment is set or not. This is the part of the plugin that sets an assignee if one was not selected on the form.

giddie commented 8 years ago

I'm going to close this, but feel free to re-open if you think I missed something.