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

Multiple entries not passed to metadata when using with bureaucracy plugin #729

Open
cjohnsonuk opened this issue Feb 24, 2025 · 0 comments
Labels

Comments

@cjohnsonuk
Copy link

Issue Description

When using a bureaucracy form to populate struct data in a target page the form data isn't put in the struct data fields IF it allow multiple entries.
I've assigned a schema to the namespace where reports are created. The struct schema includes fields for accounts and team that both allow multiple entries.
I've created a bureaucracy form using the following markup

<form>
action template :meetings:reports:i_template "meetings:reports:%Y:%m:Report_for_@@report_records.accounts@@_and_@@report_records.teams@@_@@Title@@_-_@@report_records.reported_date@@" 
struct_field "report_records.reported_date"
static "Which clients were affected?"
struct_field "report_records.accounts"
Static "Which teams were involved?"
struct_field "report_records.teams"
struct_fieldhidden "report_records.status" "=to be reviewed"
Textbox "Title"

submit "Create New Report Page"
</form>

The template contains the following

====== Report : @@Title@@ ======
^Created by  |@NAME@    |
^Created on  |@YEAR@-@MONTH@-@DAY@ at @TIMESEC@  |
^Reported date | {{$report_records.reported_date}} |
^This affects the following accounts |{{$report_records.accounts}}  |
^This involves the following teams  |{{$report_records.teams}}   |
^Current Status  |{{$report_records.status}}   |

When submitting a the bureaucracy form a new report page is created from the template as expected.

The reported date and the status fields appear correctly in the struct data of the page that is created,

but the account and teams data does not make it from the form to the struct data of the page.

I would expect the data to be transferred from the form to the struct data.

Testing I've carried out:
I updated the schema to not allow multiple account and teams and removed the s from the end of the field names.
I updated the form to remove the 's' from the end of the struct fields (so it doesn't allow multiple selects) and created a new test page.
This works. The data is transferred from the form to the struct data in the page

Is there a way to allow a schema with fields set for "multiple input" to be used in a bureaucracy form to put data into a struct table? Multiple data choices can be selected in the form, that part works, and multiple selects in the struct data work once the page is created, i just don't seem to be able to get the multiple selections from the form to the target page's struct data as part of the form submission.

@cjohnsonuk cjohnsonuk added the bug label Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant