Opened 6 years ago

Closed 6 years ago

#1720 closed bug (fixed)

Sent messages can't be deleted

Reported by: planetcruiser Owned by: dima42
Priority: major Milestone: 1.6
Component: BW Mail Keywords: easy
Cc:

Description

Issue:

  • Neither via /messages/sent nor via /messages/xxx the delete button actually deletes the message

Solution:

  • Delete messages on clicking Delete - duh

Priority:

  • Not super urgent, but it's a good ticket a new coder could do a warm-up with :)

Clues:

Change History (25)

comment:1 Changed 6 years ago by TimLoal

  • Component changed from unknown to BW Mail

comment:2 Changed 6 years ago by TimLoal

  • Milestone changed from Future to 1.0

I can verify the sent messages don't delete, when clicking on delete. Received messages can be, not sure about spam messages.

Seems like more low hanging fruit.

LnP

comment:3 Changed 6 years ago by jsfan

  • Milestone changed from 1.0 to unassigned

comment:4 Changed 6 years ago by globetrotter_tt

This has been reported again.

comment:5 Changed 6 years ago by guaka

  • Keywords easy added

comment:6 Changed 6 years ago by sitatara

Another report about this issue came in today.

comment:7 Changed 6 years ago by dima42

  • Owner set to dima42
  • Status changed from new to accepted

applies also to messages in spam folder.

i'm committing to get this done by mar 15

comment:8 Changed 6 years ago by dima42

  • Status changed from accepted to local_testing

fixed by

https://gitorious.org/~dima42/bewelcome/dima42-sandbox/commit/be9ef378dd65bf053c40bb19eadbd6f24a18e9d9

please review and/or test locally when you get a chance (but not before 1.5 testing is done :p)

comment:9 Changed 6 years ago by shevek

Care to add this to 1.6?

comment:10 Changed 6 years ago by dima42

  • Milestone changed from unassigned to 1.6

comment:12 Changed 6 years ago by midsch

  • Status changed from local_testing to needs_work

Tested with BWbuntu Firefox/Chromium? - works for me only in received & sent, I can delete spam mails (need to be sent to user! see below) only if I open them, but not from the list.

Maybe related (or #1954):

  • all mails marked as "spam" are visible to all users in their spamfolder! Wukk kann see a message from globetest to henri marked as spam, although he's not involved and has no adminrights! Wukk can't open the message though, a klick just returns to "messages recieved" page. henri can open the message and remove the spam mark. (Spam marks can't be removed on the admin panel from admin, but I don't know how this is suppost to work.)
  • Sent mails dissapear = don't show up in "messages sent"

comment:13 Changed 6 years ago by midsch

I was wrong, at first I can't delete an old spam mail at all. But I can unmark it, remark it and than delete it ...

comment:14 Changed 6 years ago by dima42

Ok, so there are three problems here:

  1. Deleting spam mails

--I cannot reproduce this on bwbuntu+firefox. Can I get more info? Were you trying to delete a spam that you had rights to, or will fix to #2 also fix this?

  1. All spam visible

--big mistake by me, fixed by https://gitorious.org/~dima42/bewelcome/dima42-sandbox/commit/c218b1a3ae939ab635d9089caea93e6687296abc

  1. Sent mails not visible

--I investigated this, and it is due to how the BWBuntu handles mail. It is because we are checking for whether a piece of mail is 'Sent' but BWBuntu only puts it in "ToSend?" status. (With or without this commit, if you send mail from henri to wukk, and log in as wukk, you would not be able to see the mail. However, before this commit we *would* be able to see it in the 'sent' messages folder, since we did not previously check the 'Sent' status)

I think the current situation is better because if a mail does not get sent through the mail-server, it should not show up in the 'sent' messages folder.

comment:15 Changed 6 years ago by shevek

@dima42: Could you please commit this to develop directly. (And don't send a merge request that's just extra work for me ;-()

comment:16 Changed 6 years ago by dima42

I don't have push rights to bewelcome/rox. Can you give them to me?

comment:17 Changed 6 years ago by shevek

No, but I know who can :-)

comment:18 Changed 6 years ago by midsch

Ok, rechecked:

  • 1) It was a matter of spammail I should have access to, but I wasn't able to reproduce it again. The sometimes weird behaviour in navigation (in which box in/send/spam you end up) didn't help either. Seems to be gone now
  • 2) all spammails for everyone -> fixed.
  • 3) Ok, understood. I just wondered as it was different the day before. I've done further checks for this ticket with existing mails (user admin has quite a lot).

I played around with the mail from admin and henri a while (with chromium/firefox in bwbuntu) and it looks fine for me now.

Sitenote: Is http://localhost/bw/admin/adminchecker.php?action=viewSpamSayMember still in use? Removing the spam-mark doesn't work here and "view all" for one sender returns an error:

select messages.*,messages.Status as MessageStatus?,mSender.Username as Username_sender,mReceiver.Username as Username_receiver from messages,members as mSender,members as mReceiver where (messages.Status='ToCheck?' and messages.WhenFirstRead?='0000-00-00 00:00:00') and mSender.id=IdSender? and mReceiver.id=IdReceiver? order by messages.Status,messages.id desc limit 2

Due to lacking rights I can't look this up in production, but can paste this to a new ticket, if necessary.

comment:19 Changed 6 years ago by shevek

  • Status changed from needs_work to to_alpha

Clear for alpha then.

Regarding the adminchecker I'm not sure if it is still used. But I checked the SQL query and that returned zero results. Likely that the code doesn't like that.

comment:20 Changed 6 years ago by matt

just tested this locally, looks good to me

comment:21 Changed 6 years ago by matt

  • Status changed from to_alpha to testing

comment:22 Changed 6 years ago by matt

  • Status changed from testing to needs_work

comment:23 Changed 6 years ago by matt

  • Status changed from needs_work to to_alpha

comment:24 Changed 6 years ago by shevek

  • Status changed from to_alpha to testing

comment:25 Changed 6 years ago by crumbking

  • Resolution set to fixed
  • Status changed from testing to closed

works for me! Deleted messages via via /messages/sent or via /messages/xxx

Note: See TracTickets for help on using tickets.