gitblit-org / gitblit

pure java git solution
http://gitblit.com
Apache License 2.0
2.28k stars 670 forks source link

export-tickets #1316

Closed lukezhqin closed 4 years ago

lukezhqin commented 5 years ago

Does gitblit V1.8.0 support to export tickets to a csv format file?

flaix commented 4 years ago

I'm gonna carefully say: support, yes; offer, no. There is no built-in functionality which offers an export. Exporting ticket data is supported, though, in the sense that for the implemented ticket service providers there is a way to get to the ticket data and even edit it. That means you can get to the raw data and export it to a CSV file.

http://gitblit.com/tickets_replication.html

lukezhqin commented 4 years ago

I'm gonna carefully say: support, yes; offer, no. There is no built-in functionality which offers an export. Exporting ticket data is supported, though, in the sense that for the implemented ticket service providers there is a way to get to the ticket data and even edit it. That means you can get to the raw data and export it to a CSV file.

http://gitblit.com/tickets_replication.html

I have already indeed read all contents on the website you offered in your reply before however I still can't get what you mean export it to a CSV file. Whould you liake to show me more details>?

flaix commented 4 years ago

What I mean is that you can write a script or code to extract the ticket data from the ticket data store and format it into a CSV file. There is no built-in mechanism in GitBlit to export ticket data.

Which TicketFilestore are you using?

lukezhqin commented 4 years ago

The normal branch ticket type I used in my work. Any suggestions?

flaix commented 4 years ago

That means that the ticket data is stored in a special, disconnected branch in the repository. I'm quoting the section on advanced administration from the GitBlit documentation:

Repository owners or Gitblit administrators have the option of manually editing ticket data. To do this you must fetch and checkout the refs/meta/gitblit/tickets ref. This orphan branch is where ticket data is stored. You may then use a text editor to carefully manipulate journals [...]

You don't want to manipulate journals, you want to read them to extract the information and put that information into a CSV file. As mentioned above, there is no tool for that. You would have to script that part yourself.

Gitblit does NOT provide a generic/universal mechanism for advanced administration (i.e. manually tweaking ticket data) however each service does have a strategy for that case.

So for your repository that has tickets, you get to the ticket data using:

git fetch origin refs/meta/gitblit/tickets
git checkout -B tix FETCH_HEAD
...extract data...
lukezhqin commented 4 years ago

Thanks a lot, I would check this myself

flaix commented 4 years ago

Closed as Done. Please reopen, if you have further questions.