Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New reimbursement request and vendor payments status and notes functionality #1051

Merged
merged 9 commits into from May 20, 2024

Conversation

timiwahalahti
Copy link
Collaborator

Add private notes to vendor payments and reimbursement requests

Only network managers (i.e. super deputies) can see these.

How to test?

  1. Log in as a site admin (not a network or super deputy)
  2. Crate reimbursement request
  3. "Private notes" meta box should not be visible
  4. Log out and log in as an network admin
  5. Go to request
  6. "Private notes" meta box should be visible
  7. Leave a note, check that it is showing and you didn't receive any email notifications

Add a new "Needs follow-up" status for payments

As requested by Community Team deputies who are working with payments. Added this status for vendor payments and reimbursement requests. Also, the network payments tool takes this status into consideration when combining payments for the overdue view.

How to test?

  1. Log in as a network admin
  2. Open one and edit it, the staus should be visible
  3. Visit wp-admin/network/admin.php?page=reimbursement-requests-dashboard and tab "Needs follow-up" should be there
  4. On a WordCamp site, create a vendor payment and set due date to past date, set the status to "Needs follow-up"
  5. Visit /wp-admin/network/admin.php?page=wcp-dashboard and the payment should be listed on "Overdue" tab and separate "Needs follow-up" tab should be visible

Extend notes to vendor payments

For ease and harmonisation, the regular notes meta box was extended for vendor payments. Only users with view_wordcamp_payment_details (network admins and original submitter) can add new notes, but everyone can see all notes. Because of this, the note functionality was moved to common WordCamp_Budgets class.

How to test?

  1. Log in as a site admin
  2. Go to vendor payments
  3. "Notes" meta box should be visible
  4. Log out and log in as an user who has not made the vendor payment
  5. Go to payment and meta box should be visible but you are not able to add a note.

Fixes #864

Screenshots

CleanShot 2023-09-20 at 23 12 14@2x CleanShot 2023-09-20 at 23 13 37@2x CleanShot 2023-09-20 at 23 11 52@2x

@timiwahalahti timiwahalahti added [Priority] 1 [Component] Payments Payment tools, budgets, invoices labels Sep 20, 2023
@renintw renintw added [Type] Good First Issue Straightforward, self-contained, doesn't require deep knowledge of codebase [Priority] High [Type] Feature Request and removed [Priority] 1 labels Apr 11, 2024
@renintw renintw assigned renintw and unassigned renintw May 20, 2024
Copy link
Contributor

@renintw renintw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works as described.

@renintw renintw merged commit e21ab60 into WordPress:production May 20, 2024
3 checks passed
renintw added a commit that referenced this pull request May 20, 2024
In #1051, the logic about save_post causes the "The link you followed has expired" message to always appear when saving a post.
Therefore here only retains the part in #1051 that adds a new "Needs follow-up" status for payments and remove else for further fixes.
renintw added a commit that referenced this pull request May 23, 2024
renintw added a commit that referenced this pull request May 23, 2024
* Revert "Fix always show "the link you followed has expired" error page (#1321)"

This reverts commit 4fcecb6.

* Revert "New reimbursement request and vendor payments status and notes functionality (#1051)"

This reverts commit e21ab60.

* add new wcb-needs-followup status for payments

* add new wcb-needs-followup status to network payments views

* take new wcb-pending-approval status into consideration when doing the overdue vendor payments list

---------

Co-authored-by: Timi Wahalahti <timi@wahalahti.fi>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Payments Payment tools, budgets, invoices [Priority] High [Type] Feature Request [Type] Good First Issue Straightforward, self-contained, doesn't require deep knowledge of codebase
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Budget Tool: Add a private note field to payment requests
2 participants