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

[REF] Add in frontend fields for title and description of group Schem… #18599

Merged
merged 1 commit into from
Sep 30, 2020

Conversation

seamuslee001
Copy link
Contributor

…a only change

Overview

This makes schema only changes to add in 2 new fields frontend_title and frontend_description. The end purpose would be to hopefully eventually use these fields on the public signup forms and unsubscribe forms but for the moment just making the schema level changes

Before

Only one set of fields for title and description

After

a public title and public description separate from internal

ping @eileenmcnaughton

@civibot
Copy link

civibot bot commented Sep 25, 2020

(Standard links)

@civibot civibot bot added the master label Sep 25, 2020
@eileenmcnaughton
Copy link
Contributor

So this takes the existing precedent a little further - ie uf_group has frontend_title but not frontend_description - but I don't see a specific issue with this extra wriggle down the slippery slope. Likewise the precedent in uf_group is that title is 64 chars not 255 but I guess that's a half-wriggle.

I will include in the dev-digest but I doubt there will be push back. I have not tested the upgrade

@seamuslee001
Copy link
Contributor Author

The upgrade test should be covered enough by our upgrade tests (covers multilingual and not)

'title' => "varchar(64) COMMENT 'Name of Group.'",
'title' => "varchar(255) COMMENT 'Name of Group.'",
'frontend_title' => "varchar(255) DEFAULT NULL COMMENT 'Alternate Public title for this Group.'",
'frontend_description' => "text DEFAULT NULL COMMENT 'Optional verbose public description of the group.'",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest to standardise the language here. Are they both optional - then say so? What does Alternate mean? I think it should be Alternative; Alternate is a verb suggesting alternating between one and another, but we're meaning an alternative; use in preference to; override, I think. And I think the override is optional.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes they are both optional, maybe instead of optional should be Alternative Public ... ? would that work for you @artfulrobot ?

Copy link
Contributor

Choose a reason for hiding this comment

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

yep 👍

@@ -32,7 +32,7 @@
<name>title</name>
<type>varchar</type>
<title>Group Title</title>
<length>64</length>
<length>255</length>
Copy link
Contributor

Choose a reason for hiding this comment

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

(I'm really glad to see this here!)

Shouldn't the title be NOT NULL as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@artfulrobot good point probably just set it to be required

@artfulrobot
Copy link
Contributor

Thanks @seamuslee001 I think this is a really valuable new feature and looks sensible to me.

We should ping the GDPR extension people on this as they implement their own version and might like to deprecate that feature in favour of this. I'll do that on chat.

@seamuslee001
Copy link
Contributor Author

@artfulrobot yeh so to be clear all this will do is add the columns, A separate PR or PRs would be required to start implementing these fields appropriately but yeh

@artfulrobot
Copy link
Contributor

Yep,got that, but I like the direction.

@eileenmcnaughton
Copy link
Contributor

@seamuslee001 we didn't get any other response from including this in the dev digest so go ahead & merge once @artfulrobot is happy with this

@seamuslee001
Copy link
Contributor Author

@artfulrobot have updated the language can you check your good with that now?

@seamuslee001 seamuslee001 force-pushed the frontend_group_fields branch 2 times, most recently from 3afa67d to ee4aa29 Compare September 30, 2020 00:34
@seamuslee001
Copy link
Contributor Author

Jenkins re test this please

@artfulrobot
Copy link
Contributor

@seamuslee001 Thank you, I think that's much clearer now.

…a only change

Add in upgrade step to expand title column to be 255 as well

Update langauge as per Artfulrobot and require group title field
@seamuslee001 seamuslee001 merged commit 50a7682 into civicrm:master Sep 30, 2020
@seamuslee001 seamuslee001 deleted the frontend_group_fields branch September 30, 2020 20:32
@MegaphoneJon
Copy link
Contributor

git bisect is faulting this commit for the regression in core#2004. It's a bit mystifying since this looks pretty harmless, but I'll try to work up a test for this. I suspect this is also connected to core#2105 and core#2136 but I'll wait until I have some evidence of that to follow up on those.

@MegaphoneJon
Copy link
Contributor

Hmm - I think this may be mistaken, and just coming up against a db schema issue. I'll have to dig a bit deeper to find the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants