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

Problem: Only PR creators can submit costs for their PRs #123

Closed
8 tasks done
georgeciubotaru opened this issue Sep 4, 2023 · 32 comments · Fixed by #157
Closed
8 tasks done

Problem: Only PR creators can submit costs for their PRs #123

georgeciubotaru opened this issue Sep 4, 2023 · 32 comments · Fixed by #157
Milestone

Comments

@georgeciubotaru
Copy link
Contributor

georgeciubotaru commented Sep 4, 2023

Tasks

Preview Give feedback
  1. api feature fix
  2. api feature
  3. api feature new implementation
  4. api fix ui
  5. feature fix new implementation
  6. feature fix new implementation
  7. api feature fix new implementation ui
  8. api type: bug
@georgeciubotaru georgeciubotaru added the type: bug Something isn't working label Sep 4, 2023
@power-f-GOD
Copy link
Contributor

Sorry, can you explain this, @georgeciubotaru ?

@georgeciubotaru
Copy link
Contributor Author

@power-f-GOD Please book a meeting in 30 minutes, and let's discuss about that

@power-f-GOD
Copy link
Contributor

@power-f-GOD Please book a meeting in 30 minutes, and let's discuss about that

Ok. Please, send your booking website.😅🤲🏼

@georgeciubotaru
Copy link
Contributor Author

@power-f-GOD Just create a call in Google Chat and send me the invitation

@power-f-GOD
Copy link
Contributor

I think this is worth converting into a goal, what do you reckon @georgeciubotaru ?

@georgeciubotaru
Copy link
Contributor Author

@power-f-GOD You can define sub-problems (tasks) for that problem and resolve into multiple PRs

@zolotokrylin zolotokrylin added this to the MVP milestone Sep 5, 2023
@zolotokrylin
Copy link
Member

@georgeciubotaru is the problem: Problem: only PR creator can submit the cost for that PR?

@georgeciubotaru
Copy link
Contributor Author

@zolotokrylin Yes

@power-f-GOD power-f-GOD added feature and removed type: bug Something isn't working labels Sep 13, 2023
@power-f-GOD power-f-GOD changed the title Problem: Multiple contributors cannot submit the same PR cost Problem: Only PR creators can submit costs for their PRs Sep 13, 2023
@zolotokrylin
Copy link
Member

@power-f-GOD what's ETA here? I can see you implementing other issues like resubmitting PRs, etc., but when this will done?

@power-f-GOD
Copy link
Contributor

@zolotokrylin , the tasks in the current problem's task list are all done, so it's safe/valid to say this problem is solved.📝

@georgeciubotaru
Copy link
Contributor Author

@power-f-GOD I'm checking now the production URL, and still cannot see all my PRs.
I see only the ones that I created as the owner

@georgeciubotaru
Copy link
Contributor Author

@power-f-GOD One more issue
https://invoice.holdex.io/contributors/8217518

I'm seeing the submissions made by another contributor on the PRs that I contributed, instead of seeing only my submissions

@power-f-GOD
Copy link
Contributor

@georgeciubotaru , FWIW, this PR, #156 , would have to be merged (to prod), BTW, for me to ascertain those issues still exist ('cause I took some time to test and fix some issues this morning).

@power-f-GOD
Copy link
Contributor

Hi, @georgeciubotaru .

So, what's next?🤲🏼

Cc: @zolotokrylin

@georgeciubotaru
Copy link
Contributor Author

@power-f-GOD Have you checked my reported issues?

@power-f-GOD
Copy link
Contributor

@power-f-GOD Have you checked my reported issues?

Ok. Has main been redeployed since I merged the PR?

And can you make a submission for this PR: fix: Owners can see their old PRs., let me also check/confirm.

@georgeciubotaru
Copy link
Contributor Author

@power-f-GOD Can we increase the MAX_DATA_CHUNK to 50?

@power-f-GOD
Copy link
Contributor

@power-f-GOD Can we increase the MAX_DATA_CHUNK to 50?

😮Man?! That's quite a lot at once. 20 okay?

@georgeciubotaru
Copy link
Contributor Author

@power-f-GOD Let's put 25.

Also, I cannot see #144 PR in my list

@power-f-GOD
Copy link
Contributor

@power-f-GOD Let's put 25.

Ok. I think I see why you were requesting 50, because, for you, it would be a lot of contributions, hence the need for pagination (somewhat).

@power-f-GOD
Copy link
Contributor

Also, I cannot see #144 PR in my list

Yeah, so it's because of the MAX_DATA_CHUNK. If I increase it to 25 you will still NOT see the PR.

I'll increase it to 50 for now, then revert it to 10 when pagination is implemented.
But for Submitted PRs, I'll max it at 20 (for now).

@georgeciubotaru
Copy link
Contributor Author

@power-f-GOD Also please check that condition for unsubmitted tab, I think something is wrong here

[
  {
    $match: {
      merged: true,
      contributor_ids: {
        $in: [8217518]
      },
    }
  },
  {
    $lookup: {
      from: "submissions",
      localField: 'id',
      foreignField: 'item_id',
      as: 'submission'
    }
  },
  {
    $unwind: { path: '$submission', preserveNullAndEmptyArrays: true }
  },
  {
    $match: {
      submission: {$exists: false },
      'submission.owner_id': { $ne: '' },
      'submission.approval': { $ne: '' }
    }
  }
]

this last $match block should be placed in
$lookup => pipeline => [{$match}]

@power-f-GOD
Copy link
Contributor

Also please check that condition for unsubmitted tab, I think something is wrong here

What did you notice?

PS. I already tested it yesterday and it works. Even now.

@georgeciubotaru
Copy link
Contributor Author

@power-f-GOD Based on the aggregation I get 0 results in the unsubmitted tab, instead of having ~ 56.

@georgeciubotaru
Copy link
Contributor Author

@power-f-GOD Also, I'm seeing some items with
image
I thought you've migrated the fields and removed the old ones

@power-f-GOD
Copy link
Contributor

power-f-GOD commented Sep 20, 2023

@power-f-GOD Based on the aggregation I get 0 results in the unsubmitted tab, instead of having ~ 56.

Can I see (post) your query?

Also, I'm seeing some items with

Strange. Having a look...

@georgeciubotaru
Copy link
Contributor Author

georgeciubotaru commented Sep 20, 2023

@power-f-GOD You have the Aggregations tab in MongoDB Compass app

@power-f-GOD
Copy link
Contributor

I thought you've migrated the fields and removed the old ones

Ah. I see the issue. The check I put for migrating only thru prod prevented it, and I was unable to the time. I'll re-run it.

@power-f-GOD
Copy link
Contributor

@power-f-GOD You have the Aggregations tab in MongoDB Compass app

I need to see your query. That's how I can tell/check/confirm you're making the right query.

@power-f-GOD
Copy link
Contributor

@power-f-GOD You have the Aggregations tab in MongoDB Compass app

I need to see your query. That's how I can tell/check/confirm you're making the right query.

Ok. I see the problem. Having a look...

@georgeciubotaru
Copy link
Contributor Author

@power-f-GOD It's the one in the comment above #123 (comment)

@power-f-GOD
Copy link
Contributor

This is done/solved, yeah, @georgeciubotaru ?
I want to (or will) mark it as resolved by #159 .

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

Successfully merging a pull request may close this issue.

3 participants