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

Fixes an issue that causes Custom Reports to sometimes duplicate items. [ch14587] #9535

Merged
merged 1 commit into from
May 5, 2021

Conversation

inietov
Copy link
Collaborator

@inietov inietov commented May 5, 2021

Description

Custom Reports had a problem that makes some assets to appear duplicated in the CSV that the report generates.

This was caused because the function that appends data to the CSV used the 'chunk' method in case the user had millions of registers. But if the order column we passed to that 'chunk' method is not unique, the database could sometimes get back records that already was appended to the CSV, the column used by the order was created_at but if the assets where imported from a file, that date could appear repeated causing this error. This was fixed making the ordering by a really unique column in our assets database: id.

Fixes [ch14587]

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Test Configuration:

  • PHP version: 7.4.16
  • MySQL version: 8.0.23
  • Webserver version: nginx/1.19.8
  • OS version. Debian 10

…rms the CSV to be 'id' so making it a unique value and don't causes repeated items. [ch14587]
@snipe snipe merged commit 36a4364 into snipe:develop May 5, 2021
@snipe
Copy link
Owner

snipe commented May 5, 2021

¡Excellent work, thank you @inietov! :D

@snipe
Copy link
Owner

snipe commented May 5, 2021

(You should never have let me figure out how to do the upside down exclamation point :D :D :D )

@inietov
Copy link
Collaborator Author

inietov commented May 5, 2021

It's a waste of typing if you ask me, I don't use it even when I'm writing in spanish. 😄

@snipe
Copy link
Owner

snipe commented May 5, 2021

😂

in-spanish

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

Successfully merging this pull request may close these issues.

None yet

2 participants