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

New Activity creation bug #127

Open
jainmanis opened this issue Sep 20, 2022 · 2 comments
Open

New Activity creation bug #127

jainmanis opened this issue Sep 20, 2022 · 2 comments
Labels
bug Something isn't working invalid This doesn't seem right

Comments

@jainmanis
Copy link

Describe the bug
When a new activity is created using PipedriveClient.Create method, the activity is always created as Done, even if you set in paramaters Undone.

To Reproduce
Steps to reproduce the behavior:

NewActivity activityParams = new NewActivity("Call the client", "Call")
{
UserId = 12345,
DueDate = DateTime.UtcNow.AddDays(5),
Note = "This is the note for the activity",
Done = ActivityDone.Undone,
PersonId = 456
};

            var createdActivity = await client.Activity.Create(activityParams);

Expected behavior
New activity should be created with Undone status.

@DavidRouyer DavidRouyer added the bug Something isn't working label Oct 11, 2022
@DavidRouyer
Copy link
Owner

I could not reproduce the behavior.

I tested it on my integration test with the following code:

  var pipedrive = Helper.GetAuthenticatedClient();
  var fixture = pipedrive.Activity;
  
  var newActivity = new NewActivity("new-subject", "call");
  newActivity.Done = ActivityDone.Undone;
  
  var activity = await fixture.Create(newActivity);
  Assert.NotNull(activity);
  
  var retrieved = await fixture.Get(activity.Id);
  Assert.NotNull(retrieved);
  Assert.Equal(false, retrieved.Done);
  
  // Cleanup
  await fixture.Delete(activity.Id);

@DavidRouyer DavidRouyer added the invalid This doesn't seem right label Oct 11, 2022
@jainmanis
Copy link
Author

Hi David,

Thanks for checking it and for your feedback.

I tried again creating an activity and it's created with Done Status. I tried to update it but the status always remain Done, even if I force it Undone.

I am using the nuget package in my code. I don't know what could be the issue?

Thanks,
Manish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants