Hey,

I'm having problems assigning tickets. So far I have created 3 clients and 6 users on the system. I can create tickets fine but when I try to assign a ticket to another user I only get the name of the current user in the dropdown list.

In the jobtrack module section of the permissions I have checked off "can assign tickets to other users" for the right users. Even when I log in as the super administrator I can't assign tickets to individual users just to the admin.

Is there something obvious I'm missing?

Thanks

Comments

jeremy’s picture

Status: Active » Fixed

In order to be able to assign a ticket to a user, that user has to be able to access that ticket. Thus, for example if you have a client named "Foo", then you need to assign "access Foo tickets" permissions to all users that we want to be able to assign Foo tickets to. With that done, anyone with "can assign tickets to other users" permissions should be able to assign tickets to other users with "access Foo tickets" permissions.

I recommend you read through INSTALL.txt to get a better understand of how the module is designed to work. See #5 in that file for more details on permissions.

paddy_mul’s picture

Status: Fixed » Active
StatusFileSize
new4.18 KB
new3.51 KB

Hey, Thanks for the reply I have the permissions setup as suggested in the install.txt but the problem still exists. I have found a way to assign tickets to users though.

When I sign in as a client and straight away click on "create ticket" I can't assign tickets to any users (only to the logged in client). If however I go to view the job tickets of any client first then I return to "create ticket" I can now assign tickets to any of the users. Is this the normal workflow?

Thanks for your help attached below are two screenshots the first is when the admin tries to create a job ticket immediately and the second is after going view the job tickets of a client first before creating a job ticket.

jeremy’s picture

Title: Can't assign tickets to other users » Make it possible to assign ticket to other user at ticket creation
Category: support » feature
Status: Active » Postponed

This is currently the normal/expected workflow. In order to know who can be assigned a ticket, the module needs to know which client the ticket belongs to. It currently does not implement AHAH, so you can not assign the ticket to anyone until it has been saved the first time and a client has been set.

Marking this as a feature request, and updating the title. Patches are welcome to make the module utilize AHAH so that this is possible. Putting it into a postponed state until someone contributes a patch, or provides funding, or I end up with a need myself.

jeremy’s picture

jeremy’s picture

Project: Jobtrack » Support Ticketing System
Version: 6.x-1.4 » 6.x-1.0-rc1

Moving to support project.

jeremy’s picture

Status: Postponed » Active
StatusFileSize
new5 KB

I took a stab at implementing support for this today, but ran out of time. I'm going to go ahead and post what I've got so far in case someone else gets a chance to finish it before I get around to looking at this again. Be sure to flush your caches after applying this patch, necessary for the ahah callback to be added to your menu. (Ultimately I'll automate this in the install file, but not until it fully works).

What works:
1) It works whether Assigned is a select or a autocomplete textfield
2) When a new client is selected, it correctly updates Assigned with the available users (if select -- otherwise it updates the autocomplete path)

What's broken:
1) If you try and submit a ticket after changing the Client and you Assign the ticket to a user that wasn't available in the first client, you get a validation error.
2) If you select a new Client, and the previously Assigned user doesn't have access to the new client, you get an error
3) Permissions have not been implemented

There's no need for you to test this unless you plan to help fix the remaining issues and submit a new patch.

jeremy’s picture

Status: Active » Postponed

This actually works now, so long as you view the client before you create the ticket. Anyone wanting to cleanup the AHAH in the above patch to improve the functionality is welcome.

rsevero’s picture

Status: Postponed » Needs review
StatusFileSize
new0 bytes

I've tried the above patch on lastest dev code and it wasn't working.

Here is a new patch that don't have neither problems 1 nor 2 from #6. It stills has problem 3 from #6.

There is one thing that doesn't work and I can't figure how to solve: you can't ask to preview a comment. You have to save it without previewing.

jeremy’s picture

Status: Needs review » Needs work

The last uploaded patch is 0 bytes, so nothing to review.

