-
-
Notifications
You must be signed in to change notification settings - Fork 814
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
dev/mail#90 - Allow re-use mailing on draft mailings and adhoc mailings #20058
Conversation
Before, re-use was shown only on scheduled/sent and archived mailings pages, now shown on draft/unscheduled as well (i.e. on all mailings pages). Also re-ordered options to put Re-use after Continue.
Can one of the admins verify this patch? |
(Standard links)
|
add to whitelist |
On a functionality level, I think this is a good idea. 👍
|
CRM/Mailing/Selector/Browse.php
Outdated
@@ -264,6 +258,12 @@ public function &getRows($action, $offset, $rowCount, $sort, $output = NULL) { | |||
'qs' => 'mid=%%mid%%&continue=true&reset=1', | |||
'title' => ts('Continue Mailing'), | |||
], | |||
CRM_Core_Action::UPDATE => [ | |||
'name' => ts('Re-Use'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How hard would it be to make this label adapt?
This is maybe a bit nitpicky, but "Re-Use" suggests that the mailing has been "used" before. A draft hasn't been used before.
If it's not too hard, maybe something like this would be more apropos:
'name' => $thisItemIsADraft ? ts('Copy') : ts('Re-Use'),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, I suggested in the issue changing the text to "Copy". My thought is that it would be better to keep the label consistent for all mailings and just change it to "Copy" throughout. Otherwise, users may wonder what the difference is between "Copy" and "Re-use". Copy is also consistent with events, contribution pages, price sets, etc which all use some variation of Copy, Make a Copy, Copy Price Set, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. "Copy" is a small UI change in near term (and we might want to tweak the docs after this PR), but I think you're right - "Copy" is more consistent in the big picture. It also matches the Copy of ...
text.
love this! before you had to sent a mailing in order to reuse it. Nice one :-) |
+1 on this, I often had to use the hidden URLs to do this. Warning to those using multi-lingual and using this process to translate mailings: https://lab.civicrm.org/dev/mail/-/issues/87 |
@totten Yes, good idea to give the user some feedback to indicate this is a copy. I think adding "- Copy" or something like that to the mailing name makes the most sense and is consistent with how this works for events, price sets, contribution pages, etc. |
Good question. It can be tricky to trace the actions for some of these forms. Here's how one can locate this one:
The easiest thing is to probably to keep the call to (NOTE: The |
Thanks @totten, that helped a lot. Now adds "Copy of" to the cloned mailing. What are your thoughts on changing to "Copy" instead of "Re-use" on all mailing pages (see note above)? |
Re-tested and still looks good. If you can update the label to "Copy", that'll be perfect. Flagging "merge ready" (ie it safe to merge now, but we can wait a day or so in case you push the update). |
Changed Re-use to Copy here and added a documentation pull request for the same. |
Test failure is a different contact checksum from a token. |
jenkins, test this please |
@ufundo has helped me figure out that this patch does something else as well: Before, mailings created from searches could not be re-used/copied. Now, they can be copied, the same as any other mailing. |
Yeah, that's a bit curious - why would it block Copy/Re-use of search-based mailings ( I agree with @ufundo @larssandergreen that this seems like an improvement. It is a fairly distinct change, so I've updated the I'm not sure why it was hidden, but - as an exercise in due diligence - I can imagine two plausible reasons. (Neither seems particularly compelling to me right now.) They are:
Aside: When you actually re-use a mailing, you see this "Hidden group NNN", which is mysterious. But you can inspect/drill-down on the full "recipients" list, so I don't think it's a hard block. (Maybe a label like "Adhoc group NNN" would be a little more apropos... but that's getting really outside the scope of the issue.) Anyway, this still looks fine. Merging. |
Great, thanks @totten. Regarding the hidden smart group aside, I actually have an issue open about this. With help from @tschuettler and some testing and digging through the code , it looks like the the hidden group can in fact be smart or not smart, so you could actually make a hidden smart group which would presumably update for the next mailing (but I certainly could be wrong about the next mailing case in particular). |
See also : https://lab.civicrm.org/dev/mail/-/issues/90
Before
After
NOTE: Description updated April 19 to indicate that the PR also affects adhoc mailings.