Joystream / joystream

Joystream Monorepo
http://www.joystream.org
GNU General Public License v3.0
1.43k stars 114 forks source link

[Content curation working group] Possible incorrect IDs in curator opening record #128

Open yourheropaul opened 4 years ago

yourheropaul commented 4 years ago

Note: this was replicated using PR #103, which may be outdated. All calls are assumed to be via polkadot.js via Pioneer

Problem

When a new content curators working group application has been made successfully to an active opening, the curator_opening_id seems to be a sequential ID for the opening. This does not correlate with the CuratorApplicationById storage. This is quite counter-intuitive.

Steps to reproduce

  1. Create a new working group opening (let's call it A) and make sure it's accepting applications. Then create a second group - B - and make sure that's also accepting applications.
  2. Make a new application to A, then make a second application to B, and a third application to A.
  3. Check the application_id and curator_opening_id field values for the applications to A. Ideally, their curator_opening_id values would represent the values in the CuratorApplicationById storage, not their sequential IDs.

Example

The screenshot below illustrates the issue using the nascent roles admin tab, starting with a fresh, local devnet at block 1.

Here, two openings have been created, following the steps above; the one at the top is effectively A and the bottom is B. After the openings were created, three applications were made in the pattern A, B, A as described in the steps above.

screenshot

The first column (WG ID) contains the value of curator_opening_id for each application. As you can see, this value is sequential, and is not the map key for CuratorApplicationById .

What I'd like to see

The value of curator_opening_id for each application should be the same as CuratorApplicationById . This will allow Pioneer to look up application data with only the working group ID.

┆Issue is synchronized with this Asana task by Unito

mnaamani commented 4 years ago

Isn't the application_id field in the same struct what you are looking for?

edit: Here I meant are you confusing application_id with curator_opening_id field..

mnaamani commented 4 years ago

Or are you proposing adding a new map opening id -> to a vector of application id ?

... because there is a one to many relationship between an opening and application