|
Pierre-Yves Chibon |
8d07f2 |
Templates for ticket input
|
|
Pierre-Yves Chibon |
8d07f2 |
==========================
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
Pagure offers the possibility to add templates for ticket's input. These
|
|
Pierre-Yves Chibon |
8d07f2 |
templates do not enforce anything, users will have the possibility to simply
|
|
Pierre-Yves Chibon |
8d07f2 |
ignore it, or even to not follow it, but it also helps structuring the
|
|
Pierre-Yves Chibon |
8d07f2 |
ticket opened against a project and highlighting the information that are
|
|
Pierre-Yves Chibon |
8d07f2 |
often requested/needed.
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
d89186 |
The templates are provided in the git repository containing the meta-data
|
|
Pierre-Yves Chibon |
8d07f2 |
for the tickets.
|
|
Pierre-Yves Chibon |
8d07f2 |
They must be placed under a ``templates`` folder in this git repository,
|
|
Sergio Durigan Junior |
7fae95 |
end with ``.md``and as the extension suggests can be formatted as markdown.
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
If you create a template ``templates/default.md``, it will be shown by
|
|
Pierre-Yves Chibon |
8d07f2 |
default when someone ask to create a new ticket.
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
Example
|
|
Pierre-Yves Chibon |
8d07f2 |
-------
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
For a project named ``test`` on ``pagure.io``.
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
* First, clone the ticket git repo [#f1]_ and move into it
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
::
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
git clone ssh://git@pagure.io/tickets/pagure.git
|
|
Pierre-Yves Chibon |
8d07f2 |
cd test
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
* Create the templates folder
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
::
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
mkdir templates
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
* Create a default template
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
::
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
vim templates/default.md
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
And place in this file the following content:
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
::
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
##### Issue
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
##### Steps to reproduce
|
|
Pierre-Yves Chibon |
8d07f2 |
1.
|
|
Pierre-Yves Chibon |
8d07f2 |
2.
|
|
Pierre-Yves Chibon |
8d07f2 |
3.
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
##### Actual results
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
##### Expected results
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
* Commit and push the changes to the git repo
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
::
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
git add templates
|
|
Pierre-Yves Chibon |
8d07f2 |
git commit -m "Add a default template for tickets"
|
|
Pierre-Yves Chibon |
8d07f2 |
git push
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
* And this is how it will look like
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
.. image:: _static/pagure_ticket_template.png
|
|
Pierre-Yves Chibon |
8d07f2 |
:target: _static/pagure_ticket_template.png
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
|
|
Pierre-Yves Chibon |
8d07f2 |
.. [#f1] All the URLs to the different git repositories can be found on the
|
|
Pierre-Yves Chibon |
8d07f2 |
main page of the project, on the right-side menu, under the section
|
|
Pierre-Yves Chibon |
8d07f2 |
``Source GIT URLs``, click on ``more`` to see them.
|