Page 1 of 1

Timeline Actions

Posted: 28 Oct 2019, 11:38
by OzielBr
Good Morning,

One question, what actions appear on the timeline? I am performing some tests, changing the description and title of some bugs, but in the timeline does not show that the bug has been updated.
Thanks.

Re: Timeline Actions

Posted: 01 Nov 2019, 10:49
by atrol
Snipped from function timeline_events that might answer your question.
Changing description or title is not treated by the code

Code: Select all

		switch( $t_type ) {
			case NEW_BUG:
				$t_event = new IssueCreatedTimelineEvent( $t_timestamp, $t_user_id, $t_issue_id );
				break;
			case BUGNOTE_ADDED:
				$t_bugnote_id = $t_history_event['old_value'];
				$t_event = new IssueNoteCreatedTimelineEvent( $t_timestamp, $t_user_id, $t_issue_id, $t_bugnote_id );
				break;
			case BUG_MONITOR:
				# Skip monitors added for others due to reminders, only add monitor events where added
				# user is the same as the logged in user.
				if( (int)$t_history_event['old_value'] == $t_user_id ) {
					$t_event = new IssueMonitorTimelineEvent( $t_timestamp, $t_user_id, $t_issue_id, true );
				}
				break;
			case BUG_UNMONITOR:
				# Skip removing other users from monitoring list, only add unmonitor events where removed
				# user is the same as the logged in user.
				if( (int)$t_history_event['old_value'] == $t_user_id ) {
					$t_event = new IssueMonitorTimelineEvent( $t_timestamp, $t_user_id, $t_issue_id, false );
				}
				break;
			case TAG_ATTACHED:
				$t_event = new IssueTagTimelineEvent( $t_timestamp, $t_user_id, $t_issue_id, $t_history_event['old_value'], true );
				break;
			case TAG_DETACHED:
				$t_event = new IssueTagTimelineEvent( $t_timestamp, $t_user_id, $t_issue_id, $t_history_event['old_value'], false );
				break;
			case NORMAL_TYPE:
				switch( $t_history_event['field'] ) {
					case 'status':
						$t_event = new IssueStatusChangeTimelineEvent( $t_timestamp, $t_user_id, $t_issue_id, $t_history_event['old_value'], $t_history_event['new_value'] );
						break;
					case 'handler_id':
						$t_event = new IssueAssignedTimelineEvent( $t_timestamp, $t_user_id, $t_issue_id, $t_history_event['new_value'] );
						break;
				}
				break;
			case FILE_ADDED:
			case FILE_DELETED:
				$t_event = new IssueAttachmentTimelineEvent(
					$t_timestamp,
					$t_user_id,
					$t_issue_id,
					$t_history_event['old_value'],
					$t_type
				);
				break;
		}

Re: Timeline Actions

Posted: 05 Nov 2019, 00:24
by OzielBr
Ok,
Tks Atrol.