Page MenuHomePhabricator

Unable to delete workboard column even if empty
Closed, ResolvedPublic

Description

We have a column in one of our workboards ("6/13") which we can't delete even though there is no tasks in it (even closed):
{F165851 size=full}

{F165853 size=full}

Note that we can't reach the column edit page while in "All Tasks" filter mode because of T5341: 404 error when trying to edit a workboard column after applying a filter, so I have to click the edit button while in the default "Open Tasks" filter, but I doubt that's related.

Event Timeline

swisspol raised the priority of this task from to Needs Triage.
swisspol updated the task description. (Show Details)
swisspol added a subscriber: swisspol.
chad triaged this task as Normal priority.Jun 13 2014, 12:44 AM
chad added subscribers: chad, epriestley.

If you can think of things I can do to poke around the MySQL database to fix this, let me know.

I'm trying to find a repo case, are you able to delete any other columns?

My guess is that there are tasks in the column that you don't have permission to see.

I was able to add and delete a column. I'd rather not try to delete an existing column which would require messing up with this workboard.

My account is an admin one and AFAIK nobody is using ACLs in the marketing world which is this workboard.

I was able to repro by chance (or at least 1 way to get to it):

  1. Have a single tasks, closed, in a column which is in 2 projects
  2. Click edit button and remove the project of the current workboard
  3. Save

First bug: the workboard doesn't reload properly and still shows the task in the column. Refreshing the page solves it.

Second bug: you can't delete the column anymore.

Humm... I don't know then: now I can't delete another column in this same workboard, which only had 1 open task and in 1 project, this one. I dragged it back to backlog, but I can't delete the now empty column: says it's not empty.

Poking around the database, this is the column that can't be deleted:

INSERT INTO `project_column` (`id`, `phid`, `name`, `status`, `sequence`, `projectPHID`, `dateCreated`, `dateModified`)
VALUES
	(23, X'504849442D50434F4C2D7964657172736E3565706E356471717965786C62', 'Fri 6/13', 0, 6, X'504849442D50524F4A2D6E7571356B353564793335716A32626F32366F32', 1401399132, 1402355539);

I indeed found an edge linking to a task:

INSERT INTO `edge` (`src`, `type`, `dst`, `dateCreated`, `seq`, `dataID`)
VALUES
	(X'504849442D50434F4C2D7964657172736E3565706E356471717965786C62', 44, X'504849442D5441534B2D77746172766278666D3372647636676E35646164', 1402007316, 0, NULL);
INSERT INTO `edge` (`src`, `type`, `dst`, `dateCreated`, `seq`, `dataID`)
VALUES
	(X'504849442D5441534B2D77746172766278666D3372647636676E35646164', 43, X'504849442D50434F4C2D7964657172736E3565706E356471717965786C62', 1402007316, 0, NULL);
166	PHID-TASK-wtarvbxfm3rdv6gn5dad	PHID-USER-phrw76lniaz4d3qgnn33	PHID-USER-phrw76lniaz4d3qgnn33	["PHID-USER-phrw76lniaz4d3qgnn33","PHID-USER-yikjv4a7ykjhwet6oaaf"]	[]	open	75	Run A/B Tests on Website through Optimizely	Run A/B Tests on Website through Optimizely	Reference:↵↵http://blog.optimizely.com/2013/04/30/71-things-to-ab-test/?mkt_tok=3RkMMJWWfF9wsRoju6nKZKXonjHpfsX77uQkX6S%2FlMI%2F0ER3fOvrPUfGjI4GScFkI%2BSLDwEYGJlv6SgFSbbEMadlyLgEWRM%3D↵↵Colors, text, shape, size of the buy button - Results: Larger, Red, Purchase Now (without price) is the winner↵Shorter video on homepage↵Auto-play video vs click to play↵Auto-rotate carousel vs static↵↵Value of the About Us Page↵↵Copy - tone, amount of text, number of clickable buttons, interaction vs static↵↵Long scroll (status quo) or click to rotate / keep above the fold↵↵Paid traffic to landing pages vs homepage↵↵Email collection -↵↵	1400695474	1402543839	["PHID-PROJ-fxcin272iofuimkbb7ec"]	vcmlaotmevwghoqkymq6	inga	NULL	373555200	users	users

As you can see the task is closed and publicly visible (I can see it in T166). This is task is not a member of the "Marketing" project but is in the "Website" in a non-backlog column on that board.

So how do I go at fixing this? Can I just delete the edge in both tables?

Deleting the edge in both tables will resolve this.

We probably have a bug here, in that removing a project may not be cleaning up the task's relationships to the project's columns.

I found another board with the same issue. This time the invisible task is in the backlog column of 2 other projects.

We have been moving tasks between projects now and then, so it's possible that's the source of the bug.

FYI deleting the edges directly in the DB fixed the issue in both cases.