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

Add tests for data element Post and fix bug with AbandonChanges #875

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

ivarne
Copy link
Member

@ivarne ivarne commented Oct 31, 2024

Fix a bug where you had to add more than 1 issues (instead of at least 1 issue) in AbandonAllChanges.

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)
  • All tests run green

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

@ivarne ivarne added the bugfix Label Pull requests with bugfix. Used when generation releasenotes label Oct 31, 2024
@ivarne ivarne force-pushed the bug/addTestsForAbandonChanges branch from 9a15672 to a304139 Compare October 31, 2024 22:07
Copy link
Contributor

@martinothamar martinothamar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woops, missed this. Maybe a good candidate for making a HasAbandonIssues prop to keep the conditional only one place?

@ivarne
Copy link
Member Author

ivarne commented Nov 3, 2024

Maybe a good candidate for making a HasAbandonIssues prop to keep the conditional only one place?

Or just a ProblemDetails GetAbandonResponse() to internalise the mapping to a ProblemDetails instance as well?

@martinothamar
Copy link
Contributor

I would not use the ASP.NET Core ProblemDetails model directly in there, I think that responsibility (deciding what to return in the API) should lie in the API/outer layer. Maybe an extension method or something?

The IInstanceMutator property could be something like HasAbandonIssues(out IEnumerable<AbandonIssue> issues) to access the actual data?

Move PatchService to .Api project and rename to InternalPatchService
@ivarne ivarne force-pushed the bug/addTestsForAbandonChanges branch from a304139 to 7ffd10f Compare November 6, 2024 12:18
Copy link

sonarcloud bot commented Nov 6, 2024

@ivarne ivarne merged commit c45bc7c into main Nov 6, 2024
11 checks passed
@ivarne ivarne deleted the bug/addTestsForAbandonChanges branch November 6, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Label Pull requests with bugfix. Used when generation releasenotes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants