This module and contributions is awesome. Will you be supporting a D7 upgrade path?

CommentFileSizeAuthor
#58 589552-localize.patch885 bytesAnonymous (not verified)
#58 support.es_.po60.34 KBAnonymous (not verified)
#55 support-attachment-wip.patch18.64 KBbdragon
#51 support1.patch21.63 KBAnonymous (not verified)
#51 support2.patch726 bytesAnonymous (not verified)
#50 support_overview.patch4.76 KBAnonymous (not verified)
#35 589552-fixes.patch6.45 KBAnonymous (not verified)
#33 589552-comments.patch35.51 KBAnonymous (not verified)
#27 589552.patch117.77 KBjeremy
#26 support-more-D7.patch69.03 KBAnonymous (not verified)
#25 supportD7-589552.patch199.05 KBAnonymous (not verified)
#20 support-more.patch102.38 KBAnonymous (not verified)
#19 support.patch10.7 KBAnonymous (not verified)

Comments

jeremy’s picture

Category: feature » task
Status: Active » Postponed

Yes, but all in good time. I have no need of a Drupal 7 version of the module at this time, so it's not high on my list of priorities.

If there's anyone out there interested in co-maintaining this module and managing the 7.x branch, please speak up here.

Corbula’s picture

I really need this as well. There's nothing for Drupal 7 yet that i know of.

sea4’s picture

+1 creating this for D7 would be great moving forwards.

samtayuk’s picture

I wouldn't mind managing the 7.x branch

Sam

jeremy’s picture

Anyone looking to co-maintain this project needs to first demonstrate their abilities by writing patches, reviewing patches, and regularly answering support requests through the issue queue.

jeremy’s picture

Status: Postponed » Active

I will create a 7.x branch from the 1.4 release. I've tagged 1.4-rc1 today -- we'll give people time to test before tagging 1.4 final and creating a 7.x branch.

sea4’s picture

great news! will test the 1.4 :-)

bradjones1’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev

Bumping this to 7.x version to at least get one active ticket for the D7 version showing up. I'd be interested in helping with patches, but I'm wondering if there's a roadmap worked up anywhere yet? It would be nice not to be duplicating work others have started on.

jeremy’s picture

The only roadmap at this point is to get the 7.x-1.x-dev branch working. The goal is to get it working with the fewest necessary changes (no re-architecting it). Patches are VERY welcome. I started the process, but temporarily ran out of time. I hope to get back to it, but anyone that has time feel free to upload patches. I'll be committing my changes the same day I make them, so you can be fairly confident you're not duplicating effort if you do a 'git pull' before you start working.

We'll create a 7.x-2.x-dev branch after there's a 7.x-1.x release, and in the 2.x branch we'll make better use of Fields/Views/etc.

Anonymous’s picture

Jeremy, i will start making patches. I will put those here.

jeremy’s picture

Here is the right place. Patches would be great! :)

Anonymous’s picture

StatusFileSize
new10.7 KB

Here is my first patch. Now it works. But i'm missing migrating nodeapi to new D7 API. Hope somebody can apply some of this to 7.x-1.x-dev branch. Also, any observation is welcome!

Anonymous’s picture

StatusFileSize
new102.38 KB

I continued the work. A new patch to apply after the first one. I need help on converting to D7 api queries made on support_page_form() and similar places.

Please somebody interested on getting support full working on D7? I'm constantly checking the issue.

jeremy’s picture

Attempts to apply your patches result in the following error:

   patch: **** Only garbage was found in the patch input.

Ideally please generate your patches with git as documented on this page:
http://drupal.org/patch/create

mimancillas’s picture

Implemented support.patch. Received following error when attempting to create ticket : Recoverable fatal error: Argument 2 passed to db_query() must be an array

Anonymous’s picture

Jeremy: Sorry. Now im trying to clone the git repo. I was using the .tar.gz from the releases page. I will try to post a complete patch here shortly. Also with the fixes for #22

mattbk’s picture

Title: Drupal 7 version » Drupal 7 version of Support Ticketing System

Making title distinguishable.

Anonymous’s picture

StatusFileSize
new199.05 KB

Hi! Here is the full patch. There are some parts missing, i dont know how to port. ie. support_save_message:1521, it inserts on the comment table, but on D7 column 'comment' is not there (i think it is on field_data_comment_body table).

Dont know which is the best practice or "the way" of doing that on D7 structures/apis.

Hope i get feedback of this soon!

PS: I didnt touched support submodules yet.

Anonymous’s picture

StatusFileSize
new69.03 KB

Jeremy, after previos patch, this one adjusts/ports some comments and mail related things to D7 apis.
Waiting for your review! Best regards.

jeremy’s picture

Status: Active » Needs review
StatusFileSize
new117.77 KB

