fecgov / fecfile-web-app

Other
7 stars 4 forks source link

System to itemize Tier 1 transaction if Tier 2 and/or 3 is itemized #1647

Open AureliaKhorsand opened 9 months ago

AureliaKhorsand commented 9 months ago

Business Reason

Our current implementation is that transaction "families" must share itemization logic. If one is itemized, all are itemized, and if one is unitemized, all are unitemized. This is incorrect and must be updated since we need to allow for an unitemized Tier 2/3 transaction under an itemized Tier 1/2. The new rule is as follows:

Acceptance Criteria

Given an existing itemized Tier 1 transaction When there are associated Tier 2 and (where possible) Tier 3 transactions Then given the starting scenario:

  1. Itemized Tier 1 with itemized tier 2 and tier 3
    1. if Tier 1 becomes unitemized*, direct tier 2 and 3 would become unitemized.
      1. if Tier 2 becomes unitemized*, only tier 3 would become unitemized.
      2. if Tier 3 becomes unitemized*, only tier 3 would become unitemized.
  2. Itemized Tier 1 with unitemized tier 2 and tier 3 (this is now allowed with the updated logic)
    1. if Tier 1 becomes itemized*, tier 2 and 3 remain unitemized.
      1. if Tier 2 becomes itemized*, no change to tier 1 and tier 3.
      2. if Tier 3 becomes itemized*, tier 2 would become itemized, no change to tier 1.

Given an existing unitemized Tier 1 transaction in the Transactions table of a report When there are existing Tier 2 and (where possible) Tier 3 transactions Then given the starting scenario:

  1. Unitemized Tier 1 with unitemized tier 2 and tier 3
    1. if Tier 1 becomes itemized*, tier 2 and 3 would REMAIN unitemized
      1. if Tier 2 becomes itemized*, tier 1 would be itemized and tier 3 would REMAIN unitemized.
      2. if Tier 3 becomes itemized*, tier 1 and 2 would become itemized.

*Note: This applies if the transaction is (un)itemized due to user-action/forcing or system/by default.

**Note: If a user force itemizes/unitemizes a transaction, only that one and it’s direct “descendants” will be affected. No “siblings” or “nieces and nephews”.

QA Notes

With the above implementation, there should never be a scenario where there is an itemized Tier 2 or 3 transaction that has an unitemized parent.

Essentially, the difference in current functionality is that we no longer force itemize a Tier 2 or 3 transaction if the transaction above it is itemized.

DEV Notes

Design

Ryan suggested that we may want to inform the user that something they may not expect is happening in the following scenario: If a transaction family is unitemized by default and a Tier 2/3 is manually itemized, the Tier 1 will also be itemized so there are no "orphan" transactions.

See full ticket and images here: FECFILE-513

AureliaKhorsand commented 9 months ago

@GreggMoreland can you take first crack at the ACs here? Related tickets for implemented itemization functionality include: #591, #651, #804, #1035, and #1223 if that's useful.

GreggMoreland commented 7 months ago

@AureliaKhorsand I have multiple questions:

  1. Will we continue to allow manual itemize/unitemize for tier 1? If so, then would itemize NOT affect Tier 2/3, but unitemize WOULD adjust Tier 2/3?
  2. Will we now allow Tier 2/3 to be manually itemized/unitemized? and if it is manually itemized, then Tier 1 would also be itemized?
AureliaKhorsand commented 5 months ago

@GreggMoreland answers below. FEC/Ryan confirmed the itemization logic and assumptions from the 4/9/24 requirements session on Slack today.

  1. Will we continue to allow manual itemize/unitemize for tier 1? If so, then would itemize NOT affect Tier 2/3, but unitemize WOULD adjust Tier 2/3? Yes
  2. Will we now allow Tier 2/3 to be manually itemized/unitemized? and if it is manually itemized, then Tier 1 would also be itemized? Yes, and yes.
GreggMoreland commented 5 months ago

@AureliaKhorsand Please review the AC's. I wanted to account for each possibly combination.

AureliaKhorsand commented 5 months ago

@GreggMoreland I think we are missing a few more scenarios here? If there is a way we can consolidate this in the ACs that may help, and this list can be used for testing. Here are the three default statuses and possible actions users can take on them and what should happen. Let me know if I'm missing some.

1. Itemized Tier 1 with itemized tier 2 and tier 3
    a. If user unitemizes Tier 1, tier 2 and 3 would become unitemized.
    b. If user unitemizes Tier 2, only tier 3 would become unitemized.
    c. If user unitemizes Tier 3, only tier 3 would become unitemized.
2. Unitemized Tier 1 with unitemized tier 2 and tier 3
    a. If user itemizes Tier 1, tier 2 and 3 would REMAIN unitemized
    b. If user itemizes Tier 2, tier 1 would be itemized and tier 3 would REMAIN unitemized.
    c. If user itemizes Tier 3, tier 1 and 2 would become itemized.
3. Itemized Tier 1 with unitemized tier 2 and tier 3 (this is now allowed with the updated logic)
    a. If user unitemizes Tier 1, tier 2 and 3 remain unitemized.
    b. If user itemizes tier 2, no change to tier 1 and tier 3.
    c. If user itemizes tier 3, tier 2 would become unitemized, no change to tier 1.
GreggMoreland commented 5 months ago

@AureliaKhorsand Let me know if this is better

JonellaCulmer commented 4 months ago

@AureliaKhorsand @GreggMoreland Is the acceptance criteria listed at the top of the ticket the correct criteria? Want to confirm before moving forward.

If it is the correct criteria, I think I see something that needs to be modified. 2c. Should that say "...tier 2 (unitemized) and tier 1 (itemized) remain unchanged"?

GreggMoreland commented 4 months ago

@JonellaCulmer @AureliaKhorsand I think 2c was incorrect. Since the tier above the one being itemized is supposed to be itemized, then if tier 1 is already itemized and you itemize tier 3, then tier 2 should be itemized to follow what was done to tier 3.

JonellaCulmer commented 4 months ago

@GreggMoreland Thank you! All good.

exalate-issue-sync[bot] commented 1 month ago

This ticket is ready for implementation - waiting on approval to work on this and create a separate ticket to improve user experience on messaging.

exalate-issue-sync[bot] commented 3 weeks ago

David Heitzer commented: [~accountid:61b0b42cd5986c006a9e1c94] [~accountid:712020:3243085d-540a-4657-ad08-d891487882d0] I wasn’t in refinement so apologies if either of these were answered. I’ve been analyzing this ticket and I just wanted to clarify the following{color:#ff991f} AC snippet{color}:

{color:#ff991f}Itemized Tier 1 with itemized tier 2 and tier 3{color}

{color:#ff991f}if Tier 1 becomes unitemized*, direct tier 2 and 3 would become unitemized. - {color}based on my understanding of the requirements, shouldn’t tier 1 stay itemized here since tier 2/3 are?

{color:#ff991f}if Tier 2 becomes unitemized*, only tier 3 would become unitemized. - {color}based on my understanding of the requirements, shouldn’t tier 2 stay itemized here since tier 3 is?

I was also wondering, about the following:

{color:#ff991f}Essentially, the difference in current functionality is that we no longer force itemize a Tier 2 or 3 transaction if the transaction above it is itemized.{color}

It seems that another difference is that we will also now force itemize Tier 1/2 transactions if the transaction below it is itemized. Would this be correct?

Thanks!

exalate-issue-sync[bot] commented 3 weeks ago

David Heitzer commented: spoke with Aurelia this morning and she was able to answer my questions below.