We'll still need to solve the remaining issues, but awesome to learn that this has been getting close to something that can be merged.

rsevero’s picture

Status: Needs work » Needs review
StatusFileSize
new10.09 KB

Attaching the actual patch. Sorry for the noise.

rsevero’s picture

Version: 6.x-1.0-rc1 » 6.x-1.4

I can re-roll this patch for the latest release version, please let me know if there is interest.

jeremy’s picture

Status: Needs review » Needs work

Are you still able to re-roll this, and provide a status update? I'd love to merge this if it's working well.

jeremy’s picture

Version: 6.x-1.4 » 6.x-1.x-dev
Status: Needs work » Needs review
StatusFileSize
new10.75 KB

It applied with fuzz and one simple manual fix. Uploading new patch, needs review.

jeremy’s picture

Status: Needs review » Needs work

I took a look at the resulting patch -- your editor is breaking Drupal's coding standards, modifying code to mis-format it that isn't otherwise changed, so I'm unable to properly review the actual patch.

With the patch applied, attempting to switch clients results in an encoded error from the jquery callback. Looks like this still needs works -- let me know if you're still around and interested in working on it.

bdragon’s picture

Wergles’s picture

Version: 6.x-1.x-dev » 6.x-1.8
Component: User interface » Code
Assigned: Unassigned » Wergles
Status: Needs work » Needs review
StatusFileSize
new10.1 KB

I've regenerated the patch against 6.x-1.8 so it gets applied with no fuzz and no offset.

Cheers.

leducdubleuet’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #16 works flawlessly against 6.x-1.8, thank you Wergles!

jeremy’s picture

Version: 6.x-1.8 » 6.x-1.x-dev
Status: Reviewed & tested by the community » Needs work

The patch applies with fuzz, but I'm still getting an encoded error from the jQuery callback.

An error occurred. 
/foo/support/update_ticket
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="/foo/misc/favicon.ico" type="image/x-icon" />
  <title>Bar | Foo Support</title>
  <link type="text/css" rel="stylesheet" media="all" href="/foo/sites/localhost/files/css/css_b62cad44e552d7a4e8987c612aaea638.css" />
<link type="text/css" rel="stylesheet" media="all" href="/foo/sites/localhost/files/css/css_44c1b7998ec39a17c30af7c6d8dbd46c.css" />
<!--[if lte IE 7]>
<link type="text/css" rel="stylesheet" media="all" href="/foo/sites/localhost/files/css/css_0c305b3ce982a578ed41304c12c3db62.css" />
<![endif]-->
  <script type="text/javascript" src="/foo/sites/localhost/files/js/js_598695d20a2ced883ecd2e0d50a77e43.js"></script>
<script type="text/javascript">
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, { "basePath": "/foo/" });
//--><!]]>
</script>
</head>

<body class="page not-front logged-in page-support one-sidebar sidebar-left">
  <div id="page" class="clearfix ">
    <div id="page-inner" class="container-16 clearfix">

      <div id="header-wrapper">
                <div id="logo-wrapper">
          <a href="/foo/" title="Home" rel="home">
            <img src="/foo/sites/all/themes/tag6fluid/images/logo.png" alt="logo" title="Foo Support" width="100" height="90" class="logo" />          </a>
        </div>
        
        <div id="header-inner" class="grid-14">
                    <div id="site-branding">
                        <h2 class="site-name"><a href="/foo/" title="Home" rel="home">
              Foo Support            </a></h2>
                                  </div>
          

                    <div id="site-navigation">
                                    <form action="/foo/support/bar"  accept-charset="UTF-8" method="post" id="search-theme-form">
<div><div class="container-inline">
  <div id="edit-search-theme-form-1-wrapper" class="form-element form-item form-text-wrapper form-textfield-wrapper">
  <label for="edit-search-theme-form-1">Search this site:</label>  <input type="text" maxlength="128" name="search_theme_form" id="edit-search-theme-form-1" size="15" value="" title="Enter the terms you wish to search for." class="form-text" />    
