Method: SystemNotes::IssuablesService#hierarchy_changed
- Defined in:
- app/services/system_notes/issuables_service.rb
#hierarchy_changed(work_item, action) ⇒ Object
Called when the hierarchy of a work item is changed
noteable - Noteable object that responds to work_item_parent and work_item_children project - Project owning noteable author - User performing the change
Example Note text:
"added #1 as child Task"
Returns the created Note object
205 206 207 208 209 210 |
# File 'app/services/system_notes/issuables_service.rb', line 205 def hierarchy_changed(work_item, action) params = hierarchy_note_params(action, noteable, work_item) create_note(NoteSummary.new(noteable, project, , params[:parent_note_body], action: params[:parent_action])) create_note(NoteSummary.new(work_item, work_item.project, , params[:child_note_body], action: params[:child_action])) end |