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

Remove stray token code #21763

Merged
merged 1 commit into from
Oct 8, 2021
Merged

Remove stray token code #21763

merged 1 commit into from
Oct 8, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Remove stray token code

Before

Code in the Activity_Tokens class and the associated trait to support a feature that I believe was not adopted for core

After

poof

Technical Details

@mattwire @aydun @demeritcowboy @totten
The removed code is, from my recollection, intended to add support for a syntax for multiple activity contacts that we did not, in the end, agree to merge to core (leaving the question of how to support that still unsolved and out of scope for this PR).

So from what I can tell we should be able to remove it & simplify the code base at this point. Is there any reason not to?

Comments

@civibot
Copy link

civibot bot commented Oct 7, 2021

(Standard links)

@civibot civibot bot added the master label Oct 7, 2021
@eileenmcnaughton
Copy link
Contributor Author

Note tests are failing - but that doesn;t change the question - since if we don't need these lines we can remove them & fix the tests pretty easily

@colemanw
Copy link
Member

colemanw commented Oct 7, 2021

@eileenmcnaughton +1 from me - I think it's better not to keep code lying around that isn't being used for anything. Can you update the test?

@demeritcowboy
Copy link
Contributor

I think this part never made it in, and so there is no such token in the dropdown. I don't know if manually inserting such a token is being used anywhere, but since there's a test that covers it it suggests it was intended for core. What was still open was a more thorough treatment of multiple values.

Me personally I'm not using the token anywhere. @aydun ?

@mattwire
Copy link
Contributor

mattwire commented Oct 7, 2021

Right, it was intended that it would go into core, just it ran out of steam and we weren't certain if the _N_ was the right approach. This is the branch containing the patch that I maintain on all my client sites: mattwire@4bbaf83

Agree that the code doesn't need to be in core unless we merge the rest - but we should also remove the test in that case. It would also be really good to decide whether we actually should have this functionality in the core tokens - it's certainly really useful for a number of sites I maintain that use activities/cases to manage patient/counsellor relationships and send lots of emails with details including assignees/targets etc.

@eileenmcnaughton
Copy link
Contributor Author

Ok - based on the above I'm gonna remove it & the test. I note there is also an extension that is pretty good on this that @demeritcowboy pointed other people to - I don't know if that's the right approach.

@demeritcowboy
Copy link
Contributor

By extension do you mean @mattwire's branch?

FYI the test that covers it linked above is not the same test that failed here. I'm not sure what the fail here is about since it's not related.

@eileenmcnaughton
Copy link
Contributor Author

I've updated the PR to remove the code that was supporting those few lines

@aydun
Copy link
Contributor

aydun commented Oct 7, 2021

I'm not currently using those _N_ tokens but I do think the functionality is useful even though we may want a different representation now that token syntax has evolved a bit.

It was originally for someone else's client but between us we've lost track of who it was for :-(

@eileenmcnaughton
Copy link
Contributor Author

@aydun yeah - I think there is still consensus that it would be useful to have 'something' that does that

@eileenmcnaughton
Copy link
Contributor Author

this is passing now - we built on the original tests @aydun added so cover is solid

@demeritcowboy
Copy link
Contributor

A quick r-run seems ok for me. Putting merge-ready.

@demeritcowboy demeritcowboy added the merge ready PR will be merged after a few days if there are no objections label Oct 8, 2021
@totten totten merged commit e0f420c into civicrm:master Oct 8, 2021
@eileenmcnaughton eileenmcnaughton deleted the trait branch October 8, 2021 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
master merge ready PR will be merged after a few days if there are no objections
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants