Fossil User Forum

How to hide / delete tickets?
Login

How to hide / delete tickets?

How to hide / delete tickets?

(1) By patmaddox on 2024-04-11 03:03:00 [link] [source]

I have a bunch of old test tickets in my repo that I want to clear out. How would you do this in Fossil? I know you can hide artifacts by tagging them - but apparently a ticket ID isn't an artifact. Though that's strange because if I visit /info/<tkt_uuid> in my browser, it shows the ticket info. But command line queries don't report it: fossil info <tkt_uuid> returns "cannot resolve name" and fossil whatis <tkt_uuid> returns "unknown". fossil tag add hidden <tkt_uuid> returns "Cannot resolve artifact ID".

One idea I had was setting the ticket status to something like "archived" and then change the report to exclude tickets with that status.

What mechanisms does Fossil have for deleting / hiding tickets?

(2) By Stephan Beal (stephan) on 2024-04-11 06:38:19 in reply to 1 [source]

I have a bunch of old test tickets in my repo that I want to clear out. How would you do this in Fossil?

Close them and filter closed tickets out of whatever report(s) you're using. There is no way to delete tickets in fossil aside, perhaps, from shunning their actual artifact (which would not also shun any changes made to them, as those are separate artifacts). As you note...

... but apparently a ticket ID isn't an artifact.

A ticket is an artifact but its ID is not its artifact ID. Ticket IDs are randomly generated, not based on a hash of the ticket's artifact like a check-in is.

Though that's strange because if I visit /info/<tkt_uuid> in my browser, it shows the ticket info. But command line queries don't report it:

The /info page does a lot of hoop-jumping to try to do something useful with the ID provided to it. It can also render, for example, forum posts. The CLI ticket command, on the other hand, expects to be given a ticket ID. Very few commands or pages can work with ticket IDs.

One idea I had was setting the ticket status to something like "archived" and then change the report to exclude tickets with that status.

No need - simply "close" those tickets. That is tedious when there are many to update, but there's no trivial way around it beyond mass-generating the artifacts needed for such closure. The most recent example of such an artifact from fossil's main repo is src:/artifact/38dd720d5288f50 and the docs explaining that artifact are here. It looks like the ticket command can be used to automate that, by setting the "status" field to "Closed", but i don't recall ever having used that command.