Used Zammad version: 6.0.0-1688124635.f7dd26a6.jammy
Used Zammad installation type: (source, package, docker-compose, …) package
Operating system: Ubuntu 22.04
Browser + version: Firefox (current release)
Expected behavior:
Use the zammad console (for example) to change the article type to internal
Actual behavior:
Is there such command?
Steps to reproduce the behavior:
be me
We want to publish our still internal zammad installation to our intranet.
All current tickets should have their articles set to internal. All new tickets should not change their behavior.
I got it working even tho i don’t have the list of commands anymore (history apparently gets lost when quitting the rails console?)
It was something like this:
Dear future anon finding this thread and “solution” above.
Please note that the suggested solution may work, however, is a very expensive operation resource wise.
If you have more than ~10 thousand articles, this is going to cause issues.
Consider using batches instead.
Possibly like so:
Ticket::Article.find_in_batches.each do |batch|
batch.each do |article|
article.update(internal: true)
end
end
Note that above is not verified and potentially causes a lot of delayed jobs (but that applies to both approaches). Have a backup ready any way.