Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

[$60] "Request Extension" Not updated to utilize email input form #124

Closed
wdprice opened this issue Feb 25, 2021 · 15 comments
Closed

[$60] "Request Extension" Not updated to utilize email input form #124

wdprice opened this issue Feb 25, 2021 · 15 comments

Comments

@wdprice
Copy link

wdprice commented Feb 25, 2021

Request an Extension link on the resourceBooking still opens a mailto:

Should operate in same manner as the Report an Issue, which an email being sent via Sendgrid to [email protected]

@wdprice wdprice added bug Something isn't working P2 labels Feb 25, 2021
@wdprice wdprice added this to the v1.5.1 - Post Release Bugfix milestone Feb 25, 2021
@wdprice wdprice changed the title Request Extension Not updated to email form "Request Extension" Not updated to utilize email input form Feb 25, 2021
@maxceem
Copy link
Contributor

maxceem commented Feb 25, 2021

@wdprice should we allow customers to enter some text, same like for the report?

image

@maxceem
Copy link
Contributor

maxceem commented Feb 25, 2021

Sum up:

  • At the moment our code is tailored for Issue Reports. We have have to make it more general so we can also use it for Requesting extensions. We should not add ad-hoc code or workaround, but rather refactor the current code. Below is my suggestions regarding refactoring, but you may adjust as per your view if needed. The main aim is to have a general well-structured and well-named code.

  • refactor postReport -> postEmail (https://github.com/topcoder-platform/taas-app/blob/dev/src/services/teams.js#L121-L145) - it should be a general service method to send email, it should not have business logic inside.

  • rename ReportPopup -> SendEmailPopup or is there a better name?

    • rename all the actions, reducers, hooks, files accordingly to the new name and general functionality
  • openReport -> openSendEmailPopup (or other name) instead of 3 arguments it should take 2 arguments openSendEmailPopup(popupOptions, data):

    popupOptions = {
        title: "ISSUE REPORT - NEW TEST MAX E2E 4",       
        textPlaceholder: "Describe your issue",
        textDataField: "data.reportText", // path where should we set the text entered by the user inside the data before sending
     }
     
     data = {
         template: "team-issue-report",
         data: {
           projectName: "NEW TEST MAX E2E 4",
           projectId: 12345,
           // we don't know report text when open the popup, so this field should be set before sending 
           // like _.set(data, popupOptions.textDataField, <value from of user input>)
           // reportText, 
         }
      }
    

    For extension request the values would be like:

    popupOptions = {
        title: "EXTENSION REQUEST - NEW TEST MAX E2E 4",       
        textPlaceholder: "Add any comments...",
        textDataField: "data.text",
     }
     
    data = {
        template: "extension-request", // required by API
        data: {
          projectName: "NEW TEST MAX E2E 4",
          projectId: 12345,
          // text, // should be configured by  "popupOptions.textDataField = 'text'"
        }
     }
    
  • So when we open popup we would show all the texts inside the popup as per popupOptions

  • When we click submit, we would populate field with text entered by user as per popupOptions.textDataField and would send data using postEmail by passing data with populate filed as a body.

  • Don't make unnecessary changes or code formatting in any code which is not related to this issue. All the refactoring and renaming which is needed has to be made, including proper code formatting of the code which is being changed. But not other code.

  • After the general component is implemented, use it for the "Request an Extension" action, and remove all the current code this action:

    image

  • Make sure that all the popups work good after such a refactoring.

@maxceem maxceem added the CF label Feb 25, 2021
@maxceem maxceem changed the title "Request Extension" Not updated to utilize email input form [$60] "Request Extension" Not updated to utilize email input form Feb 26, 2021
@maxceem
Copy link
Contributor

maxceem commented Feb 26, 2021

@mbaghel could you please comment on this issue, so I can assign it to you. Otherwise, GitHub doesn't allow it.

@maxceem
Copy link
Contributor

maxceem commented Feb 26, 2021

Challenge https://www.topcoder.com/challenges/f3f26850-22cd-417a-b287-b51a706526fe has been created for this ticket.

This is an automated message for maxceem via Topcoder X

@mbaghel
Copy link
Contributor

mbaghel commented Feb 26, 2021 via email

@maxceem
Copy link
Contributor

maxceem commented Feb 26, 2021

@mbaghel, please sign-up with Topcoder X tool

This is an automated message for maxceem via Topcoder X

@maxceem
Copy link
Contributor

maxceem commented Feb 26, 2021

@mbaghel could you please sign-up at https://x.topcoder.com/. You would have to login there with your Topcoder and Github account to associate them. After that, the payment would be processed automatically when this issue is completed.

@maxceem
Copy link
Contributor

maxceem commented Feb 26, 2021

@mbaghel, please sign-up with Topcoder X tool

This is an automated message for maxceem via Topcoder X

@maxceem
Copy link
Contributor

maxceem commented Feb 28, 2021

@mbaghel, please sign-up with Topcoder X tool

This is an automated message for maxceem via Topcoder X

@maxceem
Copy link
Contributor

maxceem commented Feb 28, 2021

@sandhiyakavi
Copy link
Collaborator

Verified on Dev Env. Working as expected.

Pop up window.
extension_1

Success message:
extension_3 success

Failure message:
extension_2

Mail sent.
image (24)

Separate issue #132 logged for Alignment in mail sent.

@maxceem
Copy link
Contributor

maxceem commented Mar 3, 2021

@mbaghel, please sign-up with Topcoder X tool

This is an automated message for maxceem via Topcoder X

@sandhiyakavi
Copy link
Collaborator

@maxceem Everything is working as expected in Prod Env. Not able to check the Email content for the same.

  1. Popup window.
    image

  2. Success message.
    image

  3. Failure message.
    image

@sandhiyakavi
Copy link
Collaborator

@wdprice I am not able to check the Email for the "Request Extension" as I don't have access to [email protected]. Can you please help me in checking the same?

@maxceem
Copy link
Contributor

maxceem commented Mar 12, 2021

This ticket was not processed for payment. If you would like to process it for payment, please reopen it, add the tcx_FixAccepted label, and then close it again

This is an automated message for maxceem via Topcoder X

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants