Page MenuHomePhabricator

Create OTRS patch for "1-click spam" disposal
Closed, ResolvedPublic

Description

With the upgrade to OTRS v. 3 the former "1-click spam" patch was no longer functional. This was an extremely useful tool for our agents and we have had numerous requests for it to be re-enabled.

The former obsolete patch/code is available at http://svn.wikimedia.org/svnroot/mediawiki/trunk/otrs/patches/50-one-click-spam.patch if that is of help. I am unsure of the reasons the code was no longer compatible post upgrade.


Version: wmf-deployment
Severity: enhancement

Details

Reference
bz54755

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:25 AM
bzimport added a project: Znuny.
bzimport set Reference to bz54755.
bzimport added a subscriber: Unknown Object (MLST).

Created attachment 13856
one click spam button

JavaScript that adds a button which says "SPAM", and implements the one-click-spam functionality in QueueView.

Note that it looks a bit weird in Firefox (top is cut off), but fine in Chromium using OSX 10.9.

attachment file_54755.txt ignored as obsolete

I guess that it needs to be added to the operations/software/otrs repo.

Created attachment 13876
v2

New patch sends the request asynchronously and hides the ticket after success rather than reloading the page.

Also it loads better.

attachment file_54755.txt ignored as obsolete

I have tested the proposed patch and found no issues. It works great. For reference, my UA is as follows:

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0

I would support enabling this as soon as possible, of course pending further confirmation/testing and review.

Andre: who should be assigned to this bug report?

(In reply to comment #5)

Andre: who should be assigned to this bug report?

Jeff Green is already CC'ed (who sometimes helps out with OTRS patches); Philippe would be the PM here, kind of.

philippe wrote:

Sure, you can add me as the PM, but I don't think I can actually do much here. As I understand it, we're looking for someone who can add the patch - that's not me. And I have no control over the engineering resources. :)

(In reply to Kunal Mehta (Legoktm) from comment #3)

Created attachment 13876 [details]
New patch sends the request asynchronously and hides the ticket after
success rather than reloading the page.

legoktm: Could you put that patch into Gerrit against http://git.wikimedia.org/blob/operations%2Fsoftware%2Fotrs.git/HEAD/patches%2F50-one-click-spam.patch ?

attachment file_54755.txt ignored as obsolete

(In reply to Andre Klapper from comment #8)

legoktm: Could you put that patch into Gerrit against
http://git.wikimedia.org/blob/operations%2Fsoftware%2Fotrs.git/HEAD/
patches%2F50-one-click-spam.patch ?

Well, it's not really a patch to the software, so I'm not sure that makes sense.

FWIW, in OTRS I usually use bulk actions after mass-checking the spam mails with an extension like https://addons.mozilla.org/firefox/addon/checkfox/

(Probably obvious to many but not to all and I don't know where else to post it. Originally suggested to me by Frieda many years ago.)

This JavaScript 'fix' is basically the equivalent of fixing a MediaWiki core bug with a default-on gadget. It's not a patch for the software itself. It could also be a lot simpler than it currently is.

(In reply to Alex Monk from comment #11)

This JavaScript 'fix' is basically the equivalent of fixing a MediaWiki core
bug with a default-on gadget. It's not a patch for the software itself. It
could also be a lot simpler than it currently is.

First, I don't know JS that well, and put this together by just messing with my browser console. Please improve it :D

Second, I agree with your analogy. But in this case, I'm not sure this is totally a bad thing. I think we should evaluate it based on:

a) How important is this feature for OTRS agents (https://otrs-wiki.wikimedia.org/wiki/Talk:Upgrade_issues#Can.27t_get_rid_of_spam_as_quickly).
b) How likely we're going to be able to get someone (who??) to write this properly as an OTRS extension (if those exist??).

RD or another OTRS admin can probably answer a), I don't know who would be able to answer b).

Occasionally, we do hotfix hacks in site-wide JS/CSS which really should be done server-side, but the caveat is that those are promptly fixed in a proper manner. If we do deploy this JS script, it's even more unlikely it would ever get a proper fix. But being realistic, I doubt anyone is ever going to fix this properly to begin with.

Created attachment 16667
OTRS 1 click spam button JS gadget

Attached:

Keegan added subscribers: Qgil, Keegan.

Let's do this at the Wikimania 2015 hackathon. I just need someone or two that knows Perl and is wiling to dig into OTRS's code.

Let's do this at the Wikimania 2015 hackathon. I just need someone or two that knows Perl and is wiling to dig into OTRS's code.

Let us know when you find them.

Please confirm and promote this activity by assigning it to its owner, listing it or scheduling it at the Hackathon wiki page and by placing it in the right column at #Wikimania-Hackathon-2015. Thank you!

@Rjd0060, are you planning to work on this task at Wikimania?

@Qgil No one is currently interested in working on this that I mentioned it to.

@Qgil No one is currently interested in working on this that I mentioned it to.

Maybe a payed staffer can fix it?

No idea, but I will add it to the backlog of Community-Tech so they are aware.

... and I will not remove it from the #Wikimania-Hackathon-2015 backlog just in case this helps reaching more eyes in the next days.

What is the status of this task, now that Wikimania 2015 is over? As this task is in the "Backlog" column of the #Wikimania-Hackathon-2015 project's workboard: Did this task take place and was successfully finished? If yes: Please provide an update (and if the task is not completely finished yet, please move the project to the "Work continues after Mexico City" column on the #Wikimania-Hackathon-2015 workboard). If no: Please edit this task by removing the #Wikimania-Hackathon-2015 project from this task. Thanks for your help and keeping this task updated!

A message to all open tasks related to the #Wikimania-Hackathon-2015. What do you need to complete this task? Do you need support from the Wikimedia Foundation to push it forward? Help promoting this project? Finding an intern to work on it? Organizing a developer sprint? Pitching it to WMF teams? Applying for a grant? If you need support, share your request at T107423: Evaluate which projects showcased at the Wikimania Hackathon 2015 should be supported further or contact me personally. Thank you!

@Rjd0060 I guess this is still a problem? Was there any progress at Wikimania?

Also, I wonder whether OTRS is within the scope of Community-Tech. @DannyH, do you know the answer?

@Qgil A new patch still needs to be created, likely for OTRS v 5 which is what we plan to upgrade to.

@Rjd0060 I guess this is still a problem? Was there any progress at Wikimania?

Also, I wonder whether OTRS is within the scope of Community-Tech. @DannyH, do you know the answer?

Frankly, the biggest blocker for OTRS development (not upgrades/database management) is that OTRS is written in Perl, and from what I understand it's fairly ugly Perl, and therefore most developers have not been interested in spending time hacking on it for our own customizations.

@Qgil, not possible for Community Tech right now. Perl makes it too complex for our team to handle, unless there's a groundswell of support for it in the wishlist survey.

As a perl dev at my day job, I can take a look at this one.

See https://github.com/Matthewrbowker/otrs-oneclickspam - I am open-sourcing it. I haven't done much work, I have been spinning up an AWS test instance to work on.

Can't you use a wikimedia labs instance for this instead of paying amazon?

I was not aware that this was an acceptable use for WMF labs, my apologies.

Well if you're working on it to help Wikimedia's OTRS, I would expect it to be?

I am closing this task, as the upgrade as part of T74109 included a one-click-spam button.