Here is the proposed approach:
Name formula on the time record field could optionally be something like this:
"Time Logged for " + Task.Name + " by " + User.Name + " on " + ToText(Date) + " (" + ToText(Duration) + ")"
Button action script would be:
// Developer reference is at api.fibery.io/#action-buttons
// Fibery API is used to retrieve and update entities
const fibery = context.getService('fibery');
const today = new Date();
// affected entities are stored in args.currentEntities;
// to support batch actions they always come in an array
for (const entity of args.currentEntities) {
const offersTask = await fibery.createEntity('Project Management/Time Record', {
"User": args.currentUser.id,
"Task": entity.id,
"Date": today.toISOString(),
"Duration": 0.5
});
}
Link to the template: Project Management with Time Records