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

Custom fields are not displayed on the configuration page #50

Open
twinkelicious opened this issue May 12, 2021 · 4 comments
Open

Custom fields are not displayed on the configuration page #50

twinkelicious opened this issue May 12, 2021 · 4 comments
Labels
Milestone

Comments

@twinkelicious
Copy link

I had some struggle to configure the Membership Nr. integration of this Extension.

I wasn't able to select any custom fields in the drop down menu for membership_number_field on the configuration page civicrm/admin/setting/membership - different settings of the custom fields or their groups doesn't had any effect on this.

While troubleshooting, i noticed that the selection for this menu ist restricted in line 329 of the MembershipExtension.php (org.project60.membership/CRM/Admin/Form/Setting) by 'is_view' => 0,. But in my MySQL database the value for "is_view" was set as NULL instead of 0. Only after I manually set the value for my desired field in the database to 0 it was displayed on the configuration page.

CiviCRM Verion 5.36.1
WordPress Version 5.7.1
Project60 Membership Extension Version 0.6.2
MySQL-Version 5.7

@bjendres
Copy link
Member

Thanks for reporting @twinkelicious. The line you're referring to is HERE - just so people in the future will know what we're talking about.

That's very interesting: this seems to be a mistake. The documentation asks for a read-only field, so it should ask for

'is_view' => 1

to start with. Could you change that in your setup and see whether that works for you with read-only fields? Or do you have any objections?

@bjendres bjendres added the bug label May 13, 2021
@bjendres bjendres added this to the 0.7 milestone May 13, 2021
@twinkelicious
Copy link
Author

That's very interesting: this seems to be a mistake. The documentation asks for a read-only field, so it should ask for

'is_view' => 1

Oh yeah. I didn't notice this mistake before.

After changing this line in my MembershipExtension.php, I can actually select the appropriate fields if they are configured as read-only.

But in my opinion I don't see any need to limit the user in the field selection here. Perhaps some users would like to have the option of having a changeable field here.
At least the German-language help-popup for this field selection does not say that the field has to be read-only.

@mmgit
Copy link

mmgit commented Jun 10, 2021

I see the same problem for the 'annual_amount_field' see here. I think it should be
'is_view' => $read_only ? '1' : NULL,

@bjendres
Copy link
Member

bjendres commented Jul 7, 2021

I agree, there is a couple of (logical?) flaws in this pre-selection. Some of it was on purpose and needs to be documented (e.g. in a help bubble), some are just wrong. I won't be able to adjust this any time soon, as I'm going on holiday soon, but PRs are very welcome.

wintermoor added a commit to wintermoor/org.project60.membership that referenced this issue Feb 23, 2022
wintermoor added a commit to wintermoor/org.project60.membership that referenced this issue Feb 24, 2022
@bjendres bjendres modified the milestones: 0.7, 1.0 Aug 23, 2023
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

3 participants