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

Copilot payments #22

Closed
jmgasper opened this issue Jun 22, 2018 · 4 comments
Closed

Copilot payments #22

jmgasper opened this issue Jun 22, 2018 · 4 comments

Comments

@jmgasper
Copy link
Collaborator

jmgasper commented Jun 22, 2018

There are two types of payments in topcoder - one that is normal payment for submission and the other of type co-pilot for work that copilots do outside of running challenges.

We need to handle these copilot payments through Topcoder-X.

General flow

A copilot will log specific items during the week with payment amounts discussed with the PM. These items will be grouped per Topcoder-X project.

At the end of the week, the copilot will send the links to the TC direct issues to the PM for the PM to close, clearing out the existing tickets so that the copilot can start on a new weeks worth of issues.

Multiple items

Each item logged for a copilot will contain:

  • Project associated with the item (used for Topcoder Direct to ensure the correct billing code is used)
  • Amount of the payment
  • A description of the payment.
  • A flag indicating if the payment has been closed
  • A Topcoder challenge ID associated with the payment

Topcoder challenge

Each individual project that has a copilot payment associated with it will have a Topcoder challenge associated with it. If there are multiple copilot items associated with a project, there will still only be one associated Topcoder challenge.

The description of the Topcoder challenge that collects these payments should be updated with the descriptions and amounts as they are edit / created / deleted. This will allow the PM to go back and reference what the payments are for.

The title of the challenge should be Copilot payment for <project name> <current date>, like Copilot payment for Sparkdown July 12th, 2018

A sample description might be something like:

* $100 - Phone call with client on August 12th
* $200 - Build management and CI / CD setup
* $300 - Work with customer QA to resolve issues

The total copilot payment for the challenge would be $600.

The total payment will be set as the copilotFee value on the challenge. The prize will be 0 and the assignee will be the copilot. If a prize is required, we can set it to $1 and decrease the value of the copilot payment by $1. Make sure the copilotId is also set properly on the challenge, referencing the copilots Topcoder user ID (not their handle). For instance, the copilotId for Ghostar is 151743.

UI

We will add a new option to the side menu called Copilot Payments . The icon from FontAwesome should be plane. Please ensure all new screen elements and pages match the existing UI of the application.

NOTE - the Copilot Payments menu option will only be shown to users with the copilot role. Otherwise it will be hidden.

At the top of the screen will be a button called + Add Payment.

The Copilot Payments page will be two tabs (Active, and Closed, each containing of copilot payments, where each row has the following columns. The table columns for amount, description, challenge, and project should be sortable in ascending and descending order.

  • Amount
  • Description
  • Project
  • Challenge
  • Actions

The actions column will be 2 buttons: Edit and Delete

When + Add Payment is clicked, we will go to a page with a form with these form elements:

  • Project, which is a drop down of existing projects configured for the user in Topcoder-X
  • Amount, which is a numerical entry for a payment amount
  • Description, which is a text field allowing for a short description of the item.
  • Challenge, the Topcoder challenge ID associated with the payment, clickable as a link to Topcoder Direct.

The user can fill out the form, click "Save" and it will be added to the Topcoder challenge appropriately and then show up in the table on the Copilot Payments main page. If a Topcoder challenge doesn't exist for the copilot payments for the given project, a new one will be created and activated.

When Edit is clicked for an item, the user will be shown the add payment form, but with the elements already filled out, allowing the user to change the Project, Amount, or Description of the logged copilot payment.

When Delete is clicked for an item, we will show a warning prompt like: Are you sure you want to delete this copilot payment? - Yes / No. If the user clicks Yes, the payment will be deleted and the Topcoder challenge updated appropriately with a new description and copilot payment amount. If No is clicked, the warning popup will just be closed.

Processing

When the copilot feels like it's time to process the payments, they will copy the challenge ID for a project and will send that to their PM for approval. The PM will close the challenge in Topcoder Direct and the payment will be processed.

Updating status

At the top of the page, next to "Add Payment" should be an Update All button. When Update All is clicked, a new Kafka message will be added to the queue to tell the processor to check the status of the Topcoder challenges associated with the copilot payments. If any are closed (see Processing step above), we will also mark the copilot payments in the site as closed, moving it from the Active tab to the Closed tab.

Kafka

Kafka should be used to handle the updates necessary for creating, editing, and deleting copilot payments. The Kafka messages should be added to the Kafka queue and the processor should be updated to handle the messages. Don't do the processing in the UI application.

@cwdcwd
Copy link
Contributor

cwdcwd commented Aug 10, 2018

@jmgasper this one isn't in play yet, right?

@jmgasper
Copy link
Collaborator Author

@cwdcwd - Correct. A challenge has been pending for awhile here. I've been having issues getting members involved. Lots of setup, which is why I added that long setup document to try to condense that a bit.

@jmgasper
Copy link
Collaborator Author

@narekcat - Please post these questions in the forum for the challenge.

@narekcat
Copy link

@jmgasper Ok, I'll delete these questions from here.

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

No branches or pull requests

3 participants