How Can jBilling Help You?
Who’s Using jBilling?

“jBilling has the features and design needed to address the telecom industry.”
Gavin Sweet
theNetStart Platform Ltd
See all testimonials >

DONE - BUG: deleted user shows 'Active'

Delete a user with an invoice. The user is not longer in the user's list, but the invoice is (which is good). If you select the invoice to see its details, you can click from there on the user id number and go back to see the user details.

So far so good, the problem is that the status of the user is still 'Active'. It should be 'Deleted'. To fix this, you have to change the user deletion code so it not only soft-deletes the database record, it also changes the user's status to 'deleted'.

The place to make your changes is in the class UserBL, method delete. To change the user status use something like this:

// make the change
UserStatusEntityLocal status = userStatusHome.findByPrimaryKey(
statusId);
user.getEntity().setStatus(status);
user.getEntity().setLastStatusChange(today);

This task has been completed. See the changes here

 
lu wrote 5 years 11 weeks ago

Hi Emil, Did you have time

Hi Emil,

Did you have time to verify the modified file, which is supposed to fix this bug?

Thanks.

lu

econde wrote 5 years 11 weeks ago

Sorry about the delay, Lu.

Sorry about the delay, Lu. I'll be doing the code review today or tomorrow.

Cheers,

Emiliano Conde
Lead Developer - jbilling

Emiliano Conde
Lead Developer - jBilling

 
lu wrote 5 years 11 weeks ago

You must be busy. I was only

You must be busy. I was only hoping that it was not forgotten. :)

 
lu wrote 5 years 14 weeks ago

Is there a state chart for a

Is there a state chart for a "user" somewhere? Is a user either "Active" or "Deleted"?

If click on the Id of a deleted user on an invoice, it will bring back to the user detail page; other than the bug the status is still "Active", other fields are not modifiable if I am not mistaken.

For a case where a user is "deleted" but still has at least an invoice to pay, but already moved to anther address, is there anyway a deleted user can still change address?

Under what circumstances is a user deleted? Can a user change state from "deleted" back to "active"?

Thanks.

lu

econde wrote 5 years 14 weeks ago

Lu, for the time being, when

Lu, for the time being, when a user is in 'Deleted' status we do not allow any changes to data such as the address. I do think that this could or should be improved in the future, but right now we just want to fix the bug where a deleted user shows up with 'Active' status.

The main confusion point here is that there are two different fields in the database for the user:
- base_user.deleted is a boolean flag that indicates if the user is soft deleted or not. This one is the one I refer to when saying 'a customer is deleted'.
- base_user.status . This can be 'active', 'suspended', deleted, etc. This is the one that is out of synch and should be fixed.

Once a user is deleted, to un-delete the user it is necessary to change the record directly in the database. Again, it'd be good in the future to allow for this from the GUI.

Emiliano Conde
Lead Developer - jbilling

Emiliano Conde
Lead Developer - jBilling

 
lu wrote 5 years 14 weeks ago

Thanks for clearing it up,

Thanks for clearing it up, Emiliano. May I try to work on this one?

econde wrote 5 years 14 weeks ago

Sure go

Sure go ahead.

Cheers,

Emiliano Conde
Lead Developer - jbilling

Emiliano Conde
Lead Developer - jBilling

 
lu wrote 5 years 13 weeks ago

Hi Emiliano, I am sending

Hi Emiliano,

I am sending the modified file UserBL.java to jbilling-developers@lists.sourceforge.net.

lu

econde wrote 5 years 12 weeks ago

Thanks Lu!. By the way, I'd

Thanks Lu!. By the way, I'd be great if you subscribe to the list. Then it is easier when you send a message to it. Otherwise I have to manually approve everything you send ;).

Thanks,

Emiliano Conde
Lead Developer - jbilling

Emiliano Conde
Lead Developer - jBilling

 
lu wrote 5 years 12 weeks ago

Hi Emiliano, I did use my

Hi Emiliano,

I did use my gmail address to subscribe to the list. I just sent a revised bug fix to jbilling-developers@lists.sourceforge.net and got an auto reply saying "waiting for moderator approval". Do you have to manually approve it again?

Am I doing it the right way?

Thanks.

lu

econde wrote 5 years 12 weeks ago

I think you've got it right

I think you've got it right this time. This is another issue with the list ... :( Messages can only be of up to 40K ... otherwise I have to approve. I wish I could change some settings to remove such an inconvenient limit.

Emiliano Conde
Lead Developer - jbilling

Emiliano Conde
Lead Developer - jBilling

 
lu wrote 5 years 12 weeks ago

Ok. I subscribed with my

Ok. I subscribed with my gmail address.

Cheers.

Please register or login to post a comment.