-
Notifications
You must be signed in to change notification settings - Fork 62
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
Added custom Comments action to workflows #2517
Conversation
As context for other reviewers, I requested @jlamanskygitt to create a workflow action that would add a comment to a post. The next feature of this will include putting tokens for users in the comment based on a field on the record. This would allow triggering a custom notification to a user based on a change on the record. |
@jlamanskygitt This is looking good and does add a comment as it should. Nicely done. One thing we need to do is make sure it doesn't add the same comment over and over again. There is a function in What I did to test this was to create a custom multi_select field on contacts with two possible values: Option 1 and Option 2. I created a workflow that said if Option 1 was selected, add a comment. So when I selected Option 1, it added a comment as it should. Then, when I also selected Option 2 (so that both were selected), it added the comment again. I then unchecked Option 1, and no new comment was added (as expected). Once I selected Option 1 again, the comment was added a third time. If we follow this same procedure, I would expect that the comment would only be added once (when Option 1 was first selected). |
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.
This works as I would expect it. After cleaning up some of these code comments, I think it's ready for review by @corsacca
Awesome! |
@jlamanskygitt, @cairocoder01 |
@corsacca No, there isn't supposed to be a condition. It's just used in the actions, though I know it ends up appearing in the conditions too. Do you think it should be removed from there? |
@cairocoder01 we could hide it from step 2, |
@corsacca I'm not keen on adding a "contains" condition at this point. I would actually just think that we should exclude any field from the conditions list if it doesn't actually have any condition options for the second field. |
Yeah. That sounds good. |
Thanks @jlamanskygitt! |
…#2558) * moves component services to header * SSO: uncomment recaptcha check, save SSO methods used in user meta(#2518) * chore: uncomment recaptcha check in backend * feat: save a list of sign in providers * Add color variables to css (#2516) * add color variables to css This allows their easy re-use within plugins * update from style guide * rebuild styles * Fix errors saving dropdown option translations (#2513) * fix parsing of option translation locale * don't reset option label upon saving translation * Fix translations on field option labels from being overwritten. Fix saving custom label over default translated label. * phpcs --------- Co-authored-by: corsac <[email protected]> * Translated using Weblate (Croatian) (#2520) Currently translated at 99.8% (1206 of 1208 strings) Translated using Weblate (Swahili) Currently translated at 100.0% (1208 of 1208 strings) Translated using Weblate (Swahili) Currently translated at 83.5% (1009 of 1208 strings) Translated using Weblate (French (fr_FR)) Currently translated at 85.5% (1034 of 1208 strings) Translated using Weblate (Italian (it_IT)) Currently translated at 100.0% (1208 of 1208 strings) Translated using Weblate (Croatian) Currently translated at 99.9% (1207 of 1208 strings) Translated using Weblate (Bosnian (bs_BA)) Currently translated at 100.0% (1208 of 1208 strings) Translated using Weblate (Bosnian (bs_BA)) Currently translated at 99.9% (1207 of 1208 strings) Translated using Weblate (Bosnian (bs_BA)) Currently translated at 99.9% (1207 of 1208 strings) Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/ Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/bs_BA/ Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/fr_FR/ Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/hr/ Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/it_IT/ Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/sw/ Translation: Disciple.Tools/Disciple Tools Theme Co-authored-by: Weblate <[email protected]> Co-authored-by: Dragana <[email protected]> Co-authored-by: Kyle Koval <[email protected]> Co-authored-by: Leila Mohamed <[email protected]> Co-authored-by: Paul Bruss <[email protected]> Co-authored-by: Zlatko Celik <[email protected]> * Disciple.Tools v1.64 * User Profile: Ensure user display name is maintained (#2521) * D.T Reports: add list function to dt-reports class (#2484) * feat: add where function to dt-reports class * feat: return error if wrong value type is given * feat: move value of where clause into array; refactor: where name to list putting the value in an array will mean we can add operators and other upgrades to how the where works later * Workflows: Ensure connection fields trigger associated workflow execution (#2522) * Settings D.T: limit number for users listed in base user select * Workflows: Added custom Comments action (#2517) * Added custom Comments action to workflows * Prevents comments from being added multiple times * Resolved comments * code styles fixes * Removed comments from step 2 * Ran prettier * Metrics - Personal - Gen-Map - Restrict To Records Responsible For (#2504) * Ensure to only restrict to records user is responsible for * Filter accordingly by slug & post type * Simplified query results generation logic * Removed unwanted write log statement * Ensure record node shares are forced for administrators * Access to view all records can view entire tree. Multipliers can see the name of their own record. * #2496 - Select & Tags Cumulative Activity Metrics Charts (#2514) * Select & tags cumulative activity metrics charts * UI tweaks & end of time range cumulative total matches * Improved modal count mismatches * Added pm.meta_value group by to updated month sql * wording * Cleaned up stale code blocks * Cleaned up straggling stale code blocks * Check for create_users permission when displaying Add User submenu (#2530) * Translated using Weblate (Swahili) (#2531) Currently translated at 100.0% (1208 of 1208 strings) Translated using Weblate (Italian (it_IT)) Currently translated at 100.0% (1208 of 1208 strings) Translated using Weblate (Bosnian (bs_BA)) Currently translated at 100.0% (1208 of 1208 strings) Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/ Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/bs_BA/ Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/it_IT/ Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/sw/ Translation: Disciple.Tools/Disciple Tools Theme Co-authored-by: Weblate <[email protected]> Co-authored-by: Dragana <[email protected]> Co-authored-by: Kyle Koval <[email protected]> Co-authored-by: Leila Mohamed <[email protected]> * Disciple.Tools v1.65.0 * Fix personal genmap access to records * Custom password reset flow: Clear user cache when saving the reset key * Fix email headers and login template errors (#2534) * fix: add content-type: text/html correctly if headers is a string fix: deal with being a string when checking for content-type: text/html * fix: Undefined array key 0 in login-user-manager * phpcs * Metrics: Collapse field selects down to a single row (#2533) * SOO Login: fix issue where email wasn't being captured * Metrics - Genmapper - Show Data Layers (#2515) * Introduced data layer field filters for generational tree metrics * Addressed sql placeholders code smells * Ignore string array escaping * Revised ui and data layer flow logic * Introduced displaying of field icons * Added switch to toggle between labels and icons * wording * Enforce data layer display ordering * Hide data layer settings by default + Also display status field label * Plus icon count for each field line + White icons with fixed size * Ensure mdi font icons default to white * SSO Login: setting to persist login (#2537) * SOO Login: setting to persist login * phpcs * phpcs * Metrics > Genmapper: fix icon sizing and alignment (#2539) * Template integration in dt-modal of duplicate detected button * Customizations: Fix tile label translations and clearing field translations (#2550) * Customizations: Fix tile label translations and clearing field translations * revert phpcs * #1873 - Default Reply To On Email Notifications (#2545) * Default reply-to on email notifications * Wording and order * Don't overwrite existing reply to values * Change default email name and address * revert phpcs --------- Co-authored-by: corsac <[email protected]> * Admin Actions integration on edit page. * Workflow action: Comment replace user or connection tokens with values (#2541) * Comments {subassigned} functionality * removed hardcoded {connections} * PR cleanup/optimizations * Copied Jon's Fixes * Customizations: Resolved missing permissions on role updates bug (#2552) * SSO Login: allow logging in with firebase ID when email is not provided. (#2536) * SOO Login: allow logging in with firebase ID when email is not provided. * phpcs * fix typo * #2523 - Ensure Geocoded Locations Are Copied When Transferring Contact To Another Instance (#2525) * Ensure geocoded locations are copied when transferring contact to another instance * Transfer additional geolocation grid meta info * Transfer actual grid meta to be used + Avoid duplicate location_grid values * Add by pre-defined meta grid values * Reverted posts.php auto formatting * Reverted contacts-transfer.php auto formatting * Undefined error fix * revert structure change * allow dup locations * Translated using Weblate (Italian (it_IT)) (#2556) Currently translated at 100.0% (1209 of 1209 strings) Translated using Weblate (Arabic) Currently translated at 83.3% (1008 of 1209 strings) Translated using Weblate (Vietnamese) Currently translated at 100.0% (1209 of 1209 strings) Translated using Weblate (Vietnamese) Currently translated at 85.7% (1037 of 1209 strings) Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translated using Weblate (French (fr_FR)) Currently translated at 85.6% (1035 of 1208 strings) Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/ Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/ar/ Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/fr_FR/ Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/it_IT/ Translate-URL: https://translate.disciple.tools/projects/disciple-tools/disciple-tools-theme/vi/ Translation: Disciple.Tools/Disciple Tools Theme Co-authored-by: Weblate <[email protected]> Co-authored-by: Charlie Ritchie <[email protected]> Co-authored-by: Corsacca <[email protected]> Co-authored-by: FarahDoumani <[email protected]> Co-authored-by: Kyle Koval <[email protected]> * Disciple.Tools v1.66 * removed unwanted code and added comments * corrected heading and styling duplicate detected * Metrics - Personal Layers Map (#2542) * Support record maps within personal metrics * Embedded filter by post id sql + Split local storage cookie across menu slugs * Updated sql to ensure only shared records are returned * Resolved auto formatting issue * Additional tidy-ups * Simplified sql * Ensure metrics is only shown for specific user roles * Personal for all. Dynamics by permissions * Prevent non-slug related requests * Moved permissions check to endpoint * Revised permission checks + Updated genmap to follow new checks * Lists: Split By - Option To Clear Filters (#2544) * Display current filter labels * Deleted console logs * Ignore sorting labels * Support multiple split-by filters with dynamic count refreshes * Avoid auto filter refreshes on split by option selections * Enforce overwriting of previously selected field options * PHPCS - Upgrade WP-Coding Standards To v3 (#2546) * Updated to v3.1.0 * Introduced additional rules to reduce error counts * Further reduced sniff exceptions * Resolved remaining exceptions * Revert "Resolved remaining exceptions" This reverts commit f5103bb. * fix MultiLineFunctionDeclaration errors * remove some rules * remove commented excludes * enable Generic.WhiteSpace.IncrementDecrementSpacing * enable Universal.Arrays.DuplicateArrayKey * enable Universal.WhiteSpace.CommaSpacing * enable NormalizedArrays.Arrays.ArrayBraceSpacing * enable PSR2.Classes.ClassDeclaration * enable PSR2.Files.EndFileNewline * enable Generic.CodeAnalysis.RequireExplicitBooleanOperatorPrecedence * enable PSR2.Methods.FunctionClosingBrace * enable WordPress.DB.PreparedSQL * enable WordPress.Security.NonceVerification --------- Co-authored-by: corsac <[email protected]> * Only set D.T base email name and email address if none other is set (#2562) * feat: add a hook when deleting a post (#2568) * feat: add before post deleted hook (#2569) * phpcbf * fixes camel case error * phpcs fix * phpcs fixes for proper snake case * prettier styling fixes * gulp build files --------- Co-authored-by: Micah Mills <[email protected]> Co-authored-by: squigglybob <[email protected]> Co-authored-by: cairocoder01 <[email protected]> Co-authored-by: corsac <[email protected]> Co-authored-by: discipletoolsbot <[email protected]> Co-authored-by: Weblate <[email protected]> Co-authored-by: Dragana <[email protected]> Co-authored-by: Kyle Koval <[email protected]> Co-authored-by: Leila Mohamed <[email protected]> Co-authored-by: Paul Bruss <[email protected]> Co-authored-by: Zlatko Celik <[email protected]> Co-authored-by: kodinkat <[email protected]> Co-authored-by: jlamanskygitt <[email protected]> Co-authored-by: brady-lamansky-gtt <[email protected]> Co-authored-by: Charlie Ritchie <[email protected]> Co-authored-by: FarahDoumani <[email protected]>
No description provided.