Undefined method 'project_templates' in Ruby API

Just to help anyone who encounters this. What I have done is converted all my templates into projects in a separate space and I’m using the API call Duplicate a project to duplicate new projects from them. See example:

new_project = client.projects.duplicate_project(project_gid: ‘xxxxxxxxx’, name: ‘New Project’, team: ‘xxxxxxxx’, include: [‘notes’, ‘rules’, ‘forms’, ‘task_templates’])

This works fine but something to note is that the API docs don’t tell you all the ‘include’ options available. If I had known these I probably would not have bothered looking into the creating form a template solution as I can get pretty much everything I want here now. The full set of ‘include’ options are:

  • forms
  • members
  • notes
  • rules
  • task_assignee
  • task_attachments
  • task_dates
  • task_dependencies
  • task_followers
  • task_notes
  • task_projects
  • task_subtasks
  • task_tags
  • task_templates

Hope this helps :slight_smile:

1 Like