Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-10384

Messages deleted from "Sent Messages" are not going to "Trash" in 3scale Developer Portal

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • SaaS, 2.13.2 GA
    • System
    • False
    • None
    • False
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Hide
      • Access the Developer Portal
      • Go to "Messages" view
      • Go to the "Sent Messages" tab. If you have no message sent, compose a new one and then go back to "Sent Messages" tab and delete the message
      • Go to "Trash" tab the deleted sent message is not in the list
      Show
      Access the Developer Portal Go to "Messages" view Go to the "Sent Messages" tab. If you have no message sent, compose a new one and then go back to "Sent Messages" tab and delete the message Go to "Trash" tab the deleted sent message is not in the list

    Description

      On the Developer Portal, when a message is deleted from the “Sent Messages” list, it is not shown in the list of messages deleted from the “Trash”. In the case of "Received Messages", when you delete them, they are seen in the "Trash". It is expected that the behavior should be similar for both cases. According to the code below, I imagine that messages deleted from the "Sent Messages" list should also be listed in the "Trash" [1]:

        def trashed_messages
          Message.where('id IN (:sent) OR id IN (:received)',       sent:     sent_messages.hidden.select(:id),
                                                                    received: hidden_messages.pluck(:message_id))
        end 

      [1] https://github.com/3scale/porta/blob/3scale-2.13-stable/app/models/account.rb#L174-L177

      • system-developer log when deleting a message from Inbox:
       [8dafa8b0-8ea3-488b-9c6f-25b652431fad] [3scale.apps.rhdomain.com] [10.128.2.2] Started DELETE "/admin/messages/received/38" for 10.128.2.2 at 2023-11-09 22:14:28 +0000
      [8dafa8b0-8ea3-488b-9c6f-25b652431fad] [3scale.apps.rhdomain.com] [10.128.2.2] Processing by DeveloperPortal::Admin::Messages::InboxController#destroy as HTML
      [8dafa8b0-8ea3-488b-9c6f-25b652431fad] [3scale.apps.rhdomain.com] [10.128.2.2]   Parameters: {"authenticity_token"=>"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", "id"=>"38"}
      [8dafa8b0-8ea3-488b-9c6f-25b652431fad] [3scale.apps.rhdomain.com] [10.128.2.2] Redirected to https://3scale.apps.rhdomain.com/admin/messages
      [8dafa8b0-8ea3-488b-9c6f-25b652431fad] [3scale.apps.rhdomain.com] [10.128.2.2] Completed 302 Found in 27ms (ActiveRecord: 12.3ms)
      10.0.92.55 - - [09/Nov/2023:22:14:28 +0000] "DELETE /admin/messages/received/38 HTTP/1.1" 302 - 0.0386
      [94a05b06-e555-478b-892b-681314107c0d] [3scale.apps.rhdomain.com] [10.128.2.2] Started GET "/admin/messages" for 10.128.2.2 at 2023-11-09 22:14:29 +0000
      10.0.92.55 - - [09/Nov/2023:22:14:29 +0000] "GET /admin/messages HTTP/1.1" 301 - 0.0055
      [71b69b97-abea-40f0-9631-7cb8a13918e5] [3scale.apps.rhdomain.com] [10.128.2.2] Started GET "/admin/messages/received" for 10.128.2.2 at 2023-11-09 22:14:29 +0000
      [71b69b97-abea-40f0-9631-7cb8a13918e5] [3scale.apps.rhdomain.com] [10.128.2.2] Processing by DeveloperPortal::Admin::Messages::InboxController#index as HTML
      • system-developer log when deleting a message from Sent Messages:
      [a33c046d-74fc-4475-9a91-3fb1c898abbd] [3scale.apps.rhdomain.com] [10.128.2.2] Started DELETE "/admin/messages/sent/57" for 10.128.2.2 at 2023-11-09 22:15:31 +0000
      [a33c046d-74fc-4475-9a91-3fb1c898abbd] [3scale.apps.rhdomain.com] [10.128.2.2] Processing by DeveloperPortal::Admin::Messages::OutboxController#destroy as HTML
      [a33c046d-74fc-4475-9a91-3fb1c898abbd] [3scale.apps.rhdomain.com] [10.128.2.2]   Parameters: {"authenticity_token"=>"z78cvTki3gW1/6o/UTd3d7jm4/xxxxxxxxxxxxxxxxxxxxxxxxxxxxx==", "id"=>"57"}
      [a33c046d-74fc-4475-9a91-3fb1c898abbd] [3scale.apps.rhdomain.com] [10.128.2.2] Redirected to https://3scale.apps.rhdomain.com/admin/messages/sent
      [a33c046d-74fc-4475-9a91-3fb1c898abbd] [3scale.apps.rhdomain.com] [10.128.2.2] Completed 302 Found in 23ms (ActiveRecord: 10.4ms)
      10.0.92.55 - - [09/Nov/2023:22:15:31 +0000] "DELETE /admin/messages/sent/57 HTTP/1.1" 302 - 0.0341
      [6c3a8850-d7d8-45cd-a101-116f6bcd929f] [3scale.apps.rhdomain.com] [10.128.2.2] Started GET "/admin/messages/sent" for 10.128.2.2 at 2023-11-09 22:15:32 +0000
      [6c3a8850-d7d8-45cd-a101-116f6bcd929f] [3scale.apps.rhdomain.com] [10.128.2.2] Processing by DeveloperPortal::Admin::Messages::OutboxController#index as HTML 

      References:

      inbox_controller.rb

      outbox_controller.rb

      trash_controller.rb

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gpereira@redhat.com Gustavo Pereira
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: