context_v1_pointsAutomation.AwardPoints assigns points twice

Hi, I have developed a custom points automation for assigning points to a reply author when someone likes the reply (Event: ForumReplyVote.AfterCreate).

It works well if a user clicks the vote up/down button, but when the thread author makes the reply as a "verified answer," the system automatically fires a "Vote" event and assigns the points twice.

In the logs, below statement being called only once, but i see two entries in pointtransaction table in the database.

context_v1_pointsAutomation.RevokePoints(userId, context_v2_automationTrigger.Arguments.ContentId, context_v2_automationTrigger.Arguments.ContentTypeId);

logs:

25 Oct 2021 12:57 PM2 TimesIP 10.208.190.46
Assign points to content author- Ended

25 Oct 2021 12:57 PM2 TimesIP 10.208.190.46
Assign Points

25 Oct 2021 12:57 PM2 TimesIP 10.208.190.46
awardedPoints:: false

ContentFragmentRenderingError
25 Oct 2021 12:57 PM2 TimesIP 10.208.190.46
Assign points to content author -started

Any help on this will be greatly appreciated.

Thank you!!

Parents
No Data
Reply
  • Former Member
    0 Former Member in reply to cdns123

    Do you have two different items that are both using the same Automation when you look at the Membership > Points page in administration.  I can repro this by adding two different usages that both use your automation above.  First time, you vote on a reply, get two different point awards.  Change vote and awardedPoints is true and no new points records are added.  You should also be seeing 2 instances of each exception getting added the first time you vote on a reply.

Children
No Data