The patch failed to apply completely, but it was just the very end that was corrupted so I manually applied it. I then started looking through the patch, here's some feedback:

  • The packaging info added by drupal.org should not be committed into the .info file (I removed this)
  • The LICENSE should not be added into the repository, that is added by drupal.org
  • Clients can be added, but not edited (I thought this was working pre-patch, maybe not)
  • You unnecessarily re-wrote a comment in support.install making it more confusing and incorrectly using multi-line comments (I reverted it)
  • I removed some unnecessary white space additions / changes (please don't arbitrarily change some indents from 2 spaces to 4 spaces -- when in doubt refer to http://drupal.org/coding-standards).
  • Reverted a bunch of incorrect style changes regarding {}, if, and else (see above link) (If your IDE is auto-changing this stuff, you need to reconfigure it or stop using it -- I won't spend this much time again cleaning stuff like this up just so I can find the real changes in your patch)
  • Search still needs a lot of work

At this point I've run out of time -- I spent most of the time I had this morning on just re-formatting the code so I could find the actual code changes. It looks like most of the actual patch is good, but I need to review it properly when I have more time.

One quick questions, states are saved as full text, so why this change?

-    'all' => 'all',
-    'all open' => 'all open',
-    'my open' => 'my open',
+    0 => 'all',
+    1 => 'all open',
+    2 => 'my open',

I'm attaching my cleaned up version of your patch. In the future, please do a 'git diff' and confirm that every line of your patch is actually necessary and not just a whitespace change.

Marking as 'needs review' -- I'll probably not be able to return to this until Monday at the earliest.

Anonymous’s picture

Thanks Jeremy! I will look for my IDE to stop reformatting its way (i use netbeans for PHP).
I will reapply your patch on a fresh origin/7.x-1.x, so i can continue working.
Thanks again!

Anonymous’s picture

Jeremy, about:

  $states = array(
    0 => 'all',
    1 => 'all open',
    2 => 'my open',
      ) + _support_states();

If u look below, you'll see this:

    foreach ($states as $sid => $state) {
      $items["support/$client->path/$state"] = array(
        'title' => "$state",
        'page callback' => 'drupal_get_form',
        'page arguments' => array('support_page_form', $client->clid, $state),
        'access callback' => 'support_access_clients',
        'access arguments' => array($client),
        'weight' => $sid,
        'type' => $sid == 'all open' ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK,
      );

Note that weight must be an integer (http://api.drupal.org/api/drupal/developer--hooks--core.php/function/hoo...)
So, it was a string previous to my patch.
Now, i' m also noting a problem on the next line

        'type' => $sid == 'all open' ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK,

Should be:

        'type' => $sid == 1 ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK,

I' ve fixed my netbeans to format with drupal coding standard, so i will check next time no whitespace diffs, etc, but the necessary to follow the standard.

Anonymous’s picture

My last patch at #23 was not reviewed/applied on your own patch, right ?

jeremy’s picture

> My last patch at #23 was not reviewed/applied on your own patch, right ?

Correct. I did not get to the last patch.

Anonymous’s picture

Jeremy. Here is the patch for fixing the edit client bug, and also comments port. Please discard the previos patch from #26. Now i've done it with git, after applying netbeans settings for standards coding, and after applying your patch from 27.
Waiting for your review. Thanks!

Anonymous’s picture

StatusFileSize
new35.51 KB

I forgot the attachment. Sorry.

mimancillas’s picture

I applied both 589552.patch and 589552-comments.patch -- caught a few errors.

I recieve an ajax http errror with autosubscribe + autoassign feature when creating new client.

when trying to edit a support ticket entry and resave, I get the following error :

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '30' for key 'PRIMARY': INSERT INTO {support_ticket} (nid, message_id, state, priority, client, assigned) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5); Array ( [:db_insert_placeholder_0] => 30 [:db_insert_placeholder_1] => [:db_insert_placeholder_2] => 1 [:db_insert_placeholder_3] => 2 [:db_insert_placeholder_4] => 4 [:db_insert_placeholder_5] => 1 ) in _support_node_insert_update() (line 848

Also, the module is not sending any email notifications to users.

Otherwise, things seem to run pretty smooth.

Anonymous’s picture

StatusFileSize
new6.45 KB

Here are some more fixes. I dont know ajax API yet, so i haven't tested that part.
Hope jeremy can apply those patches to the -dev branch soon!

mimancillas’s picture

It is definitely getting closer.

jeremy’s picture

Functionally this is looking quite good -- thanks for all your work on this! It took longer to review and commit than I'd like because your editor is still causing formatting regressions with database queries. For example, your patch had:

+      db_update('support_assigned')->fields(array(
+            'active' => 0,
+          ))
+          ->condition('uid', $account->uid)
+          ->condition('nid', $node->nid)
+          ->execute();

Which should instead be formatted:

+      db_update('support_assigned')
+         ->fields(array(
+           'active' => 0,
+         ))
+         ->condition('uid', $account->uid)
+         ->condition('nid', $node->nid)
+         ->execute();

You should never add 4 spaces, only 2. This affected most all the database queries your patch touches (db_update, db_select, db_insert and db_delete).

Note that comment_upload will not exist for Drupal 7, so to support attachments on ticket updates we'll need to add support for the Field API -- I think this can be done under a separate ticket after the base functionality is working.

The code in support_query_alter was commented out and flattened -- you mention earlier in this thread that you've not yet looked at the search functionality.

Committed #27 and #33. Please re-sync your latest patch, and be sure that your editor isn't adding 4 spaces to database queries. You can see what has been committed here:
http://drupalcode.org/project/support.git/commitdiff/2cb61e6

jeremy’s picture

Status: Needs review » Active

Please be sure to run 'git diff' to avoid letting unnecessary white space changes happen, for example:


- 'data' => t('No tickets available.'),
- 'colspan' => count($header),
- ));
+ 'data' => t('No tickets available.'),
+ 'colspan' => count($header),
+ ));

