Mass add items to "Spaces" space

#1

Hi,

How can I mass add items to a space. Say I had a whole bunch of tasks and I wanted to add them all to the “Moo” space. I tried searching and doing a bulk change but the option to change space does not appear to be there.

Hope there’s an easy way to do this, though am not adverse to hitting the DB if need be.

0 Likes

#2

There’s currently no way to do this. A bulk editor action is planned, but it’s entangled with the more complex policy edits (see: https://secure.phabricator.com/T4675).

The raw database approach is:

UPDATE phabricator_maniphest.maniphest_task SET spacePHID = '...' WHERE ...

See the task above for a script approach.

0 Likes

#3

Thanks for your help. After a bit of poking I wrote the following to only place tasks in a particular project into the space I wanted:

begin; update maniphest_task, edge set maniphest_task.spacePHID = ‘PHID-SPCE-xxx’ where maniphest_task.phid = edge.src and edge.type = 41 and edge.dst = ‘PHID-PROJ-yyy’;

Hopefully that was the right way to go about it as it does not appear that I’ve broken the universe, which makes me happy. :slight_smile:

(is there a list anywhere of what the type numbers mean? I figured that one out be means of experimentation)

0 Likes

#4

Config > Edge Types has a (fairly technical) list.

0 Likes

closed #5
0 Likes