Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
2 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
832d1b3
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.
What is the reason for this change? When an action is created manually, "type_id" and "code" are already filled. So the only way that code is run is when an automatic event is created through a trigger. In that case the field "code" contains the action of event launched (AC_PROPAL_VALIDATE, AC_PROPAL_SENTBYMAIL...). With the change, we lose that information, since the field "code" will always contain AC_OTH_AUTO
832d1b3
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.
As I understand, there is two fields to save the same information into llx_actioncomm. -llx_actioncomm.fk_action=>llx_c_actioncomm.id
-llx_actioncomm.code=>llx_c_actioncomm.code
It seems logical to save the same relevent information in both column, if not what appens on agenda with filter on event type (when you activate the event type option) ?
Even if the event is created by trigger, it seems logical that it appears is the same way as manually, it depends on dictionnay table, not method of creation. If event is created by trigger, you should add an entry into dictionnary to says it. For exemple on dictionnay entry with "Event Entry", and another with "Event entry auto" and code it into your module.
The problem is more : "why have two column to save the same foreign key information ?"
@eldy want to remove, a year ago, from dolibarr the event calendar type feature, but now ? I think that the problem is more complex. Task and Event is not the same things, mix models=>mix result.
832d1b3
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.
I think 'fk_action' is a foreign key to the table llx_c_actioncomm but no 'code'. Since in the database there is no foreign key defined, we can not be sure. No point having two columns to store the same information, so I think that 'code' is not a foreign key and can store other extra information.
The 'code' column was created in Dolibarr 3.4 and stores the extra information. And it makes no sense to create a column to store the same information as another.
When filter by action type on agenda, the field used to filter is 'fk_action'. Thus, we can take advantage and use the 'code' to store other information. With the field 'fk_action' we know that the event has been automatically created and you can filter on the agenda, being the 'code' field to store extra information.
I don't think that is functional to create an event type for each possible trigger.
I think that although manual and automatic actions are not exactly the same, can coexist in the same agenda as before.
832d1b3
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.
832d1b3
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.
So in this case why use code as option name to select type event into agenda (select_type_actions into fromaction). If it is fk_action relevant in the case of use event type, we should change all select event type to only manage id and not code.
832d1b3
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.