Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data loss when saving Cases when no prior records exist #47

Open
benknowles opened this issue Sep 15, 2015 · 6 comments
Open

Data loss when saving Cases when no prior records exist #47

benknowles opened this issue Sep 15, 2015 · 6 comments
Assignees

Comments

@benknowles
Copy link
Contributor

In order to reproduce this, add "Cases" to the module list and make sure there are no cases records in Zoho.

kase = RubyZoho::Crm::Case.new(
  :status => 'New',
  :type => 'Problem',
  :subject => 'Testing',
  :case_origin => 'Web',
  :priority => 'Medium',
  :description => 'This is a test'
)

kase.save

This will create a record, but none of the field data is saved (all blank). Now if you re-run the script with the existing record it will work fine.

It looks like something isn't being initialized, because you have to reload RubyZoho for it to work, i.e. creating 2 records from scratch doesn't save correctly.

@amalc
Copy link
Owner

amalc commented Sep 18, 2015

This isn't good. Only on Cases?

@amalc
Copy link
Owner

amalc commented Sep 18, 2015

And only on an empty list?

@benknowles
Copy link
Contributor Author

I've only had this happen on Cases, and only on an empty list.

If RubyZoho is initialized with an empty list, any cases will be messed up.

If it's initialized when there are 1 or more, it works fine.
On Sep 18, 2015 10:08 AM, "amalc" [email protected] wrote:

And only on an empty list?


Reply to this email directly or view it on GitHub
#47 (comment).

@amalc
Copy link
Owner

amalc commented Sep 18, 2015

That's just plain weird. Because every class except for User is created dynamically based on the initializer and all of the code is shared. I wonder if this happens on any empty list? That would clearly make it a bug. If it's just Cases then it probably in Zoho's API logic. Have you tried an empty list anywhere else?

@amalc amalc self-assigned this Sep 18, 2015
@benknowles
Copy link
Contributor Author

It could be. I'm unable to test it because this is an Enterprise level
account with live data in it that I can't risk.

But, the Cases module behaves differently than most others so I wouldn't be
surprised if it's something on their end.
On Sep 18, 2015 10:56 AM, "amalc" [email protected] wrote:

That's just plain weird. Because every class except for User is created
dynamically based on the initializer and all of the code is shared. I
wonder if this happens on any empty list? That would clearly make it a bug.
If it's just Cases then it probably in Zoho's API logic. Have you tried an
empty list anywhere else?


Reply to this email directly or view it on GitHub
#47 (comment).

@amalc
Copy link
Owner

amalc commented Sep 18, 2015

Right. Thanks. I'm not sure how to proceed. Could turn logging on I suppose to see what's happening. Or I guess the work around, which is ugly, is to add a record manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants