boss icon indicating copy to clipboard operation
boss copied to clipboard

New Feature : conflicting claims

Open YashKumarVerma opened this issue 5 years ago • 11 comments

Fixes #260 Ref #258

  • [x] Shows a list of conflicting claims made by various users in the sidebar
  • [x] Provision to match URLs who differ only in the protocol, trailing slashes, ports, hashes, query strings etc
  • [x] Inline documentation added for codebase edits
  • [x] All errors inside route handled

Preview

  • Raw data used to build page screencapture-localhost-3232-claims-2-2020-05-18-12_40_48

  • When there are no conflicts Screenshot from 2020-05-18 13-38-02

  • When conflicts arise Screenshot from 2020-05-18 13-38-14

YashKumarVerma avatar May 18 '20 08:05 YashKumarVerma

@hereisnaman, @championswimmer waiting for review

YashKumarVerma avatar May 19 '20 18:05 YashKumarVerma

@hereisnaman, @championswimmer waiting for review

Reviews usually take from 1-3 days. You can start working on other issues.

0xnmn avatar May 19 '20 19:05 0xnmn

Awaiting review.

YashKumarVerma avatar May 23 '20 05:05 YashKumarVerma

~~Requesting someone to carry it forward~~

YashKumarVerma avatar May 24 '20 10:05 YashKumarVerma

A few thigns to mention:

  • if only the number is matched using a wildcard, then issue 10 will show conflicts with 100, 101, 102...
  • if it will be assumed that the issue / pr id will be followed by a slash or terminate immediately, it's also a wrong lead, as URLs ending with hashes are also submitted

Working on a solution of the above problems.

YashKumarVerma avatar May 29 '20 20:05 YashKumarVerma

A few thigns to mention:

* if only the number is matched using a wildcard, then issue 10 will show conflicts with 100, 101, 102...

* if it will be assumed that the issue / pr id will be followed by a slash or terminate immediately, it's also a wrong lead, as URLs ending with hashes are also submitted

Working on a solution of the above problems.

What is the use case behind having urls with hashes? Can't we clean them in the add claim form?

0xnmn avatar May 30 '20 01:05 0xnmn

A few thigns to mention:

* if only the number is matched using a wildcard, then issue 10 will show conflicts with 100, 101, 102...

* if it will be assumed that the issue / pr id will be followed by a slash or terminate immediately, it's also a wrong lead, as URLs ending with hashes are also submitted

Working on a solution of the above problems.

What is the use case behind having urls with hashes? Can't we clean them in the add claim form?

We should surely add checks in the form where new claim is added, but the problem is, We already have entries like this. image image

So either we update the entries like these, or we accommodate things like this in the conflicts code. In any of these cases, we still need to add checks in the input form

YashKumarVerma avatar May 30 '20 03:05 YashKumarVerma

@YashKumarVerma can you first create a PR with the following:

  • in add claim api, clean the urls, removing all the hashes, query params and add trailing slash.
  • write a script to transform the current items for the same.

I'll give you separate points for that.

0xnmn avatar May 30 '20 04:05 0xnmn

@YashKumarVerma can you first create a PR with the following:

  • in add claim api, clean the urls, removing all the hashes, query params and add trailing slash.
  • write a script to transform the current items for the same.

I'll give you separate points for that.

@hereisnaman I wrote the script but there's one issue we need to tackle. The pullUrl column is set as unique, so if there exist entries with and without trailing slash, it will throw error and not let us update it.

An alternative approach can be that we

  • do not fix the old claims (as removing the slash and # would cause conflicts in db as the column is set to unique in the schema and ideally, we should not change that)
  • we check new claims that are made, and make sure that the above point is not repeated in new claims.
  • in the conflicting claims page, we write the code to handle the cases like these (I've found a workaround for it)

YashKumarVerma avatar May 30 '20 04:05 YashKumarVerma

With #390 sent, now we can create a more robust conflict view. Reasons:

  • There are multiple PRs sent for the same issue. we need to list them.
  • Shows number of PRs for single issue submitted on BOSS portal
  • image
  • There are
    • 100 claims which have the same URL submitted for both handles.
    • 140 claims which have different URLs submitted

admins must have a complete view of where all were the issues and pull requests submitted

YashKumarVerma avatar May 30 '20 17:05 YashKumarVerma

Carried forward in #392

YashKumarVerma avatar May 30 '20 20:05 YashKumarVerma