</div>
<input type="submit" name="op" id="edit-submit-1" value="Search"  class="form-submit" />
<input type="hidden" name="form_build_id" id="form-325c9165ed257ada7eb8526ea5601cc2" value="form-325c9165ed257ada7eb8526ea5601cc2"  />
<input type="hidden" name="form_token" id="edit-search-theme-form-form-token" value="cd539883e6eb10701695c66b0b9f193e"  />
<input type="hidden" name="form_id" id="edit-search-theme-form" value="search_theme_form"  />
</div>

</div></form>
          </div>
                  </div>
      </div>


            <div id="page-header" class="grid-16">
        <div class="status-messages">
  <ul class="messages error">
      <li class="message">Client does not exist or is not enabled.</li>
    </ul>
</div>
                      </div>
      

      <div id="page-content-wrapper" class="grid-13 push-3">
                <div id="content-header">
          <div class="breadcrumb"><a href="/foo/">Home</a></div>          <h1 class="page-title title">Bar</h1>          <ul class="tabs primary">
<li ><a href="/foo/support/bar/all">all</a></li>
<li class="active" ><a href="/foo/support/bar" class="active">all open</a></li>
<li ><a href="/foo/support/bar/my%20open">my open</a></li>
<li ><a href="/foo/support/bar/new">new</a></li>
<li ><a href="/foo/support/bar/active">active</a></li>
<li ><a href="/foo/support/bar/pending">pending</a></li>
<li ><a href="/foo/support/bar/closed">closed</a></li>
<li ><a href="/foo/support/bar/blocked">blocked</a></li>
<li ><a href="/foo/support/bar/invoice">invoice</a></li>
</ul>
<ul class="tabs secondary">
<li ><a href="/foo/support/bar/all%20open/maintenance">Maintenance</a></li>
<li ><a href="/foo/support/bar/all%20open/other">Other</a></li>
</ul>
                  </div>
        
        <div id="content">
          <form action="/foo/support/bar"  accept-charset="UTF-8" method="post" id="support-page-form">
<div><fieldset class=" collapsible collapsed"><legend>Filter by</legend><fieldset class=" collapsible collapsed"><legend>Assigned</legend><div id="edit-uid-wrapper" class="form-element form-item form-select-wrapper">
    <select name="uid[]" multiple="multiple"  class="form-select" id="edit-uid" ><option value="-1">- not assigned -</option><option value="5612">jeff@foo.com</option><option value="1">jeremy@foo.com</option></select>    
</div>
</fieldset>
<fieldset class=" collapsible collapsed"><legend>State</legend><div id="edit-sid-wrapper" class="form-element form-item form-select-wrapper">
    <select name="sid[]" multiple="multiple"  class="form-select" id="edit-sid" ><option value="1">new</option><option value="2">active</option><option value="3">pending</option><option value="5">blocked</option><option value="4">closed</option></select>    
</div>
</fieldset>
<fieldset class=" collapsible collapsed"><legend>Priority</legend><div id="edit-pid-wrapper" class="form-element form-item form-select-wrapper">
    <select name="pid[]" multiple="multiple"  class="form-select" id="edit-pid" ><option value="5">lowest</option><option value="1">low</option><option value="2">normal</option><option value="3">high</option><option value="6">urgent</option><option value="4">critical</option></select>    
</div>
</fieldset>
<input type="submit" name="op" id="edit-submit" value="Update"  class="form-submit" />
<a href="/foo/support">Reset</a></fieldset>
<a href="/foo/node/add/support-ticket">Post new support ticket</a><table class="support sticky-enabled">
 <thead><tr><th class="select-all"></th><th><a href="/foo/support/bar?sort=asc&order=Id" title="sort by Id" class="active">Id</a></th><th><a href="/foo/support/bar?sort=asc&order=Ticket" title="sort by Ticket" c
purencool’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)