Event Duration are not editable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Athensmusic
    Member
    • Feb 2020
    • 51

    Event Duration are not editable

    Hi,
    we just noticed that event default duration values are not completely editable.
    We see we have the option to add new values but not to remove any value, default ones or not.
    Seems like a bug, please check.
    Thanks for this amazing application!
    V
  • yuri
    Member
    • Mar 2014
    • 8443

    #2
    Hi, I will check.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • Athensmusic
      Member
      • Feb 2020
      • 51

      #3
      Originally posted by yurikuzn
      Hi, I will check.
      Hi, any news about it?

      Comment

      • esforim
        Active Community Member
        • Jan 2020
        • 2204

        #4
        Originally posted by Athensmusic

        Hi, any news about it?
        Hi Athens,

        Is this it? https://github.com/espocrm/espocrm/c...dfc1b2a768718f


        Try making those changes to your version and see if this is fix. If it is then that the code.

        Comment

        • Athensmusic
          Member
          • Feb 2020
          • 51

          #5
          Yes, that fixed this issue.
          So, we replaced client/src/views/fields/array-int.js file content with the code above.

          define('views/fields/array-int', 'views/fields/array', function (Dep) {

          return Dep.extend({

          type: 'arrayInt',

          fetchFromDom: function () {
          var selected = [];
          this.$el.find('.list-group .list-group-item').each(function (i, el) {
          var value = $(el).data('value');
          if (typeof value === 'string' || value instanceof String) {
          value = parseInt($(el).data('value'));
          }
          selected.push(value);
          });
          this.selected = selected;
          },

          addValue: function (value) {
          value = parseInt(value);
          if (isNaN(value)) {
          return;
          }
          Dep.prototype.addValue.call(this, value);
          },

          removeValue: function (value) {
          value = parseInt(value);
          if (isNaN(value)) {
          return;
          }
          var valueInternal = value.toString().replace(/"/g, '\"');

          this.$list.children('[data-value="' + valueInternal + '"]').remove();

          var index = this.selected.indexOf(value);
          this.selected.splice(index, 1);
          this.trigger('change');
          //Dep.prototype.removeValue.call(this, value);
          },

          });
          });

          Thank you!

          Comment

          • esforim
            Active Community Member
            • Jan 2020
            • 2204

            #6
            Hi Athens,

            it is part of the version 5.8.3, so I recommend you do a Update just to make sure those manual change you did is correct.

            EspoCRM – Open Source CRM Application. Contribute to espocrm/espocrm development by creating an account on GitHub.

            EspoCRM Upgrade directory. Download the file to upgrade CRM application.

            Comment

            Working...