Feature Request: Allow to add projects to the issue template

When creating an issue template, if you go to Optional additional items , you can only add the following -

  • Default issue title
  • Assignees
  • Labels

It would be nice to be able to add Projects too.

36 Likes

Thanks for the feedback! I’ve taken your suggestion and passed it along to the appropriate teams. Thanks again for reaching out :grinning:

2 Likes

Thank you for considering.

2 Likes

Yes, this would really be great!  We would really like issues to be automatically added to our Project ‘To Do’ list as they are added to an issue tracker as the current extra step of assigning the issue to a Project is easily missed. 

Also, please support specifying an organization-level project as well as a repo-level project. 

Thanks!

4 Likes

Thanks for your plus one @holysamosa, I’ve taken your suggestion and passed it along to the appropriate teams. Thanks again for reaching out :grinning:

This was previously available - projects was an option available within custom MD files. It looks like it still works for urls in the format:
https://github.com/octo-org/octo-repo/issues/new?title=Bug+fix&projects=octo-org/1

This is documented in multiple places. The problem is the links from the issue-chooser do not include the projects parameter.

So this is something that was available, but is no longer.  Hmmmm.

Can I just add, it would be awesome to get something more than a thanks-but-we’ll-ignore-it answer? This is clearly a bug or a QA issue at best.

2 Likes

Hey @jasonbuck,

I appreciate the extra info, let me do a little digging and see where we are here, as far as what changes happened and our plans to implement. As far as I know the only option we’ve always had was

to move all Issues automatically to a project board via API, if this sounds like an option?

If it does, listening for an Issue event on the repository will trigger any time an Issue is created:

https://developer.github.com/v3/activity/events/types/#issuesevent

This can be set up using a webhook, or you can also use GitHub Actions if it’s enabled for your Organisation:

https://developer.github.com/webhooks/creating/
https://developer.github.com/actions/

The following API can be used to add the Issue to a Project board after receiving the message above:
https://developer.github.com/v3/projects/cards/#create-a-project-card

I hope to post back with some news soon, thank you for patience, and again thank you for the additional details.

1 Like

Thank you @jasonbuck for the info with the URLs - it makes a decent workaround possible: If you add a config.yml file to your .github/ISSUE_TEMPLATE/ directory, you can use contact_links to provide the direct URLs. Don’t forget to remove the YAML frontmatter from your TEMPLATE.md files, to keep the issue templates from showing up twice.

Here is an example of a config.yml:

blank_issues_enabled: false
contact_links:
  - name: Feature Request
    about: Request a new feature
    url: https://github.com/Narigo/some-project/issues/new?template=FEATURE_REQUEST.md&projects=Narigo%2Fsome-project%2F1&labels=%3Azap%3A%20new
  - name: Bug Report
    about: Create a report of the issue you've encountered.
    url: https://github.com/Narigo/some-project/issues/new?template=BUG_REPORT.md&projects=Narigo%2Fsome-project%2F1&labels=%3Aant%3A%20bug
  - name: Question
    about: Ask a question about usage or anything
    url: https://github.com/Narigo/some-project/issues/new?template=QUESTION.md&projects=Narigo%2Fsome-project%2F2&labels=%3Aquestion%3A%20question%2C%3Ashrug%3A%20support

The official documentation about config.yml does not yield much more information - if I could change the button not to look like it’s linking to something external, that would be great :wink:

1 Like

Would love to have this too!

1 Like

So I am not alone :sweat_smile:

1 Like

Actually I just tried to add Project and Milestone to my template and found this thread…
Will I need to create a new thread to discuss adding a Milestone?

I would love this feature as well! It would be very helpful to have particular types of issues such as bugs or tracking issues be automatically added to a project.

@Narigo @jasonbuck thanks your suggestions helped me add projects and milestone to the issue template, but the button don’t just look it, it actually opens in a new tab.

https://github.com/username/repo-name/issues/new?assignees=&labels=enhancement&template=FEATURE_REQUEST.md&title=[FEATURE+REQUEST]+&projects=username%2Frepo-name%2F1&milestone=milestone_name

Is there a way to force the issue page to open in current tab…?

I haven’t found a way to open it in the same tab, sorry. I live with it for now. If you find a way, please share :slight_smile: Or vote for this feature to get implemented by GitHub :smiley:

1 Like