Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.12.0-b1
    • Component/s: None
    • Labels:
      None

      Description

      message_groups

      • id int(10) unsigned NOT NULL AUTO_INCREMENT,
      • action varchar(64) NOT NULL,
      • type ENUM('client', 'staff', 'shared') DEFAULT 'client',
      • plugin_dir varchar(64) NOT NULL
      • PRIMARY KEY (`id`),
      • INDEX `type` (`type`)

      messages

      • id int(10) unsigned NOT NULL AUTO_INCREMENT,
      • message_group_id int(10) unsigned NOT NULL,
      • company_id int(10) unsigned NOT NULL,
      • text mediumtext COLLATE utf8_unicode_ci
      • PRIMARY KEY (`id`),
      • INDEX `message_group_id` (`message_group_id`)

      message_content

      • message_id int(10) unsigned NOT NULL,
      • type ENUM('sms') DEFAULT 'sms',
      • content mediumtext COLLATE utf8_unicode_ci
      • PRIMARY KEY (`message_id`, `type`)

      Add a Messages model

      • add
      • edit
      • delete
      • get
      • getAll
      • getByDir
      • getTypes

      Add a new setting page under Settings >> Company >> Messaging called Message Templates

      • This page should contain a table of message templates including
        • Name
        • Types
        • Options (with Edit link)

      Add a new Edit Message Template page

      • Create a tab and textarea field for every messenger type
      • Create a checkbox on each tab to enable/disable the messenger type

      Add permissions for these settings pages

        Activity

        Hide
        jonathan Jonathan Reissmueller added a comment - - edited

        I don't think the structure is quite right. messages table doesn't need a text column and multi language is not considered. Perhaps this

        message_groups

        • id int(10) unsigned NOT NULL AUTO_INCREMENT,
        • action varchar(64) NOT NULL,
        • type ENUM('client', 'staff', 'shared') DEFAULT 'client',
        • plugin_dir varchar(64) NOT NULL
        • PRIMARY KEY (`id`),
        • INDEX `type` (`type`)

        messages

        • id int(10) unsigned NOT NULL AUTO_INCREMENT,
        • message_group_id int(10) unsigned NOT NULL,
        • company_id int(10) unsigned NOT NULL,
        • type ENUM('sms') DEFAULT 'sms',
        • PRIMARY KEY (`id`),
        • INDEX `message_group_id` (`message_group_id`)

        message_content

        • message_id int(10) unsigned NOT NULL,
        • lang VARCHAR(5) NOT NULL
        • content mediumtext COLLATE utf8_unicode_ci
        • PRIMARY KEY (`message_id`, `lang`)
        Show
        jonathan Jonathan Reissmueller added a comment - - edited I don't think the structure is quite right. messages table doesn't need a text column and multi language is not considered. Perhaps this message_groups id int(10) unsigned NOT NULL AUTO_INCREMENT, action varchar(64) NOT NULL, type ENUM('client', 'staff', 'shared') DEFAULT 'client', plugin_dir varchar(64) NOT NULL PRIMARY KEY (`id`), INDEX `type` (`type`) messages id int(10) unsigned NOT NULL AUTO_INCREMENT, message_group_id int(10) unsigned NOT NULL, company_id int(10) unsigned NOT NULL, type ENUM('sms') DEFAULT 'sms', PRIMARY KEY (`id`), INDEX `message_group_id` (`message_group_id`) message_content message_id int(10) unsigned NOT NULL, lang VARCHAR(5) NOT NULL content mediumtext COLLATE utf8_unicode_ci PRIMARY KEY (`message_id`, `lang`)
        Hide
        abdy Abdy Franco added a comment -

        I think we could add a "name" column to the "messages" table, which will be shown in the "Message Templates" view.

        Show
        abdy Abdy Franco added a comment - I think we could add a "name" column to the "messages" table, which will be shown in the "Message Templates" view.
        Hide
        jonathan Jonathan Reissmueller added a comment -

        Perhaps these tables could have better names. perhaps message_groups => messages, message => message_types. Would a name field serve any other purpose? It's a little hard to place because the current messages table is associated with a type so having a name for every type doesn't make much sense, but message groups are not distinguished by company so it can't go there either.

        Show
        jonathan Jonathan Reissmueller added a comment - Perhaps these tables could have better names. perhaps message_groups => messages, message => message_types. Would a name field serve any other purpose? It's a little hard to place because the current messages table is associated with a type so having a name for every type doesn't make much sense, but message groups are not distinguished by company so it can't go there either.
        Hide
        abdy Abdy Franco added a comment -

        Maybe we could use the "action" of the group, to define the name using a language definition, to not add another column to the table.

        $this->_('AdminCompanyMessengers.templates.message_group_' . $group->action);
        
        Show
        abdy Abdy Franco added a comment - Maybe we could use the "action" of the group, to define the name using a language definition, to not add another column to the table. $ this ->_('AdminCompanyMessengers.templates.message_group_' . $group->action);
        Hide
        jonathan Jonathan Reissmueller added a comment -

        I like that

        Show
        jonathan Jonathan Reissmueller added a comment - I like that
        Hide
        abdy Abdy Franco added a comment -

        Another thing, if the messages are going to support tags, we would have to store them somewhere, maybe it could be in "message_groups" similar to "email_groups".

        Show
        abdy Abdy Franco added a comment - Another thing, if the messages are going to support tags, we would have to store them somewhere, maybe it could be in "message_groups" similar to "email_groups".
        Hide
        jonathan Jonathan Reissmueller added a comment - - edited

        Agreed, and it should be on the message edit page like we do for emails

        Show
        jonathan Jonathan Reissmueller added a comment - - edited Agreed, and it should be on the message edit page like we do for emails

          People

          • Assignee:
            abdy Abdy Franco
            Reporter:
            jonathan Jonathan Reissmueller
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              17/Sep/20

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 week, 1 day, 2 hours, 16 minutes
              1w 1d 2h 16m

                Agile