jijeshmohan / redmine_track_control

Redmine Plugin to control issue creation with specific tracker
http://jijeshmohan.wordpress.com/2011/12/24/redmine-tracker-control-plugin-released
Other
18 stars 17 forks source link

Creating subtask without having permission on parent issue tracker #20

Closed danieleped closed 10 years ago

danieleped commented 10 years ago

In my Redmine I have multiple trackers, multiple roles and crossed permissions: let's say "developer" user can create issues with "bugfix" tracker and "salesman" user can create issues with "request" tracker but not viceversa.

Then, if "developer" user tries to create a subtask on a "request" issue, the following view is kind of broken, not displaying tracker selection at all and reporting some "random" fields. By clicking on Create at the bottom, the page returns an error but magically heals itself, showing the correct expected view expected! Obviously, the same error is achievable also if "salesman" user tries to create a subtask under "bugfix" issue...

I think users should not be forced to have "create issue" permissions on a specific issue tracker if they only have to create subtask (with different trackers, naturally: the ones they're in charge of) on it. And it looks like it's not only my thought, since forcing the subtask creation when the view is broken leads to the expected page!

Anyone experienced this? I looked for some information on it but I didn't find anything...

My Redmine installation comes from Bitnami stack 2.4.2-0, containing:

and plugins:

danieleped commented 10 years ago

Are you going to have a look at it, @jijeshmohan ? Thank you in advance.

jijeshmohan commented 10 years ago

Will have a look at this issue in weekend.

danieleped commented 10 years ago

Thanks a lot, I'll try to support you in the testing phase, if needed.

danieleped commented 10 years ago

Any news, @jijeshmohan? Don't wanna bother you, but I'd like to know if you're planning to fix it or not. Unfortunately I'm not good at RoR to help you with a fix or a patch...

To add a detail, if useful: after clicking "create" to unlock the subtask page, also the parent task information get lost, so it has to be introduced manually after that.

Thank you.

jijeshmohan commented 10 years ago

Not yet fixed. Will update you..

danieleped commented 10 years ago

Thank you, at disposal for further details.

jijeshmohan commented 10 years ago

Hi,

I tried this scenario with a sample installation but it working fine . This is the flow I have tried, let me know if the flow is correct.

danieleped commented 10 years ago

I think your plugin is working as you're describing, but my problem was slightly different: starting from your example, why the Developer should not be able to create a "Feature" subtask under "Defect"?

Now, as a workaround, once I'm not able to create such subtask, I have to force the creation of..."nothing" and then the page answers me with an error message, but then I'm able to create my new issue; unfortunately, this way I lose the parent task information, which has to be inserted again manually.

my flow would be (consider the situation you've depicted):

I think it's reasonable to let a user create one of its own subtask under a task which is not under his control, in our company it works like this: sales engineer proposes a task and then software engineer describes the work in depth in a specific subtask.

what do you think?

thank you

jijeshmohan commented 10 years ago

Thanks for the details, I understood the flow now. I have tried it in a new redmine instance with only this plug-in and it worked .

Means, a Developer can open a Defect which created by Customer and add feature sub tasks ( but not Defect task).

danieleped commented 10 years ago

You were right, it was my fault! Weeks ago I set "Tracker" and "Parent Task" as read only in the default tracker, so while trying to create a subtask, Parent task information was getting lost, and tracker didn't appear.

Now I took out the Read Only attribute on them, and everything works as expected.

The only strange behavior is that Parent task field shows its "magnifier lens" near the number while it is in the default tracker just after click "add subtask", but then changing the status refreshes the page and the magnifier disappears, as well as advanced in-field search for parent task. But I don't think it is related to you plugin.

Thank you very much @jijeshmohan , and sorry for bothering you.

jijeshmohan commented 10 years ago

Thanks for the feedback . Closing this defect.