compucorp / uk.co.compucorp.membershipextras

Membership Extras for CiviCRM
Other
5 stars 8 forks source link

CIWEMB-491: Replace the membership status calculation error message with more readable content #502

Closed omarabuhussein closed 11 months ago

omarabuhussein commented 11 months ago

Before

When the statuses "Current Renewed" and "Future Start" are disabled, if you try to add a membership line item with future date the following error will appear:

2023-09-28 11_49_12-sasda dsadsa _ compuclient22sspv3

Which as you can see is not that great and shows the dates in not very readable format.

After

The error message that appear after trying to add a membership line with future date is improved:

2023-09-28 11_52_08-sasda dsadsa _ compuclient22sspv3

Technical details

In the manage instalment screen we catch exceptions that comes from Civi core and show it in the error notification as is, which is fine most of the time given most of the messages are readable, but given it is not the case with the status calculation message, I here search the exception message to check if it is really the status calculation message, and if so I replace its content with the improved wording.