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

Fix #3087 Report calculate totals for all records #10040

Open
wants to merge 1 commit into
base: hotfix
Choose a base branch
from

Conversation

abuzarfaris
Copy link
Contributor

@abuzarfaris abuzarfaris commented May 1, 2023

Description

Report now calculates summary for all records not just current page records

Motivation and Context

How To Test This

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

@serhiisamko091184 serhiisamko091184 added PR 4-8 Score given to PRs once assessed PR 9-14 Score given to PRs once assessed Status: Requires Code Review Needs the core team to code review Status:Assessed PRs that have been tested and confirmed to resolve an issue by a core team member and removed PR 4-8 Score given to PRs once assessed labels May 1, 2023
@serhiisamko091184
Copy link
Contributor

Hello @abuzarfaris ,
thanks for your contribution!

Regards,
Serhii

@clemente-raposo
Copy link
Contributor

@serhiisamko091184 the file needs some re-formatting according to our internal standards

@jack7anderson7 jack7anderson7 added the Area: Reports Issues & PRs related to all things regarding reports label Aug 31, 2023
@serhiisamko091184 serhiisamko091184 added Status:Requires Updates Issues & PRs which requires input or update from the author Status:In Review Pull Requests that are activity being reviewed by the core team and removed Status: Requires Code Review Needs the core team to code review labels Jun 10, 2024
@serhiisamko091184
Copy link
Contributor

Hello @abuzarfaris,

thanks for your PR,

could you please reformat the code you've provided (this is mostly about spaces all over the code lines) and re-push it?

Many thanks in advance!

Regards,
Serhii

@abuzarfaris
Copy link
Contributor Author

Hello @abuzarfaris,

thanks for your PR,

could you please reformat the code you've provided (this is mostly about spaces all over the code lines) and re-push it?

Many thanks in advance!

Regards, Serhii

Hey @serhiisamko091184 can you please elaborate more about which white spaces you need changed.
I have just added these following sections to the code
image

@serhiisamko091184
Copy link
Contributor

Thanks for your quick response,

Yes, sure:

  1. 'if' structures have a different formatting;
  2. different quotes in use;
  3. spaces to be removed and added across the sections.

image

image

Thanks a lot!

Regards,
Serhii

@abuzarfaris
Copy link
Contributor Author

Thanks for your quick response,

Yes, sure:

  1. 'if' structures have a different formatting;
  2. different quotes in use;
  3. spaces to be removed and added across the sections.

image

image

Thanks a lot!

Regards, Serhii

@serhiisamko091184 hey thank you very much I now understand your requests

@abuzarfaris
Copy link
Contributor Author

@serhiisamko091184 I have updated the commit please review

@serhiisamko091184
Copy link
Contributor

Hello @abuzarfaris,

thank you for the changes you've made, I appreciate your quick reply,

on the formatting: would you be so kind to make if/else control structure consistent with the rest of the code by moving 'else' line to the closing figure brace of the 'if' part (L991)?

image

Apart from the formatting, I'd like to draw your attention to the commented line 979:

image

If we don't need to use it, we could remove the line.

Thanks a lot!

Regards,
Serhii

@abuzarfaris
Copy link
Contributor Author

Hello @abuzarfaris,

thank you for the changes you've made, I appreciate your quick reply,

on the formatting: would you be so kind to make if/else control structure consistent with the rest of the code by moving 'else' line to the closing figure brace of the 'if' part (L991)?

image

Apart from the formatting, I'd like to draw your attention to the commented line 979:

image

If we don't need to use it, we could remove the line.

Thanks a lot!

Regards, Serhii

@serhiisamko091184 thank you for the detailed guidance. I have updated the commit

@serhiisamko091184 serhiisamko091184 added Status: Passed Code Review Mark issue has passed code review reviewed Status: Requires Testing Requires Manual Testing and removed Status:Requires Updates Issues & PRs which requires input or update from the author Status:In Review Pull Requests that are activity being reviewed by the core team labels Jun 21, 2024
@serhiisamko091184
Copy link
Contributor

Thanks again for the contributing, @abuzarfaris!

@johnM2401 johnM2401 added the Status:Requires Updates Issues & PRs which requires input or update from the author label Jun 27, 2024
@johnM2401
Copy link
Contributor

johnM2401 commented Jun 27, 2024

Hey!
I've had a test of this PR locally and it appears as though Reports now has some odd field rendering issues.

I've noticed that any fields after an "Average" or "Sum" are totally dropped.

The user should be able to see all fields set on the report.


See screenshots:

In these two, I have 4 Amount fields in order of: None/Count/Average/Sum
However, Sum no longer renders
image
image


If I reorder these fields so that Sum comes before Average and Count, only Sum shows:
image
image


And as another example, setting average as the first field, it is the only field that renders:
image
image

For example, before this fix, it renders all 3:
image

Is this something that you've come across in your usage? (I assume this is not intentional, so want to double check this isn't something on my end)
Would you be able to have a look into this, if you get a chance?

Thanks!

@abuzarfaris
Copy link
Contributor Author

Hey! I've had a test of this PR locally and it appears as though Reports now has some odd field rendering issues.

I've noticed that any fields after an "Average" or "Sum" are totally dropped.

The user should be able to see all fields set on the report.

See screenshots:

In these two, I have 4 Amount fields in order of: None/Count/Average/Sum However, Sum no longer renders image image

If I reorder these fields so that Sum comes before Average and Count, only Sum shows: image image

And as another example, setting average as the first field, it is the only field that renders: image image

For example, before this fix, it renders all 3: image

Is this something that you've come across in your usage? (I assume this is not intentional, so want to double check this isn't something on my end) Would you be able to have a look into this, if you get a chance?

Thanks!

Hey can you tell me your php version as well I'll test with similar version thank you

@johnM2401
Copy link
Contributor

Hey can you tell me your php version as well I'll test with similar version thank you

Hey @abuzarfaris !
Ah apologies, I'd tested it on:
Firefox 113.0.2 / PHP8.2.11 / MariaDB 10.4.12 / SuiteCRM version 7.14.4

(I've just double checked there and am able to replicate on PHP7.4 / Chromium 125)

Let me know if you need any more information!
Thanks again!

@abuzarfaris
Copy link
Contributor Author

Hey can you tell me your php version as well I'll test with similar version thank you

Hey @abuzarfaris ! Ah apologies, I'd tested it on: Firefox 113.0.2 / PHP8.2.11 / MariaDB 10.4.12 / SuiteCRM version 7.14.4

(I've just double checked there and am able to replicate on PHP7.4 / Chromium 125)

Let me know if you need any more information! Thanks again!

@johnM2401 Thank you very much for pointing out the issue. I have updated the commit to resolve the issue

@johnM2401 johnM2401 removed the Status:Requires Updates Issues & PRs which requires input or update from the author label Jun 28, 2024
Copy link
Contributor

@johnM2401 johnM2401 left a comment

Choose a reason for hiding this comment

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

Thank you @abuzarfaris
Latest fix looks good, report content rendering appears to match how it was before.
(With "Total" functions working across all pages, now)

Thank you again for your contribution!

@johnM2401 johnM2401 added Status: Requires Code Review Needs the core team to code review Status: Passed Testing and removed Status: Passed Code Review Mark issue has passed code review reviewed Status: Requires Testing Requires Manual Testing labels Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Reports Issues & PRs related to all things regarding reports PR 9-14 Score given to PRs once assessed Status:Assessed PRs that have been tested and confirmed to resolve an issue by a core team member Status: Passed Testing Status: Requires Code Review Needs the core team to code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants