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

Document merge for rosters #865

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

Conversation

tim-pearce
Copy link
Contributor

all_document_merge_rosters.class.php
Create temporary document name
Allow for 'Dump' option
roster_view.class.php
Pass more data, especially in relation to the services views/view_7_rosters__1_display_roster_assignments.class.php Add in the dialog like the other two

all_document_merge_rosters.class.php
Create temporary document name
Allow for 'Dump' option
roster_view.class.php
Pass more data, especially in relation to the services
views/view_7_rosters__1_display_roster_assignments.class.php
Add in the dialog like the other two
@tbar0970
Copy link
Owner

tbar0970 commented Feb 9, 2023

I'm confused about what this actually does.
Can you post an example of what you produce using this process?
It's completely distinct from the generic person-document-merge process, right?

@tbar0970
Copy link
Owner

tbar0970 commented Feb 9, 2023

(I've seen the sign-in-sheet template, but I'm confused as to how it relates to a multi-column roster)

@tim-pearce
Copy link
Contributor Author

I replied from the email with attachments? Got to go to a meeting now.

@tbar0970
Copy link
Owner

tbar0970 commented Feb 9, 2023

Email attachments might not make it through to github. Might need to try uploading direct in the web UI.

@tim-pearce
Copy link
Contributor Author

For youth ministries, sign-in/out is a requirement for 'child safe' so I produce a sheet with the names of everyone rostered on that day to sign.
The other thing is a printed roster to put on the notice board or for people to take.
(All names removed except mine for privacy).
roster.ods
Sign_in_out_sheet.ods

@tim-pearce
Copy link
Contributor Author

My comments are not coming through email. Maybe it's because I send using a different email address!
Replied 9/2/23
It's all the people rostered on on that date (or dates).

@@ -422,8 +422,8 @@ public function printCSV($start_date=NULL, $end_date=NULL, $return=FALSE)

$to_print = Array();
foreach ($services as $id => $service_details) {
$to_print[$service_details['date']]['service'][$service_details['congregationid']] = $service_details;
Copy link
Owner

Choose a reason for hiding this comment

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

There's a problem here. A roster view may include details of several services on the same date (for different congregations). The array needs to be indexed by congregationid or they will overwrite each other.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Trying to wrap my head around this.
I've experimented with this on my system and it works with two congregations with services on the same days.
I think it works because getCongregations looks at the members and all the members in the service belong to the same congregation..

Copy link
Owner

Choose a reason for hiding this comment

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

Ah yes, I think I misread this line - sorry. It's already indexed by congregationid.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've changed the order of the indexing and made service details available from all included congregations now.
The code in this PR was pretty stale so I have created a replacement PR #932 after rebasing my fork against your latest version.

@@ -460,6 +460,34 @@ public function printCSV($start_date=NULL, $end_date=NULL, $return=FALSE)

foreach ($to_print as $date => $ddetail) {
Copy link
Owner

Choose a reason for hiding this comment

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

likewise here, it's assuming that there is one service per date, but that's not the case

@tim-pearce
Copy link
Contributor Author

I haven't really been using congregations except to separate out rosters for week day ministries, so not surprising I missed that.
Will revisit that code and keep that in mind for other code.

@tim-pearce
Copy link
Contributor Author

The purpose of getting the service details is as a nice to have feature to allow service details to be shown on the roster.
I think maybe it should stay as is.

tim-pearce added a commit to tim-pearce/jethro-pmm that referenced this pull request Aug 8, 2023
Replaces PR tbar0970#865
Now copes with multiple congregations
I had to strip out the SizeDetector test on my system as it caused the option to be omitted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants