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

[OldDot Rules Migration] Tag rules #47016

Open
marcaaron opened this issue Aug 8, 2024 · 21 comments
Open

[OldDot Rules Migration] Tag rules #47016

marcaaron opened this issue Aug 8, 2024 · 21 comments
Assignees
Labels
Engineering Hot Pick Ready for an engineer to pick up and run with NewFeature Something to build that is a new item. Reviewing Has a PR in review Weekly KSv2

Comments

@marcaaron
Copy link
Contributor

Part of the OldDot Rules Migration project

Main issue: https://github.com/Expensify/Expensify/issues/413886

Feature Description

2024-08-07_14-10-12

High Level Section: https://docs.google.com/document/d/1oLr14YhL6Y0N5g4tbozdIIrFbybBlsRA0H9I8Wm--w8/edit#bookmark=id.noull64ot4cc

Detailed Section: https://docs.google.com/document/d/1oLr14YhL6Y0N5g4tbozdIIrFbybBlsRA0H9I8Wm--w8/edit#bookmark=id.a5rfjg2ykxym

Manual Test Steps

TBD

Automated Tests

TBD

@melvin-bot melvin-bot bot added the Monthly KSv2 label Aug 12, 2024
@BrtqKr
Copy link
Contributor

BrtqKr commented Aug 21, 2024

Hey, I'm from SWM I'd like to take over this ticket

@marcaaron marcaaron added Daily KSv2 Engineering Monthly KSv2 NewFeature Something to build that is a new item. and removed Monthly KSv2 Daily KSv2 labels Aug 21, 2024
Copy link

melvin-bot bot commented Aug 21, 2024

Triggered auto assignment to @JmillsExpensify (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.

@melvin-bot melvin-bot bot added the Weekly KSv2 label Aug 21, 2024
@marcaaron marcaaron added the Daily KSv2 label Aug 21, 2024
@melvin-bot melvin-bot bot removed the Daily KSv2 label Aug 21, 2024
@marcaaron marcaaron added Daily KSv2 and removed Monthly KSv2 Weekly KSv2 labels Aug 21, 2024
@melvin-bot melvin-bot bot added the Overdue label Aug 23, 2024
@marcaaron
Copy link
Contributor Author

In progress! We'll get to this after the next couple of PRs are merged (likely on Monday).

Copy link

melvin-bot bot commented Aug 27, 2024

@JmillsExpensify, @marcaaron, @BrtqKr Whoops! This issue is 2 days overdue. Let's get this updated quick!

@BrtqKr
Copy link
Contributor

BrtqKr commented Aug 28, 2024

Sorry for the delay, I got sick - we've decided to wire this up after @WojtekBoman is done with one of his tasks since there's a major shared part between both of those tickets. I'll let you know whenever it's done, but in general finishing this off afterwards shouldn't take much time

@melvin-bot melvin-bot bot removed the Overdue label Aug 28, 2024
@BrtqKr
Copy link
Contributor

BrtqKr commented Aug 29, 2024

We've found a couple of discrepancies between the docs and the back-end along the way. Right now I'm sending something like that and I'm getting 200 with no errors

image

But, I'm not receiving any onyx data in response

image

@marcaaron, is there anything I need to do for that to respond as expected?

Before that, I tried to send params as described in the design doc, but there have been errors regarding the format

@marcaaron
Copy link
Contributor Author

This is when calling SetPolicyTagApprover?

I'm not sure if I see where we'd return any modified data in the response, but can look into it. It should be Ok for now since if it succeeds then the optimistic data would be correct.

I tried to send params as described in the design doc, but there have been errors regarding the format

Can you clarify what you mean by this? What did you send and what errors did you see?

@marcaaron
Copy link
Contributor Author

We should pass policyID, tagName and approver not email.

@marcaaron
Copy link
Contributor Author

Oh, I think you are saying that you expect there to be an error when doing that? What you are doing works because we are setting the approver to an empty string in the backend when the param isn't provided.

@BrtqKr
Copy link
Contributor

BrtqKr commented Aug 30, 2024

It's weird because I was sending it this way before changing it to email. Right now, it's going through with 200 and everything seems correct, but I'm not able to fetch it in openPolicyTagsPage. Maybe some data is missing in that read action?

        },
        {
            "key": "policyTags_8F4B1CFAD82C0294",
            "onyxMethod": "set",
            "value": {
                "Tag": {
                    "name": "Tag",
                    "orderWeight": 0,
                    "required": false,
                    "tags": {
                        "Tag1": {
                            "enabled": true,
                            "name": "Tag1"
                        },
                        "Tag2": {
                            "enabled": true,
                            "name": "Tag2"
                        }
                    }
                }
            }
        }
    ],

@melvin-bot melvin-bot bot added the Overdue label Sep 2, 2024
Copy link

melvin-bot bot commented Sep 2, 2024

@JmillsExpensify, @marcaaron, @BrtqKr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@BrtqKr
Copy link
Contributor

BrtqKr commented Sep 2, 2024

Waiting for one answer regarding the read action

@marcaaron

@melvin-bot melvin-bot bot removed the Overdue label Sep 2, 2024
@marcaaron
Copy link
Contributor Author

It's weird because I was sending it this way before changing it to email. Right now, it's going through with 200 and everything seems correct

To clarify, the API will allow you to do this without an email or approver param because we default the approver value to an empty string which would effectively remove the approver.

but I'm not able to fetch it in openPolicyTagsPage. Maybe some data is missing in that read action?

I didn't really understand the question here, but I think you are saying that we need to include the rules data somewhere - e.g. either in OpenApp or later when calling OpenPolicyTagsPage? Let me know if that's correct. There are a few cases like this popping up where we missed adding some data in the backend.

@marcaaron marcaaron added the Hot Pick Ready for an engineer to pick up and run with label Sep 3, 2024
@BrtqKr
Copy link
Contributor

BrtqKr commented Sep 4, 2024

I didn't really understand the question here, but I think you are saying that we need to include the rules data somewhere - e.g. either in OpenApp or later when calling OpenPolicyTagsPage? Let me know if that's correct. There are a few cases like this popping up where we missed adding some data in the backend.

yes, we're missing it in OpenPolicyTagsPage, so we cannot persist it properly even if the write is passing as expected

@marcaaron
Copy link
Contributor Author

Ok, thanks for bringing that up! We're working on this today (should not need to block anything though).

@BrtqKr
Copy link
Contributor

BrtqKr commented Sep 5, 2024

ok, I'll pass the whole thing for the review and we'll hold the merge until the back-end is deployed. It'd be nice to merge the expense reports before that because this PR is based on that, otherwise there will be unnecessary diff displaying.

@marcaaron
Copy link
Contributor Author

This should be all unblocked now!

@melvin-bot melvin-bot bot added Overdue Reviewing Has a PR in review Weekly KSv2 and removed Overdue Daily KSv2 labels Sep 9, 2024
@marcaaron
Copy link
Contributor Author

marcaaron commented Sep 10, 2024 via email

Copy link

melvin-bot bot commented Sep 11, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

Copy link

melvin-bot bot commented Sep 20, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering Hot Pick Ready for an engineer to pick up and run with NewFeature Something to build that is a new item. Reviewing Has a PR in review Weekly KSv2
Projects
Status: Hot Picks
Development

No branches or pull requests

4 participants