Project:Case Tracker
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

What happened to the ability to restrict the 'assign to' in casetracker? I see it's still a feature in 5.x, but was removed in 6.x.

Comments

#1

Status:active» patch (to be ported)

I have attached a patch that does the following:

  • Adds a new permission: "assign Cases"
  • Gave the casetracker_user_options() function two arguments - the case node, and a boolean for whether or not to return all users. If the second argument is false, it returns the default assign_to, the current assign_to (from the passed $node), and the currently logged in user
  • Changed the line that calls that function to casetracker_user_options($node, user_acccess('assign cases'))

Dreamweaver does weird things with whitespace so I had to run diff with the w flag, so after patching the code might need some indentation adjustment.

AttachmentSize
casetrackerAssignPerm.patch 2.24 KB

#2

Status:patch (to be ported)» needs review

Sorry I haven't gotten to this yet. if anyone else can help with a review in the meantime I'd appreciate it.

#3

Status:needs review» needs work

I like the idea here, but there are two things we need to address with the current patch

  1. because casetracker_user_options() is used in the casetracker_views_handler_filter_user_options views handler we can't always assume we're using it in the context of a node. It should work also in that kind of 'filter form' context.
  2. I'd like it better if the permission check was inside of casetracker_user_options(). The function should be able to tell when it needs to run the check (if we're looking at a node) and so it's better to just take care of it inside that function.

If we can address those things this should be good to go.

#4

I think this would be a great feature.
Subscribing

#5

Status:needs work» needs review

Rerolled/reworked against beta 4 with my SVN of Open Atrium.
(If this doesn't apply and needs to be against CVS let me know :)

I think the code has changed quite a bit since the original patch was made; in particular, I'm not sure what casetracker_user_options() used to do and does now.

This patch hides the assign options element completely (needs some fiddly stuff in the theme function, due to #691628: Don't use tables for a lists of things in forms); and if a user who doesn't see this element creates an issue it is assigned to Anonymous; if the user edits an existing one its assignee is unchanged.

AttachmentSize
464834.casetracker.perm-assign-case.patch 1.66 KB

#6

Status:needs review» fixed

Comitted patch from #5 http://drupal.org/cvs?commit=327942

Thanks!

#7

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here