N°6863 - Allow mail inbox administrator to choose log attribute in which updates will be added#8
N°6863 - Allow mail inbox administrator to choose log attribute in which updates will be added#8
Conversation
…ich updates will be added
Hipska
left a comment
There was a problem hiding this comment.
Could you also elaborate what the exact issue is with AttributeClassAttCodeSet? Doesn't it fill in the default value in the database on creation of the column?
| // Determine which field to update | ||
| $sAttCode = 'public_log'; | ||
| $sAttCode = $this->Get('ticket_updates_log_attcode'); | ||
| $aAttCodes = MetaModel::GetModuleSetting('itop-standard-email-synchro', 'ticket_log', array('UserRequest' => 'public_log', 'Incident' => 'public_log')); | ||
| if (array_key_exists(get_class($oTicket), $aAttCodes)) | ||
| { |
There was a problem hiding this comment.
$sAttCode will get overwritten by this default module setting..
Should this setting be obsoleted and ignored maybe?
There was a problem hiding this comment.
You are right, I'll fix it!
There was a problem hiding this comment.
I just changed the conf. param. default value to an empty array; but actually the whole conf. param. should be obsoleted you are right.
There was a problem hiding this comment.
What about existing/upgrading users? They will still have the setting from previous install. Also new users will have this setting as it is still present in module file.
There was a problem hiding this comment.
That's why obsoleting the param. and removing the line from the code is the best way IMHO.
For existing users, we should check the existing conf. param. and apply the corresponding value to existing mail inboxes. I missed that!
There was a problem hiding this comment.
That could be an action during setup (after database creation) for example..
I wasn't able to prefill the attribute with a default value when creating a new mail inbox, even with |
You found a bug? 😁 |
Let's call it a known limitation 😅😭 |
Objective
Allow mail inbox administrator to choose log attribute in which updates will be added
Use case
The idea is to avoid the end-user to be aware of the provider updates
Proposed solution
AttributeStringinstead of an ÀttributeClassAttCodeSet` to avoid data migration and as default value is not handled well, but this can be subject to discussion.Appendices
XML snippet for
AttributeClassAttCodeSet: