---
title: "Triagem de tickets"
version: 5.1
locale: pt-br
source: https://docs.djangoproject.com/pt-br/5.1/internals/contributing/triaging-tickets/
canonical: https://djangodocs.dev/pt-br/5.1/internals/contributing/triaging-tickets/
---
# Triagem de tickets

Django uses [Trac](https://code.djangoproject.com/) for managing the work on the code base. Trac is a
community-tended garden of the bugs people have found and the features people
would like to see added. As in any garden, sometimes there are weeds to be
pulled and sometimes there are flowers and vegetables that need picking. We need
your help to sort out one from the other, and in the end, we all benefit
together.

Like all gardens, we can aspire to perfection, but in reality there’s no such
thing. Even in the most pristine garden there are still snails and insects.
In a community garden there are also helpful people who – with the best of
intentions – fertilize the weeds and poison the roses. It’s the job of the
community as a whole to self-manage, keep the problems to a minimum, and
educate those coming into the community so that they can become valuable
contributing members.

Similarly, while we aim for Trac to be a perfect representation of the state of
Django’s progress, we acknowledge that this will not happen. By distributing
the load of Trac maintenance to the community, we accept that there will be
mistakes. Trac is “mostly accurate”, and we give allowances for the fact that
sometimes it will be wrong. That’s okay. We’re perfectionists with deadlines.

We rely on the community to keep participating, keep tickets as accurate as
possible, and raise issues for discussion on the [Django Forum](https://forum.djangoproject.com/) when there is
confusion or disagreement.

Django é um projeto comunitário, e cada contribuição ajuda. Nós não podemos fazer isso sem **vocês**!

## Fluxo de triagem

Unfortunately, not all bug reports and feature requests in the ticket tracker
provide all the [required details](/pt-br/5.1/internals/contributing/bugs-and-features/). A number of
tickets have proposed solutions, but those don’t necessarily meet all the
requirements [adhering to the guidelines for contributing](/pt-br/5.1/internals/contributing/writing-code/submitting-patches/#patch-style).

One way to help out is to *triage* tickets that have been created by other
users.

A maior parte do fluxo de trabalho é baseada em torno do conceito de tickets [estágios de triagem](#triage-stages). Cada estágio descreve em que parte de seu clico de vida um ticket está em um dado momento. Além de várias tags, esse atributo nos diz claramente o que e quem o ticket está aguardando.

Já que uma imagem vale mais que mil palavras, vamos começar aqui:

[![Django's ticket triage workflow](internals/_images/triage_process.svg)](../../../../../../_images/triage_process.svg)

Nós temos dois papéis neste diagrama:

- Mergers: people with commit access who are responsible for making the
  final decision to merge a change.
- Agentes de triagem: qualquer pessoa na comunidade Django que escolher se envolver no processo de desenvolvimento do Django. Nossa instalação do Trac é intencionalmente deixada aberta para o público, e qualquer pessoa pode fazer a triagem dos tickets. Django é um projeto comunitário, e nós encorajamos [triagens feitas pela comunidade](#how-can-i-help-with-triaging).

Como exemplo, aqui nós podemos ver o ciclo de vida de um ticket comum:

- Alice creates a ticket and sends an incomplete pull request (no tests,
  incorrect implementation).
- Bob reviews the pull request, marks the ticket as “Accepted”, “needs tests”,
  and “patch needs improvement”, and leaves a comment telling Alice how the
  patch could be improved.
- Alice updates the pull request, adding tests (but not changing the
  implementation). She removes the two flags.
- Charlie reviews the pull request and resets the “patch needs improvement”
  flag with another comment about improving the implementation.
- Alice updates the pull request, fixing the implementation. She removes the
  “patch needs improvement” flag.
- Daisy reviews the pull request and marks the ticket as “Ready for checkin”.
- Jacob, a [merger](/pt-br/5.1/internals/organization/#mergers-team), reviews the pull request and merges
  it.

Alguns tickets precisam de bem menos feedback do que esse, mas então novamente outros tickets requerem muito, muito mais.

## Estágios de triagem

Abaixo são descritos em mais detalhes os vários estágios que um ticket pode possuir durante o seu tempo de vida.

### Não revisado

O ticket não foi revisado por ninguém que tenha se sentido qualificado para decidir se o ticket contém um problema válido, uma funcionalidade viável, ou se deveria ser fechado por qualquer uma das várias razões possíveis.

### Aceito

A grande área cinzenta! O sentido absoluto de “aceito” é que o problema descrito no ticket é válido e está em algum estágio no processo de ser resolvido. Além disso existem vários considerações:

- **Aceito + Nenhuma Tag**

  The ticket is valid, but no one has submitted a patch for it yet. Often this
  means you could safely start writing a fix for it. This is generally more
  true for the case of accepted bugs than accepted features. A ticket for a bug
  that has been accepted means that the issue has been verified by at least one
  triager as a legitimate bug - and should probably be fixed if possible. An
  accepted new feature may only mean that one triager thought the feature would
  be good to have, but this alone does not represent a consensus view or imply
  with any certainty that a patch will be accepted for that feature. Seek more
  feedback before writing an extensive contribution if you are in doubt.
- **Aceito + Possui Patch**

  The ticket is waiting for people to review the supplied solution. This means
  downloading the patch and trying it out, verifying that it contains tests
  and docs, running the test suite with the included patch, and leaving
  feedback on the ticket.
- **Aceito + Possui Patch + Precisa …**

  Isso significa que o ticket foi revisado, e constatado que ele precisa de mais trabalho. “Precisa de testes” e “Precisa de documentação” são auto-explicativos. “Patch precisa de melhorias” geralmente estará acompanhado de um comentário no ticket explicando o que ele precisa para melhorar.

### Pronto para Checkin

The ticket was reviewed by any member of the community other than the person
who supplied the patch and found to meet all the requirements for a
commit-ready contribution. A [merger](/pt-br/5.1/internals/organization/#mergers-team) now needs to give
a final review prior to being committed.

There are a lot of pull requests. It can take a while for your patch to get
reviewed. See the [contributing code FAQ](/pt-br/5.1/faq/contributing/#new-contributors-faq) for some
ideas here.

### Algum Dia/Talvez

This stage isn’t shown on the diagram. It’s used sparingly to keep track of
high-level ideas or long-term feature requests.

Esses tickes são incomuns e no fim das contas menos úteis já que eles não descrevem problemas concretos e acionáveis. Eles são pedidos de melhorias que nós podemos considerar adicionar algum dia ao framework se um excelente patch é submetido. Eles não são uma grande prioridade.

## Outros atributos de triagem

Um número de tags, aparecendo como checkboxes no Trac, podem ser ativdadas no ticket:

### Possui patch

This means the ticket has an associated solution. These will be reviewed to
ensure they adhere to the [documented guidelines](/pt-br/5.1/internals/contributing/writing-code/submitting-patches/).

Os três campos seguintes (Precisa de documentação, Precisa de testes, Patch precisa de melhorias) se aplicam apenas se o patch foi submetido.

### Precisa de documentação

Essa tag é usada para tickets com patches sem documentação associada.  Documentação completa de funcionalidades é um pré-requisito antes de nós adicionarmos elas no código base.

### Precisa de testes

This flags the patch as needing associated unit tests. Again, this
is a required part of a valid contribution.

### Patch precisa de melhorias

This flag means that although the ticket *has* a solution, it’s not quite
ready for checkin. This could mean the patch no longer applies
cleanly, there is a flaw in the implementation, or that the code
doesn’t meet our standards.

### Escolhas Fáceis

Tickets that would require small, easy, changes.

### Tipo

Os tickets devem ser categorizados por *tipo* entre:

- **Nova funcionalidade**

    Para adicionar algo novo.
- **Bug**

    Para quando algo que já existe está quebrado ou não se comporta como esperado.
- **Limpeza/otimização**

    Para quando nada está quebrado mas algo poderia ser mais limpo, melhor, rápido, forte.

### Componente

Tickets devem ser classificados dentro de *componentes* indicando qual área do código base do Django eles pertencem. Isso faz com que os tickets fiquem melhor organizados e mais fáceis de encontrar.

### Severidade

The *severity* attribute is used to identify blockers, that is, issues that
should get fixed before releasing the next version of Django. Typically those
issues are bugs causing regressions from earlier versions or potentially
causing severe data losses. This attribute is quite rarely used and the vast
majority of tickets have a severity of “Normal”.

### Versão

É possível usar o atributo “versão” para indicar em qual versão o bug relatado foi identificado.

### UI/UX

Esta tag é utilizada para tickets que estão relacionados a questões de interface de usuário e de experiência de usuário. Por exemplo, essa tag seria apropriada para funcionalidades que os usuários podem ver nos formulários ou na interface do admin.

### Cc

Você pode adicionar o seu nome de usuário ou endereço de email neste campo para ser notificado quando novas contribuições forem feitas ao ticket.

### Palavras-chave

With this field you may label a ticket with multiple keywords. This can be
useful, for example, to group several tickets on the same theme. Keywords can
either be comma or space separated. Keyword search finds the keyword string
anywhere in the keywords. For example, clicking on a ticket with the keyword
“form” will yield similar tickets tagged with keywords containing strings such
as “formset”, “modelformset”, and “ManagementForm”.

## Fechando Tickets

When a ticket has completed its useful lifecycle, it’s time for it to be
closed. Closing a ticket is a big responsibility, though. You have to be sure
that the issue is really resolved, and you need to keep in mind that the
reporter of the ticket may not be happy to have their ticket closed (unless
it’s fixed!). If you’re not certain about closing a ticket, leave a comment
with your thoughts instead.

Se você realmente for fechar um ticket, você sempre deve ter certeza de que:

- Certifique-se de que o problema foi resolvido.
- Deixe um comentário explicando a decisão de fechar o ticket.
- Se existe uma forma de melhorar o ticket para que ele seja reaberto, informe como.
- Se o ticket está duplicado, faz uma referência ao ticket original. Também faça uma referência cruzada no ticket fechado deixando um comentário no ticket original – isso permite acessar mais informações sobre o bug relatado ou a funcionalidade solicitada.
- **Seja educado** Ninguém gosta de ter o seu ticket fechado. Isso pode ser frustrante e até mesmo desencorajante. A melhor forma de evitar que pessoas deixem de contribuir com o Django é sendo gentil e educado oferecendo sugestões sobre como eles podem melhorar esse ticket e outros tickets no futuro.

Um ticket pode ser resolvido de diversas maneiras:

- **Corrigido**

    Used once a patch has been rolled into Django and the issue is fixed.
- **Inválido**

    Utilizado caso constatado que o ticket estava incorreto. Isso significa que o problema relatado no ticket é na verdade o resultado de um erro cometido pelo usuário, ou descreve um problema com algo não relacionado ao Django, ou se não é um relato de um bug ou a solicitação de uma nova funcionalidade (por exemplo, alguns novos usuários enviam dúvidas de suporte como tickets).
- **wontfix**

    Used when someone decides that the request isn’t appropriate for
    consideration in Django. Sometimes a ticket is closed as “wontfix” with a
    request for the reporter to start a discussion on the [Django Forum](https://forum.djangoproject.com/) if
    they feel differently from the rationale provided by the person who
    closed the ticket. Other times, a discussion precedes the decision to
    close a ticket. Always use the forum to get a consensus before reopening
    tickets closed as “wontfix”.
- **Duplicado**

    Usado quando outro ticket cobre o mesmo problema. Fechando tickets duplicados, nós mantemos toda a discussão em um só local, o que ajuda todo mundo.
- **worksforme**

    Usado quando o ticket não contém detalhes o suficiente para replicar o bug original.
- **needsinfo**

    Usado quando o ticket não contém informação o suficiente para replicar o problema relatado mas ainda tem o potencial de ser válido. O ticket deve ser reaberto quando mais informações foram fornecidas.

If you believe that the ticket was closed in error – because you’re
still having the issue, or it’s popped up somewhere else, or the triagers have
made a mistake – please reopen the ticket and provide further information.
Again, please do not reopen tickets that have been marked as “wontfix” and
bring the issue to the [Django Forum](https://forum.djangoproject.com/) instead.

## Como eu posso ajudar com a triagem?

O processo de triagem é controlado primeiramente pelos membros da comunidade. De verdade, **QUALQUER PESSOA** pode ajudar.

Para contribuir, comece [criando uma conta no Trac](https://www.djangoproject.com/accounts/password/reset/). Se você tem uma conta mas esqueceu a sua senha, você pode resetá-la usando a [página de recuperação de senha](https://www.djangoproject.com/accounts/register/).

A partir disso, você poderá ajudar com:

- Closing “Unreviewed” tickets as “invalid”, “worksforme”, or “duplicate”, or
  “wontfix”.
- Closing “Unreviewed” tickets as “needsinfo” when the description is too
  sparse to be actionable, or when they’re feature requests requiring a
  discussion on the [Django Forum](https://forum.djangoproject.com/).
- Corrigindo as flags “Needs tests”, “Needs documentation”, ou “Has patch” para tickets onde eles são setados incorretamente.
- Adicionando a flag “[Easy pickings](https://code.djangoproject.com/query?status=!closed&easy=1)” para tickets que são pequenos e relativamente simples.
- Adicionando um *tipo* para os tickets que ainda não foram categorizados.
- Verificando se tickets antigos ainda são válidos. Se o ticket não possui atividade em um longo período, é possível que o problema tenha sido corrigido mas o ticket ainda não foi fechado.
- Identifying trends and themes in the tickets. If there are a lot of bug
  reports about a particular part of Django, it may indicate we should
  consider refactoring that part of the code. If a trend is emerging,
  you should raise it for discussion (referencing the relevant tickets)
  on the [Django Forum](https://forum.djangoproject.com/).
- Verify if solutions submitted by others are correct. If they are correct
  and also contain appropriate documentation and tests then move them to the
  “Ready for Checkin” stage. If they are not correct then leave a comment to
  explain why and set the corresponding flags (“Patch needs improvement”,
  “Needs tests” etc.).

> **Note**
>
> The [Reports page](https://code.djangoproject.com/wiki/Reports) contains links to many useful Trac queries, including
> several that are useful for triaging tickets and reviewing proposals as
> suggested above.
>
> Você também pode encontrar mais em novos-voluntários.

Porém, nós pedimos o seguinte de todos os membros da comunidade trabalhando no banco de dados de tickets:

- Please **don’t** promote your own tickets to “Ready for checkin”. You
  may mark other people’s tickets that you’ve reviewed as “Ready for
  checkin”, but you should get at minimum one other community member to
  review a patch that you submit.
- Please **don’t** reverse a decision without posting a message to the
  [Django Forum](https://forum.djangoproject.com/) to find consensus.
- If you’re unsure if you should be making a change, don’t make the
  change but instead leave a comment with your concerns on the ticket,
  or post a message to the [Django Forum](https://forum.djangoproject.com/). It’s okay to be unsure, but your
  input is still valuable.

## Bisseccionando uma regressão

Uma regressão é um bug que está presente em alguma versão nova do Django mas não em versões mais antigas. Uma informação extremamente valiosa é o commit que introduziu a regressão. Saber qual foi o commit que causou a mudança de comportamento ajuda a identificar se a mudança foi intencional ou se ela foi um efeito colateral inesperado. Aqui vamos mostrar como você pode determinar isso.

Begin by writing a regression test for Django’s test suite for the issue. For
example, we’ll pretend we’re debugging a regression in migrations. After you’ve
written the test and confirmed that it fails on the latest main branch, put it
in a separate file that you can run standalone. For our example, we’ll pretend
we created `tests/migrations/test_regression.py`, which can be run with:

```shell
$ ./runtests.py migrations.test_regression
```

Next, we mark the current point in history as being “bad” since the test fails:

```shell
$ git bisect bad
You need to start by "git bisect start"
Do you want me to do it for you [Y/n]? y
```

Now, we need to find a point in git history before the regression was
introduced (i.e. a point where the test passes). Use something like
`git checkout HEAD~100` to check out an earlier revision (100 commits earlier,
in this case). Check if the test fails. If so, mark that point as “bad”
(`git bisect bad`), then check out an earlier revision and recheck. Once you
find a revision where your test passes, mark it as “good”:

```shell
$ git bisect good
Bisecting: X revisions left to test after this (roughly Y steps)
...
```

Now we’re ready for the fun part: using `git bisect run` to automate the rest
of the process:

```shell
$ git bisect run tests/runtests.py migrations.test_regression
```

Você deverá ver o `git bisect` usando uma busca binária para automaticamente fazer checkout de revisões entre os commits bons e os commits ruins até que ele encontre o primeiro commit “ruim” onde o teste falha.

Agora, mostre os seus resultados no ticket do Trac, e por favor inclua o teste de regressão como um anexo. Quando alguém escreve uma correção para o bug, eles já terão o seu teste como uma referência de por onde começar.
