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

Keep counter Totals first for Event Types #2771

Closed
apmuthu opened this issue Jul 10, 2017 · 5 comments · Fixed by #7065
Closed

Keep counter Totals first for Event Types #2771

apmuthu opened this issue Jul 10, 2017 · 5 comments · Fixed by #7065
Assignees
Labels
bug good first issue Indicates a good issue for first-time contributors
Milestone

Comments

@apmuthu
Copy link

apmuthu commented Jul 10, 2017

Replace Line 52 of EventNames.php:

$eCntArray[] = 'Total';

with

array_unshift($eCntArray, 'Total');
@DawoudIO
Copy link
Contributor

apmuth you can click the edit button on /~https://github.com/ChurchCRM/CRM/blob/master/src/EventNames.php#L52 and make the changes and submit a PR.

@crossan007 crossan007 modified the milestone: Backlog Jul 14, 2017
@DawoudIO DawoudIO removed this from the Backlog milestone Nov 1, 2023
Copy link
Contributor

github-actions bot commented Jun 2, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Jun 2, 2024
@apmuthu
Copy link
Author

apmuthu commented Jun 2, 2024

The line is now /~https://github.com/ChurchCRM/CRM/blob/master/src/EventNames.php#L49 and the change still holds to be inculcated.

@DawoudIO DawoudIO added bug good first issue Indicates a good issue for first-time contributors and removed Stale labels Jun 2, 2024
@DawoudIO DawoudIO added this to the 5.9.0 milestone Jun 2, 2024
@DawoudIO
Copy link
Contributor

DawoudIO commented Jun 2, 2024

Can you create a quick PR and I'll merge it

@apmuthu
Copy link
Author

apmuthu commented Jun 3, 2024

Line 48 causes an explode to populate the array.
Line 49 just assigns it to a string element.
Hence Line 49 should prepend the new string element instead.

EventNames.zip

--- /blob/master/src/EventNames.php	Mon Jun  3 12:47:50 2024
+++ /blob/master/src/EventNames.php	Mon Jun  3 12:49:11 2024
@@ -46,7 +46,7 @@
             $eRecur = $_POST['newEvtTypeRecur'];
             $eCntLst = $_POST['newEvtTypeCntLst'];
             $eCntArray = array_filter(array_map('trim', explode(',', $eCntLst)));
-            $eCntArray[] = 'Total';
+            array_unshift($eCntArray, 'Total');
             $eCntNum = count($eCntArray);
             $theID = $_POST['theID'];
 

@respencer respencer self-assigned this Jun 3, 2024
respencer added a commit to respencer/ChurchCRM that referenced this issue Jun 3, 2024
respencer added a commit to respencer/ChurchCRM that referenced this issue Jun 5, 2024
respencer added a commit to respencer/ChurchCRM that referenced this issue Jun 10, 2024
respencer added a commit to respencer/ChurchCRM that referenced this issue Jun 11, 2024
respencer added a commit to respencer/ChurchCRM that referenced this issue Jun 12, 2024
DAcodedBEAT added a commit that referenced this issue Jun 12, 2024
# Description & Issue number it closes 
<!-- Please include a summary of the changes and the related issue.
Please also include relevant motivation and context. -->

Resolves #2771

## Screenshots (if appropriate)
<!-- Before and after --> 

None.

## How to test the changes?

Visual inspection.

## Type of change

- [x] 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 not work as expected)
- [ ] This change requires a documentation update

# How Has This Been Tested?

<!-- Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce. Please also list any relevant
details for your test configuration -->

Visual inspection.

# Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Indicates a good issue for first-time contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants