View Issue Details

IDProjectCategoryView StatusLast Update
0001316Main CAcert Websiteweb of trustpublic2015-05-12 20:31
ReporterINOPIAEAssigned ToBenBE 
PrioritynormalSeverityminorReproducibilityalways
Status needs review & testingResolutionopen 
Product Version2014 Q4 
Target Version2014 Q4Fixed in Version 
Summary0001316: Adjust the old point calculation while revoking an assurance
DescriptionIf an assurance is revoked the old point calculation is not adjusted. This might lead to a false calculation of assurance points
TagsNo tags attached.
Reviewed byBenBE
Test Instructionssee below https://bugs.cacert.org/view.php?id=1316#c5072

Relationships

related to 0001322 needs workINOPIAE Add a function to recalculate the total of the assurance points (old style) through the SE console 
child of 0001050 needs review & testingBenBE Review the code regarding the new point calculation in ./www/wot.php 
child of 0001042 needs review & testingEva Review the code regarding the new point calculation  

Activities

INOPIAE

2014-10-28 10:33

updater   ~0005071

There is a new fix available at https://github.com/INOPIAE/CAcert/commit/d736523884f3029e6b58f24afdf3ad03c8747dfd

INOPIAE

2014-10-28 10:37

updater   ~0005072

To test
preperation:
create a new accounts
assure the account to 100 points
add a few more assuracnes with different values
test:
revoke the first assurance, see if the points are calculated correctly up to 100 assurance point in old calculation

INOPIAE

2014-10-29 06:15

updater   ~0005082

There is a new fix available at https://github.com/INOPIAE/CAcert/commit/45fb5802e9a3a42d6ef483134f8ac946cc4c5bcc

BenBE

2014-10-29 08:06

updater   ~0005084

Updated patch on testserver. Please test and review.

StefanT

2014-10-29 17:35

updater   ~0005085

I tested the Calculation of Assurance Points with Account "paul.panter@pink.org"
First i created the Account and assured it up to 100 Points.
I revoked 1 Assurance to fall down to 90 Points. The Calculation showed 90 Points > That was correct.
I added 1 Assurance to take 100 Points to the Account and added the successful CATS Test to take Assurer Rights to the Account.
I revoked 1 Assurance, again. The Point showed 90 again, that was correct and the Assurer Rights was gone.
The Status of the successful CATS Test was display correct as successful.

Eva

2014-11-25 21:30

updater   ~0005128

Last edited: 2014-11-25 21:50

View 5 revisions

I created the account gutemine@acme.com

I did the following automated assurances:
10 points
20 points
30 points
35 points
35 points (5 visible in old calculation at this time)
05 points
05 points
10 points

old calculation: 100, new calculation 150

I added the CATs test

All looked ok in user view and support view.

I revoked the second 35 points assurance, while being on the old points calculation support view.
-> The points were shown correctly in user view and support view (old and new) (but should show 5 points, anyway). OK

I revoked the second 10 points assurance, while being on the new points calculation support view.
-> The points were displayed correctly in user view and support view (old and new) (but should show 5 points, anyway). OK

I revoked the first 35 points assurance, while being on the new points calculation support view.
-> The points were displayed correctly in user view and support view (old and new)

Added the following three AUTOMATED assurances:
35 points
20 points
10 points
-> The points stayed at 70 points for old points user view and old points support view. The new calculation was correct for both. WRONG (but was automated tool)

I revoked the new 35 points assurance, while being on the old points calculation view
-> The points were displayed correctly in user view and support view (old and new) OK

I revoked the new 20 points assurance, while being on the new points calculation view
-> The points were displayed correctly in user view and support view (old and new) OK

I revoked the new 10 points assurance, while being on the new points calculation view
-> The points were displayed correctly in user view and support view (old and new) OK

I added the following two MANUAL assurances:
35 points
10 points
10 points
-> The points were displayed correctly in user view and support view (old and new) OK

I revoked the first new 10 points assurance, while being on the new points calculation view
-> The points were displayed correctly in user view and support view (old and new) OK

I revoked the new 35 points assurance, while being on the old points calculation view
-> The points were displayed correctly in user view and support view (old and new) OK

=> OK, if the only wrong situation was because I added the assurances per automated tool and not automatically.

Eva

2014-11-28 21:44

updater   ~0005132

Last edited: 2014-12-23 20:33

View 4 revisions

I did the same test again with a new account (Machtnix@acme.com) and only manual assurances after adding the CATs test.

-> The points were displayed correctly, in the account itself and in support view (old and new).

However I had some weird effects while trying to top up an assurer to be able to assure 20 points with the automated tool, who had previously assured manually. This could probably be fixed by revoking one of the old assurances. I also wondered about the assurer old points calculation for another assurer account (Majestix@acme.com) - This could possibly be explained with some ok behaviour.

=> Fail, as it is not clear, if the patch can have side effects to the assurer points calculation. IF there could be side effects, this needs to be tested, as well. But as long as there is no test description based on the changes that are done with the patch, this cannot be done. (Would be ok, if someone with knowlede about the code can verify that the assurer-part cannot be affected by the changes.)

Additional commment:
The account who had the issue went through a lot of changes over the time. It would be hard to reproduce those to figure out what may have caused the issue, if it was not an issue based on the test manager assurances.

It would be quite helpful to get an answer from the reviewers if there could be something else but the test manager, here

BenBE

2015-02-24 20:19

updater   ~0005327

Last edited: 2015-02-24 20:20

View 3 revisions

The old behaviour of the revokeAssurance feature was to simply delete that single assurance. Afterwards the Assurer Flag is updated for this user.

This was changed with this patch to redistribute the sum of all awarded points on the first assurances (ordered by the date when they were entered) granting at most as many of the points as that particular record held. Afterwards the Assurer Flag is updated for this user as usual.

E.G.:
User has 5 assurances: 30(30) 35(35) 35(35) 5(0) 30(0)
The first assurance gets deleted the points are reallocated as:
User has 4 assurances: 30(0)(DELETED) 35(35) 35(35) 5(5) 30(25)

Eva

2015-02-24 21:20

updater   ~0005328

I re-did my test again with machtdochnix@acme.com with some adjustments to the order of the additions and removals.

The new points calculation was fine. The old points calculation had very weird results.

With the explamation from BenBE I am satisfied that the issue was caused by the automated tool.

By seeing what the old points calculation does we should try to get this going...


=> ok

Issue History

Date Modified Username Field Change
2014-10-28 08:53 INOPIAE New Issue
2014-10-28 08:53 INOPIAE Assigned To => INOPIAE
2014-10-28 10:33 INOPIAE Note Added: 0005071
2014-10-28 10:33 INOPIAE Assigned To INOPIAE => BenBE
2014-10-28 10:33 INOPIAE Status new => fix available
2014-10-28 10:37 INOPIAE Note Added: 0005072
2014-10-28 10:38 INOPIAE Test Instructions => see below https://bugs.cacert.org/view.php?id=1316#c5072
2014-10-28 21:00 BenBE Source_changeset_attached => cacert-devel testserver-stable 0ffc97cb
2014-10-28 21:00 BenBE Source_changeset_attached => cacert-devel testserver-stable 20a51096
2014-10-28 21:00 BenBE Source_changeset_attached => cacert-devel testserver-stable e9c243be
2014-10-29 06:15 INOPIAE Note Added: 0005082
2014-10-29 08:05 BenBE Source_changeset_attached => cacert-devel testserver-stable 52dfc5b3
2014-10-29 08:05 BenBE Source_changeset_attached => cacert-devel testserver-stable 06bad1b1
2014-10-29 08:05 BenBE Source_changeset_attached => cacert-devel testserver-stable b6266ccd
2014-10-29 08:06 BenBE Reviewed by => BenBE
2014-10-29 08:06 BenBE Note Added: 0005084
2014-10-29 08:06 BenBE Status fix available => needs review & testing
2014-10-29 08:15 BenBE Source_changeset_attached => cacert-devel testserver-stable cd8a0009
2014-10-29 08:15 BenBE Source_changeset_attached => cacert-devel testserver-stable b513efab
2014-10-29 17:35 StefanT Note Added: 0005085
2014-10-31 06:38 INOPIAE Relationship added related to 0001322
2014-11-25 21:30 Eva Note Added: 0005128
2014-11-25 21:32 Eva Note Edited: 0005128 View Revisions
2014-11-25 21:33 Eva Note Edited: 0005128 View Revisions
2014-11-25 21:50 Eva Note Edited: 0005128 View Revisions
2014-11-25 21:50 Eva Note Edited: 0005128 View Revisions
2014-11-28 21:44 Eva Note Added: 0005132
2014-12-02 20:24 Eva Note Edited: 0005132 View Revisions
2014-12-02 20:25 Eva Note Edited: 0005132 View Revisions
2014-12-23 20:33 Eva Note Edited: 0005132 View Revisions
2015-02-24 20:19 BenBE Note Added: 0005327
2015-02-24 20:19 BenBE Note Edited: 0005327 View Revisions
2015-02-24 20:20 BenBE Note Edited: 0005327 View Revisions
2015-02-24 21:20 Eva Note Added: 0005328
2015-05-12 20:23 felixd Relationship added child of 0001050
2015-05-12 20:31 BenBE Relationship added child of 0001042