Bug 784 - The age returned is wrong.
Summary: The age returned is wrong.
Status: RESOLVED FIXED
Alias: None
Product: Coupon Redemption System
Classification: Unclassified
Component: User Management (show other bugs)
Version: unspecified
Hardware: All All
: --- normal
Deadline: 2023-11-24
Assignee: YAU Chi Wai
URL:
Depends on:
Blocks:
 
Reported: 2023-11-22 14:47 HKT by YAU Chi Wai
Modified: 2023-11-23 14:22 HKT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description YAU Chi Wai 2023-11-22 14:47:16 HKT
I entered an age of 18 before my birthday's (15 Nov) this year when I create my user account (14 Nov). On 16 Nov, I checked my profile again and it showed 18 again which is not automatically updated according to my date of birth provided.
Comment 2 YAU Chi Wai 2023-11-23 14:22:04 HKT
(In reply to YAU Chi Wai from comment #0)
> I entered an age of 18 before my birthday's (15 Nov) this year when I create
> my user account (14 Nov). On 16 Nov, I checked my profile again and it
> showed 18 again which is not automatically updated according to my date of
> birth provided.

The problem is caused by the attribute stored the age that inputted by the user instead of calculated by the date of birth. To solve this bug, the attribute is removed and a method getAge is implemented to calculate the age.