Plugin Directory

Changeset 2160765


Ignore:
Timestamp:
09/22/2019 12:23:18 AM (6 years ago)
Author:
Will Brownsberger
Message:

4.5.3.2

Location:
wp-issues-crm
Files:
14 edited
8 copied

Legend:

Unmodified
Added
Removed
  • wp-issues-crm/tags/4.5.3.2/css/activity.css

    r2028788 r2160765  
    8080}
    8181/* activity list on constituent or issue form */
     82.activity_list_last_updated_by,
     83.activity_list_last_updated_time,
     84.activity_list_last_updated_by_show,
    8285.activity_list_activity_type_show.not-really-show,
    8386.activity_list_ID,
  • wp-issues-crm/tags/4.5.3.2/js/activity.js

    r2028788 r2160765  
    357357                var possibleElement = $( "#activity-popup #wic-form-activity #" + possibleID )
    358358                if ( possibleElement.length > 0 ) {
    359                     possibleElement.prop( "disabled", frozenActivity )
    360359                    // use setVal function to handle all fields
    361360                    var specialLabel = '';
     
    366365                    } else if ( 'activity_type' == possibleElement.attr("id") ) {
    367366                        specialLabel = eventTarget.parent().children( ".activity_list_activity_type_show" ).text().trim(',');
     367                    } else if ( 'last_updated_by' == possibleElement.attr("id") ) {
     368                        specialLabel = eventTarget.parent().children( ".activity_list_last_updated_by_show" ).text().trim(',');
    368369                    }
    369370                    wpIssuesCRM.setVal(
  • wp-issues-crm/tags/4.5.3.2/js/selectmenu.js

    r2006855 r2160765  
    517517            }
    518518        }
    519         // set the display value (from existing option if found or from as called newLabel)
    520         $parent.find( ".wic-selectmenu-input-display" ).val(newLabel);     
     519        // set the display value (from existing option if found or from as called newLabel; fill in also for display in readonly
     520        $parent.find( ".wic-selectmenu-input-display, .wic-selectmenu-input-display-readonly" ).val(newLabel);     
    521521    }
    522522
  • wp-issues-crm/tags/4.5.3.2/php/entity/class-wic-entity-activity.php

    r2145245 r2160765  
    4747            // LEFT JOIN to post to cover case where issue deleted 
    4848            $sql = $wpdb->prepare(
    49                     "SELECT SQL_CALC_FOUND_ROWS a.ID, a.constituent_id, a.activity_type, a.activity_date, a.activity_amount, a.issue, a.pro_con, a.activity_note, a.related_inbox_image_record, a.related_outbox_record,
     49                    "SELECT SQL_CALC_FOUND_ROWS a.ID, a.constituent_id, a.activity_type, a.activity_date, a.activity_amount, a.issue, a.pro_con, a.activity_note, a.last_updated_by, a.last_updated_time, a.related_inbox_image_record, a.related_outbox_record,
    5050                        IF( p.ID IS NULL,
    5151                            CONCAT('Hard deleted issue ( ID was ', a.issue,' )' ),
     
    164164        $shortened_note = '';
    165165       
     166        $user = get_user_by ( 'id', $activity->last_updated_by );
     167        $display_name = isset ( $user->display_name ) ? $user->display_name : $user->user_login;
     168
    166169        if ( 'wic_reserved_77777777' == $activity->activity_type ) {
    167170            return '<li>' .
     
    183186                    '<span class="activity_list_issue_show"><a class = "activity_list_issue_show_link" target = "_blank" href = "' . admin_url() . '?page=wp-issues-crm-main&entity=issue&action=id_search&id_requested=' . esc_attr( $activity->issue ). '">' . esc_html( $activity->post_title ) .'</a></span>' .
    184187                    '<span class="activity_list_constituent_id">' . $activity->constituent_id . '</span>' .
     188                    '<span class="activity_list_last_updated_by">' . $activity->last_updated_by . '</span>' .
     189                    '<span class="activity_list_last_updated_by_show">' . $display_name . '</span>' .
     190                    '<span class="activity_list_last_updated_time">' . $activity->last_updated_time . '</span>' .
     191
    185192                    (  $activity->constituent_id  ? ('<span class="activity_list_constituent_show"><a class="activity_list_constituent_show_link" target = "_blank" href = "' . admin_url() . '?page=wp-issues-crm-main&entity=constituent&action=id_search&id_requested=' . $activity->constituent_id . '">' . esc_html(  $name_show ) .'</a></span>' ) : '' ) .
    186193                '</li>';
     
    263270                '<span class="activity_list_pro_con_show">' . ( $activity->pro_con > '' ?  ( ' (' . esc_html ( WIC_Function_Utilities::value_label_lookup ( $activity->pro_con, $pro_con_array ) ) . ') ' ) : '' ) . '</span> ' .
    264271                '<span class="activity_list_activity_note">' . esc_textarea ( $activity->activity_note ) . '</span> ' .
     272                '<span class="activity_list_last_updated_by">' . $activity->last_updated_by . '</span>' .
     273                '<span class="activity_list_last_updated_by_show">' . $display_name . '</span>' .
     274                '<span class="activity_list_last_updated_time">' . $activity->last_updated_time . '</span>' .
    265275                ( $shortened_note > '' ? $show_note : ' ' ) .
    266276            '</li>';
     
    369379                }
    370380            }
     381
     382            // populate the last_updated elements correctly (note that, although present in the array from form, the form values are ignored in the update clase generation because readonly)
     383            $current_user = wp_get_current_user();
     384            $form_data->last_updated_by = $current_user->ID;
     385            $form_data->last_updated_time = current_time( 'mysql' );
    371386   
    372387            // use label for form list title
  • wp-issues-crm/tags/4.5.3.2/php/entity/class-wic-entity-upload-upload.php

    r2023310 r2160765  
    191191                    'pro_con_label' => 'Pro/Con?',
    192192                    'activity_note' => $activity_note,
     193                    'last_updated_by' => $current_user_id,
     194                    'last_updated_time' => current_time ('mysql'),
    193195                    'ID' => $wpdb->insert_id
    194196                )   
  • wp-issues-crm/tags/4.5.3.2/readme.txt

    r2158182 r2160765  
    55Requires at least: 5
    66Tested up to: 5.2.1
    7 Stable tag: 4.5.3.1
     7Stable tag: 4.5.3.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    108108
    109109== Changelog ==
     110= 4.5.3.2 =
     111* Expose last_updated_by, last_updated_time in activity popup
    110112= 4.5.3.1 =
    111113* Sort issues by title in issue lists
  • wp-issues-crm/tags/4.5.3.2/sql/wic_data_dictionary_and_field_groups.sql

    r2152005 r2160765  
    33TRUNCATE TABLE wp_wic_form_field_groups;
    44INSERT INTO wp_wic_data_dictionary (entity_slug, group_slug, field_slug, field_type, field_label, field_order, listing_order, sort_clause_order, required, dedup, readonly, hidden, field_default, transient, wp_query_parameter, placeholder, option_group, list_formatter, reverse_sort, customizable, enabled, uploadable, upload_dedup) VALUES
    5 ('activity', '', 'last_updated_by', 'selectmenu', 'Updated By', 440, 0, 0, '', 0, 1, 0, '', 0, '', '', 'constituent_last_updated_by', '', 0, 0, 1, 0, 0),
    6 ('activity', '', 'last_updated_time', 'date', 'Updated Time', 430, 0, 0, '', 0, 1, 0, '', 0, '', 'Date', '', '', 0, 0, 1, 0, 0),
     5('activity', 'activity', 'last_updated_by', 'selectmenu', 'By', 440, 0, 0, '', 0, 1, 0, '', 0, '', '', 'constituent_last_updated_by', '', 0, 0, 1, 0, 0),
     6('activity', 'activity', 'last_updated_time', 'date', 'Updated', 430, 0, 0, '', 0, 1, 0, '', 0, '', 'Date', '', '', 0, 0, 1, 0, 0),
    77('activity', '', 'upload_id', 'selectmenu', 'Upload File', 450, 0, 0, '', 0, 0, 0, '', 0, '', '', 'upload_id', '', 0, 0, 1, 0, 0),
    88('activity', 'activity', 'activity_amount', 'text', 'Amount', 35, 30, 0, '', 0, 0, 0, '', 0, '', 'Amount', '', '', 0, 0, 1, 1002, 0),
  • wp-issues-crm/tags/4.5.3.2/wp-issues-crm.php

    r2158182 r2160765  
    44 * Plugin URI: http://wp-issues-crm.com
    55 * Description: Constituent Relationship Management for organizations that respond to constituents.  Organizes constituent contacts ( calls, etc. ) around Wordpress posts and categories.
    6  * Version: 4.5.3.1
     6 * Version: 4.5.3.2
    77 * Author: Will Brownsberger
    88 * Author URI: http://willbrownsberger.com
     
    3939// set database version global;
    4040global $wp_issues_crm_db_version;
    41 $wp_issues_crm_db_version = '4.5.3';
     41$wp_issues_crm_db_version = '4.5.3.2';
    4242/*
    4343* set js_css version global -- three possibilities:
     
    4848*/
    4949global $wp_issues_crm_js_css_version;
    50 $wp_issues_crm_js_css_version = '4.5.3'; // may or not be set at release time
     50$wp_issues_crm_js_css_version = '4.5.3.2'; // may or not be set at release time
    5151if ( '' == $wp_issues_crm_js_css_version ) {
    5252    if ( strpos ( site_url(), 'localhost' ) > 0 ) {
  • wp-issues-crm/trunk/css/activity.css

    r2028788 r2160765  
    8080}
    8181/* activity list on constituent or issue form */
     82.activity_list_last_updated_by,
     83.activity_list_last_updated_time,
     84.activity_list_last_updated_by_show,
    8285.activity_list_activity_type_show.not-really-show,
    8386.activity_list_ID,
  • wp-issues-crm/trunk/js/activity.js

    r2028788 r2160765  
    357357                var possibleElement = $( "#activity-popup #wic-form-activity #" + possibleID )
    358358                if ( possibleElement.length > 0 ) {
    359                     possibleElement.prop( "disabled", frozenActivity )
    360359                    // use setVal function to handle all fields
    361360                    var specialLabel = '';
     
    366365                    } else if ( 'activity_type' == possibleElement.attr("id") ) {
    367366                        specialLabel = eventTarget.parent().children( ".activity_list_activity_type_show" ).text().trim(',');
     367                    } else if ( 'last_updated_by' == possibleElement.attr("id") ) {
     368                        specialLabel = eventTarget.parent().children( ".activity_list_last_updated_by_show" ).text().trim(',');
    368369                    }
    369370                    wpIssuesCRM.setVal(
  • wp-issues-crm/trunk/js/selectmenu.js

    r2006855 r2160765  
    517517            }
    518518        }
    519         // set the display value (from existing option if found or from as called newLabel)
    520         $parent.find( ".wic-selectmenu-input-display" ).val(newLabel);     
     519        // set the display value (from existing option if found or from as called newLabel; fill in also for display in readonly
     520        $parent.find( ".wic-selectmenu-input-display, .wic-selectmenu-input-display-readonly" ).val(newLabel);     
    521521    }
    522522
  • wp-issues-crm/trunk/php/entity/class-wic-entity-activity.php

    r2145245 r2160765  
    4747            // LEFT JOIN to post to cover case where issue deleted 
    4848            $sql = $wpdb->prepare(
    49                     "SELECT SQL_CALC_FOUND_ROWS a.ID, a.constituent_id, a.activity_type, a.activity_date, a.activity_amount, a.issue, a.pro_con, a.activity_note, a.related_inbox_image_record, a.related_outbox_record,
     49                    "SELECT SQL_CALC_FOUND_ROWS a.ID, a.constituent_id, a.activity_type, a.activity_date, a.activity_amount, a.issue, a.pro_con, a.activity_note, a.last_updated_by, a.last_updated_time, a.related_inbox_image_record, a.related_outbox_record,
    5050                        IF( p.ID IS NULL,
    5151                            CONCAT('Hard deleted issue ( ID was ', a.issue,' )' ),
     
    164164        $shortened_note = '';
    165165       
     166        $user = get_user_by ( 'id', $activity->last_updated_by );
     167        $display_name = isset ( $user->display_name ) ? $user->display_name : $user->user_login;
     168
    166169        if ( 'wic_reserved_77777777' == $activity->activity_type ) {
    167170            return '<li>' .
     
    183186                    '<span class="activity_list_issue_show"><a class = "activity_list_issue_show_link" target = "_blank" href = "' . admin_url() . '?page=wp-issues-crm-main&entity=issue&action=id_search&id_requested=' . esc_attr( $activity->issue ). '">' . esc_html( $activity->post_title ) .'</a></span>' .
    184187                    '<span class="activity_list_constituent_id">' . $activity->constituent_id . '</span>' .
     188                    '<span class="activity_list_last_updated_by">' . $activity->last_updated_by . '</span>' .
     189                    '<span class="activity_list_last_updated_by_show">' . $display_name . '</span>' .
     190                    '<span class="activity_list_last_updated_time">' . $activity->last_updated_time . '</span>' .
     191
    185192                    (  $activity->constituent_id  ? ('<span class="activity_list_constituent_show"><a class="activity_list_constituent_show_link" target = "_blank" href = "' . admin_url() . '?page=wp-issues-crm-main&entity=constituent&action=id_search&id_requested=' . $activity->constituent_id . '">' . esc_html(  $name_show ) .'</a></span>' ) : '' ) .
    186193                '</li>';
     
    263270                '<span class="activity_list_pro_con_show">' . ( $activity->pro_con > '' ?  ( ' (' . esc_html ( WIC_Function_Utilities::value_label_lookup ( $activity->pro_con, $pro_con_array ) ) . ') ' ) : '' ) . '</span> ' .
    264271                '<span class="activity_list_activity_note">' . esc_textarea ( $activity->activity_note ) . '</span> ' .
     272                '<span class="activity_list_last_updated_by">' . $activity->last_updated_by . '</span>' .
     273                '<span class="activity_list_last_updated_by_show">' . $display_name . '</span>' .
     274                '<span class="activity_list_last_updated_time">' . $activity->last_updated_time . '</span>' .
    265275                ( $shortened_note > '' ? $show_note : ' ' ) .
    266276            '</li>';
     
    369379                }
    370380            }
     381
     382            // populate the last_updated elements correctly (note that, although present in the array from form, the form values are ignored in the update clase generation because readonly)
     383            $current_user = wp_get_current_user();
     384            $form_data->last_updated_by = $current_user->ID;
     385            $form_data->last_updated_time = current_time( 'mysql' );
    371386   
    372387            // use label for form list title
  • wp-issues-crm/trunk/php/entity/class-wic-entity-upload-upload.php

    r2023310 r2160765  
    191191                    'pro_con_label' => 'Pro/Con?',
    192192                    'activity_note' => $activity_note,
     193                    'last_updated_by' => $current_user_id,
     194                    'last_updated_time' => current_time ('mysql'),
    193195                    'ID' => $wpdb->insert_id
    194196                )   
  • wp-issues-crm/trunk/readme.txt

    r2158182 r2160765  
    55Requires at least: 5
    66Tested up to: 5.2.1
    7 Stable tag: 4.5.3.1
     7Stable tag: 4.5.3.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    108108
    109109== Changelog ==
     110= 4.5.3.2 =
     111* Expose last_updated_by, last_updated_time in activity popup
    110112= 4.5.3.1 =
    111113* Sort issues by title in issue lists
  • wp-issues-crm/trunk/sql/wic_data_dictionary_and_field_groups.sql

    r2152005 r2160765  
    33TRUNCATE TABLE wp_wic_form_field_groups;
    44INSERT INTO wp_wic_data_dictionary (entity_slug, group_slug, field_slug, field_type, field_label, field_order, listing_order, sort_clause_order, required, dedup, readonly, hidden, field_default, transient, wp_query_parameter, placeholder, option_group, list_formatter, reverse_sort, customizable, enabled, uploadable, upload_dedup) VALUES
    5 ('activity', '', 'last_updated_by', 'selectmenu', 'Updated By', 440, 0, 0, '', 0, 1, 0, '', 0, '', '', 'constituent_last_updated_by', '', 0, 0, 1, 0, 0),
    6 ('activity', '', 'last_updated_time', 'date', 'Updated Time', 430, 0, 0, '', 0, 1, 0, '', 0, '', 'Date', '', '', 0, 0, 1, 0, 0),
     5('activity', 'activity', 'last_updated_by', 'selectmenu', 'By', 440, 0, 0, '', 0, 1, 0, '', 0, '', '', 'constituent_last_updated_by', '', 0, 0, 1, 0, 0),
     6('activity', 'activity', 'last_updated_time', 'date', 'Updated', 430, 0, 0, '', 0, 1, 0, '', 0, '', 'Date', '', '', 0, 0, 1, 0, 0),
    77('activity', '', 'upload_id', 'selectmenu', 'Upload File', 450, 0, 0, '', 0, 0, 0, '', 0, '', '', 'upload_id', '', 0, 0, 1, 0, 0),
    88('activity', 'activity', 'activity_amount', 'text', 'Amount', 35, 30, 0, '', 0, 0, 0, '', 0, '', 'Amount', '', '', 0, 0, 1, 1002, 0),
  • wp-issues-crm/trunk/wp-issues-crm.php

    r2158182 r2160765  
    44 * Plugin URI: http://wp-issues-crm.com
    55 * Description: Constituent Relationship Management for organizations that respond to constituents.  Organizes constituent contacts ( calls, etc. ) around Wordpress posts and categories.
    6  * Version: 4.5.3.1
     6 * Version: 4.5.3.2
    77 * Author: Will Brownsberger
    88 * Author URI: http://willbrownsberger.com
     
    3939// set database version global;
    4040global $wp_issues_crm_db_version;
    41 $wp_issues_crm_db_version = '4.5.3';
     41$wp_issues_crm_db_version = '4.5.3.2';
    4242/*
    4343* set js_css version global -- three possibilities:
     
    4848*/
    4949global $wp_issues_crm_js_css_version;
    50 $wp_issues_crm_js_css_version = '4.5.3'; // may or not be set at release time
     50$wp_issues_crm_js_css_version = '4.5.3.2'; // may or not be set at release time
    5151if ( '' == $wp_issues_crm_js_css_version ) {
    5252    if ( strpos ( site_url(), 'localhost' ) > 0 ) {
Note: See TracChangeset for help on using the changeset viewer.