We are having troubles manually subscribing users - the "Subscription" section seems buggy. When a user comments on a ticket they can check the subscribe box and they are subscribed, but if I try and add another user through the autocomplete field the subscribe fails and it appears to remove anyone else who is also subscribed.
We need to fix this so authorized users can subscribe others to tickets...
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | Fix_subscription_save-1418200-15.patch | 1.43 KB | fuzzy76 |
| subscribe-bug.ppt | 419.5 KB | RobertPope |
Comments
Comment #1
jeremy commentedConfirmed, auto-subscription is not working properly when using autocomplete. Increasing priority to resolve before a stable release.
Comment #2
chwilson commentedHas there been any news for a fix for this issue in any of the 1.x-1.0 versions?
I have found a ,not so elegant, work around. If you assign the ticket to the user you want to subscribe to the ticket, update the ticket, they will be added to the subscription list.You can then reassign the ticket ticket how ever you want as long as you don't directly mess with the subscription list itself (if you directly change it at all, it will wipe the list again except for the user who changed it).Edit:
I came back to look for a fix for this but haven't found anything yet. The work around I posted above no longer works with the current version of Drupal 7
Comment #3
krazykellie commentedI am experiencing the same issue....does anyone have any update to this?
I've even tried making it checkboxes for users but it doesn't email them either.
Comment #4
chwilson commentedI just realized that there may also be some misunderstanding on the issue with this ticket from Jeremy's post.
Auto-subscribe (through the support client settings) is working fine. The problem is the manual subscription field in the tickets themselves. I'm not a coder, but it seems like the issue is instead of grabbing the list of users from the field, it seems to only grab the account of the current user (the one making the change). I don't think its a problem with the auto-complete fields as they work correctly in other settings (client settings and the assigned field).
Comment #5
ryan.ryan commentedI can confirm that there is an issue when creating a ticket. In our experience, when creating a new ticket, either only the creator is shown as a notification OR all users are shown AND checked to receive a notification. I haven't been able to pinpoint what causes it to go one way or the other. I did a manual test and the former occured about 75% of the time.
Comment #6
dewolfe001 commentedI can confirm the same thing: I add users to the subscribed field. Those references are not be stored. I did put drupal_set_messages() into the code, but none of those are being tripped with content.
I looked through the code and I don't see anything in the module to process the subscribed_users field when it is submitted. If it's not being processed, then it cannot be stored. Am I just missing where it is processing? Likewise, I couldn't see anything like a support_ticket_node_form_submit() function to read in and store these values. I am going to look into the D6 install of Support (the D6 version was really solid and it tempted me to deploy a D6 install solely to get all of the functionality that comes from Support).
Comment #7
dewolfe001 commentedI looked into the support.module file. There are two problems and they are repeated in two places.
The problems happen inside of
function support_node_validate($node, $form, &$form_state)and inside offunction _support_node_insert_update($node)$autocomplete = 'subscribed-users';needs to be$autocomplete = 'subscribed_users';References to
$node->$autocompleteneeds to be$node->{$autocomplete}I made the changes to my install and these changes have fixed this problem.
Comment #8
jeffsheltren commentedThanks dewolfe001 for tracking this down. I don't have an install handy to test this out at the moment, but here's a patch against the latest 7.x-1.x branch with your suggested changes to $autocomplete, which seem correct to me. I don't think the curly braces addition to $node->$autocomplete is required, but would appreciate someone testing this out to verify.
Comment #9
jeffsheltren commentedComment #10
dewolfe001 commentedI added the curly braces because I found that $node->$autocomplete was ending up unpopulated. When I tried $node->{$autocomplete} it was making the reference to $node object's property.
Comment #11
janis_lv commentedyep, got the same issue. will try the patch
edit.
I also added the {} to node autocomplete.
if the user has "administer support" permissions then the autocomplete now works on both forms (node and comment), if done via node, edit, after the save the form was blank. but the emails were sent on new comment.
- maybe I messed something up.
seems that after my patching and "fixing" I messed up the comment form, it will auto complete but won't save.
Comment #12
alex commentedThank you dewolfe001 for $autocomplete = 'subscribed-users';
It fixed the manual subscription in the ticket edit form.
To fix the comment form, I found changing
$notify = "notify-$uid";to
$notify = "notify_$uid";on line 1138 works wonders ;)It's like a three years old bug, time to put it to rest?
Comment #13
fuzzy76 commentedCan confirm patch on 7.x-1.0-rc2
This made stuff break every time I tried to create a ticket on behalf of a user. The ticket ended up without the user subscribed.
Comment #14
fuzzy76 commentedNo. Replying sometimes still clears the field. Will investigate further.
Comment #15
fuzzy76 commented...and if I had read the comment from alex, I would've know. Oh well. Here is a new one with his fixes.
Comment #16
jeremy commentedIf someone else can test this and confirms it works, I'm happy to merge. I'm not actively using the 7.x branch myself at this time (instead still using 6.x and focusing on the 8.x branch).
Comment #17
hkovacs commentedSo I applied this patch and I see the changes in the code... However I seem to have a different bug and maybe there is a patch in another issue and once that is patched then I can resume testing this...
So my bug is that I dont get any emails when editing a ticket. Only when creating a ticket. Can someone point me to the issue for this? I couldn't find one.
Comment #18
purencool commentedComment #19
purencool commented