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

Aggregated rights report - correct implementation of Rights split #48

Open
10 of 11 tasks
BBGuy opened this issue Sep 16, 2014 · 13 comments
Open
10 of 11 tasks

Aggregated rights report - correct implementation of Rights split #48

BBGuy opened this issue Sep 16, 2014 · 13 comments
Assignees

Comments

@BBGuy
Copy link
Member

BBGuy commented Sep 16, 2014

Initial requirements

The current 50/50 split is not accurate as in reality the function handles all contributions as equal.
This can cause confusion especially when we have more then two right types.
We have two options:

  1. remove the 50/50 graph - easy
  2. fully implement the Rights split - not an easy task but needed if we are to try and show realistic data. This will allow us to show splits by country.

Changes to Rights split algorithm

The current algorithm process uses a four stage process the below are the changes needed to those steps plus one additional step.
What those changes do is use the four steps two work out the percentage within each of the right types and the extra steps to work the overall split using a newly supplied split.
The changes are as follows:

  • provide kendra_e_resolve_asset_rights() a new $rt_split (right type split) an array in the format of:
    Array( [right type] => percent 0-100 }
  • Step 1 Collect an array to hold rights information - Add the right_type
  • Step 2 - Collect the percentage from the collected rights array - for the specific right type
  • 3. Build a list of legal entities and their contribution percentages.

was not needed:
4. Total each of the artists aggregated rights percentages.
5. Calculate the overall percentage according to a supplied split.

To do

  • Validation for $rt_split and if no all rights types are used proportionally adjust those that do
    Split the "Rights split" graph into two
  • 1) "Requested rights split"
  • 2) "Actual rights split"
  • Have a table showing the right splits with actual numbers
  • Add a Legal entities split Graph and Table for each right type as well as the combined one
  • Basic UX for setting $rt_split - using a hardcoded drop down list of options
  • Would be nice if the selected option for $rt_split was remembered after submitting the form.

Testing

We didnt get a chance to do much testing before going live but indications are that it is working corectly

  • test new algorithm locally
  • test new algorithm live
  • test new algorithm + ux locally
  • test new algorithm + ux live
@BBGuy BBGuy self-assigned this Sep 16, 2014
@dahacouk
Copy link
Member

Option 2 is the one to go for!

@BBGuy
Copy link
Member Author

BBGuy commented Oct 8, 2014

Step 1 - added the right_type to the $rights['contributions'] array

@BBGuy
Copy link
Member Author

BBGuy commented Oct 8, 2014

Step 2 - updated the calculation to work out the percentage within the right type

@BBGuy
Copy link
Member Author

BBGuy commented Oct 8, 2014

I have added a condition to the recursive part of step 1 a condition that only adds child contributions of the correct type. This is especially important as we have a sample track for each of the rights types.
The result is that calculations now fully respect the right type. although we will need to implement the other steps to allow weighting between right types.

@BBGuy
Copy link
Member Author

BBGuy commented Oct 8, 2014

Looking at the functionality again looks like we can get away with only making a change to step 3 without updating 4 or needing 5.
As we can multiply each percentage by the relevant $rt_split element, the only issue is that if a three right types are provided and only two are used the end result will not add to 100%, this is mitigated by the fact that the graph is a proportion representation.
We may also be able to make the ux for entering the data show only the relevant right types or do a proportional update of $rt_split that uses only the found right types.
to do after resolving step 3:

  • make sure all right types are accounted for in $rt_split
  • Adjust right types or make sure their are all in

@BBGuy
Copy link
Member Author

BBGuy commented Oct 8, 2014

Got a couple of test assets will use those to test the number but its looking good real good :)

@BBGuy
Copy link
Member Author

BBGuy commented Oct 10, 2014

Local Dev test

Test one a simple test

An asset with a Single composition, and two performance: with the following rights splt (50/50):

    $rt_split = array (
    'Composition' => 50,
    'Performance' => 50,
    'Recording' => 0,
    );

01 track a split 50 50
as can be observed the single composer gets 50% while the two performers get 25% each

We now change the split to 75/25:

    $rt_split = array (
    'Composition' => 75,
    'Performance' => 25,
    'Recording' => 0,
    );

01 track a split 75 25
same track now gives the composer 75% while the performers get half of the 25% (the chart uses rounding and I will add the underlining data next week)

Test two - embedded sample

{to do}

@BBGuy
Copy link
Member Author

BBGuy commented Oct 14, 2014

I have pushed the following changes:

  • Validation for $rt_split and if no all rights types are used proportionally adjust the Split
  • Split the "Rights split" graph into two: "Requested rights split" & "Actual rights split"
  • Have a table showing the right splits with actual numbers
    To do:
  • I have a bit more $rt_split validation to do in _kendra_e_validate_rights_split: @todo - Add missing rights as zero %
  • Clean and update comments and @todo items in kendra_e.module as some of the todo have been done or no longer relevant

@BBGuy
Copy link
Member Author

BBGuy commented Oct 15, 2014

Added validation for missing right types, those are set to zero to make sure calculations work without errors (see image below)
rights_split_validation

@BBGuy
Copy link
Member Author

BBGuy commented Oct 21, 2014

@dahacouk I have almost finished the configurable right splits, what I need from you is a list of names and splits something Like:
UK Radio: Composition=40,Performance=50,Recording=10
US Radio: Composition=45,Performance=50,Recording=5
names can be what ever you want.

Those will be available in a dropdown but I have done it in such a way that you will be able to change the url to get a specific split not in the options so it will look like
http://hub2.kendra.org/content/stairway-heaven?Composition=50&Performance=50

@dahacouk
Copy link
Member

OK. I'm going out to the community to get feedback. We also need to know what other possible "right types" we may need to represent in the system...
screenshot 2014-10-22 13 08 14

@BBGuy
Copy link
Member Author

BBGuy commented Oct 23, 2014

This is now live with test data see http://kendra_hub_v2.dev.local/content/stairway-heaven
Would be nice if the selected option was remembered after submitting the form.

@BBGuy
Copy link
Member Author

BBGuy commented Dec 16, 2014

task "bottom of chart key sometimes gets cut off at bottom of screen see http://hub2.kendra.org/content/song-55" moved to its own issue #50

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

No branches or pull requests

2 participants