There was only one reject, and it's actually wrong. Instead of doing a select to determine whether to do an insert or update, you should instead use db_merge (see http://drupal.org/node/310085). I've made this change. See the full commit here:
http://drupalcode.org/project/support.git/commitdiff/f16893b

This is great, thanks for your continued effort on this! The support module is nearly usable on Drupal 7 at this point. :)

mimancillas’s picture

It has come a long way in the last week, that's for sure! The biggest missing feature is the email notification bit, but most everything else is up and running at least.

Anonymous’s picture

mimancillas: When i change a ticket status, mail notification works fine. Maybe i`m not doing your exact use case.
Please tell me the exact sequence to reproduce the "email notification" not working ?

Jeremy: I'm happy! Thanks a lot!! This is the first time i remember i'm cited as contributing to an OSS project. Excelent!!! :) I hop the next patch i can detect the damn white space problem and avoid it.

Best regards to all!!! And happy coding!

mimancillas’s picture

Lost track of the thread here. Which of the patches and/or commits are current? Or should I start with a fresh 7.x?

mimancillas’s picture

Not getting any email updates when I create or alter a ticket at all. I am trying to figure out if I missed a patch.

Anonymous’s picture

mimancillas, all changes are not applied with a fresh 7.x branch.
I get emails just fine. May be you are using a different use case? I'm here to help fix possible bugs.

bdragon’s picture

Assigned: Unassigned » bdragon

Worked on this today.

commit 75a22739ddfd008a6e6090142e7dd0a8806aa4d6
Author: Brandon Bergren
Date: Thu Apr 28 17:47:32 2011 -0500

Fix autocomplete queries.
There's still an issue with them -- they don't work for permissions assigned to anonymous / authenticated user roles!
This is not a 7.x specific bug however.

commit e3aac74e47e5386ecb3eeb4b68f121ce31d6d9ad
Author: Brandon Bergren
Date: Thu Apr 28 17:15:04 2011 -0500

Fix the select-all checkbox.

commit 0368acce9e0fde3b88fe5d5b74b4742dc6969e26
Author: Brandon Bergren
Date: Thu Apr 28 16:59:47 2011 -0500

Fix header sorting.

commit 934f79e22395ef2b10c4d73f38cd8171d48aaf15
Author: Brandon Bergren
Date: Thu Apr 28 15:53:35 2011 -0500

Fix permission name in previous.

commit f78f06cb09596fcb27a388ffe019b28628b4ede6
Author: Brandon Bergren
Date: Thu Apr 28 15:46:39 2011 -0500

Issue #1139946 by miro_dietiker: Fix early return in hook_permission() that
was causing the client permissions to disappear.

Anonymous’s picture

Hey buddies: i want to port the search parts to D7. I' dont have any experience on D6 as i just started to use and develop with D7. On D6 support used hook_db_rewrite_sql for removing support tickets from search content results. Now the available hook is hook_query_alter as stated on hook_db_rewrite_sql docs.

I tried doing that, but i need to know what is the idea on current code functionality: the boolean on support settings named 'support_remove_tickets' is intended for removing support tickets from ALL queries ? Or what?

In my first "porting" of that function, now i get no tickets on /support/some_client/all, when it has lots of tickets.

Is this right? Or i'm doing the port just badly ?

bdragon’s picture

@javier.alejandro.castro:
heads up, I just rewrote the broken support_node_access() to actually work, so access control on individual tickets should be working now (hopefully.)
9a9dedcfda24b94d2ee36bc42fe2740f6c31d0ae

(This is unrelated to the access control that is applied to queries, but affects stuff like directly going to node/nnn)

bdragon’s picture

@javier.alejandro.castro:
I just patched up some stuff in the front end part of the search that was preventing the form from working correctly.
4080434e97daeacef72139de446c508ecade041e

bdragon’s picture

Initial port of support_overview.module committed.
38b1539b998765aed64097ab291b8a6c6dc952c1

bdragon’s picture

Initial port of support_charts.module committed.
41cfaf06ffd37df1ed4e5554bf3f90846182d670

Anonymous’s picture

StatusFileSize
new4.76 KB

bdragon: A little contribution to support_overview, after getting your last changes
Best regards!

Anonymous’s picture

StatusFileSize
new726 bytes
new21.63 KB

support1.patch:
Advances on search and node_access.
I configured my netbeans for drupal coding standards, and it formats the code with "contiunation identation" (more than 1 line) with 4 spaces... dont know why the original code (in the diffs) does not comply with that standard. Anyway, if u like, discard everything but diffs to: support_query_alter() and support_search_execute() (the heart of this change)

support2.patch:
Just cosmetic patch.

bdragon’s picture

support2.patch (reverse) committed as is.

I merged support1.patch with some local fixes and then debugged the rest of support_search_execute(). Search seems to actually be working

@javier.alejandro.castro: Please review 29e1f6eb9d58671b0b02a78268a2923cd8a162f1 -- The logic is a lot simpler now, I rewrote it again based on how node_search_execute changed.

Anonymous’s picture

@bdragon: i dont know how $query->setOption works. But i guess the code is better by using powerful D7 new APIs!

bdragon’s picture

@javier.alejandro.castro: Figured out what the $enabled_states[0] stuff was about -- there's an option in the admin ui when setting the variable for 'all', and this key of this choice is 0. I just pushed some minor changes in support_overview that should make this more obvious.

bdragon’s picture

StatusFileSize
new18.64 KB

WIP patch for submission via email and upload field work.

Warning: upgrade path has not been tested with the current code.

It might work, might not, but I'm mainly dumping it here because A) it's too late to get in tonight, and B) there's a possiblity I may need to leave suddenly for a few days. (relative hospitalized)

Anonymous’s picture

@bdragon: I think we have a bug on support_query_alter() or may be it is a book.module bug?
To reproduce, enable the book module, then the book block to show book navigation.
When trying to display that book, I've got:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'nid' in where clause is ambiguous: SELECT n.title AS title FROM {node} n LEFT OUTER JOIN {support_ticket} st ON st.nid = n.nid WHERE (nid = :db_condition_placeholder_0) AND (n.type <> :db_condition_placeholder_1) AND( (st.client IN (:db_condition_placeholder_2)) OR (st.client IS NULL ) ); Array ( [:db_condition_placeholder_0] => 165 [:db_condition_placeholder_1] => support_ticket [:db_condition_placeholder_2] => 1 ) en book_block_view() (línea 286 de /var/www/html/drupal/modules/book/book.module).

May be there is a missing alias on book.module:284. This:

>
    ->condition('nid', $node->book['bid'])
<

sould be

>
    ->condition('n.nid', $node->book['bid'])
<

Or may be we have a bug on our query_alter. I dont know how to fix on our side. May be it is a book bug?

Best regards!

Anonymous’s picture

@bdragon: Forget last comment. I've confirmed that is a book.module bug. Already reported it. #1013864: Book navigation block fails with Node Access modules

Anonymous’s picture

StatusFileSize
new60.34 KB
new885 bytes

A little fix for unstranslated content. Also, it seems in some places we are using variables on menu titles, which gives me warnings using the potx module. Next time i get one i'll post here to get help on fixing that too.
Also, i contribute the spanish translation of support. Hope spanish users help me refine this!
@bdragon: Could you commit this .po file on support git ?

bdragon’s picture

@javier.alejandro.castro:

Committed the missing t()s, thanks. (3dfc2db013505b15b15eef64eff75c6cf59f74c7) However, PO files no longer go in the repository. I suggest signing up at http://localize.drupal.org/ (There are some good instructions at http://drupal.org/node/302194 )

bdragon’s picture

Heads up: I just pushed a huge update that I've been working on for a couple weeks.

jeremy’s picture

Status: Active » Fixed

Closing meta ticket; rolling release candidate.

Status: Fixed » Closed (fixed)

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

paracuenta’s picture

como coño se descarga esta mierda drupal de la mujer del pelotero

taps7734’s picture

Still looking for an upgrade path from 6.x to 7.x for this module. Any word on it?

jeremy’s picture

Please test an upgrade and open bugs if you run into problems. There's no reason to think everything will break on upgrade, and no way it's going to get fixed if upgrade errors aren't reported.

Be sure to test on a backup of your website! And please report errors in new tickets, don't reopen this old one.