Page MenuHomePhabricator

Added isClosed property to maniphest conduit endpoint in order to fix an issue with arcanist when displaying tasks
ClosedPublic

Authored by bwinterton on Apr 9 2014, 3:38 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 7, 1:30 PM
Unknown Object (File)
Sat, Dec 7, 3:29 AM
Unknown Object (File)
Sat, Dec 7, 2:00 AM
Unknown Object (File)
Nov 3 2024, 3:44 PM
Unknown Object (File)
Oct 31 2024, 12:15 PM
Unknown Object (File)
Oct 10 2024, 6:21 PM
Unknown Object (File)
Sep 26 2024, 12:27 PM
Unknown Object (File)
Sep 17 2024, 3:59 PM

Details

Summary

Arcanist is currently displaying all tasks as closed when invoking arc tasks.
This is because arcanist is setting the display to closed if there is anything in the status property. Adding an isClosed property will allow arcanist to properly display open/closed status on tasks by checking against the isClosed property. The isClosed property will be set according to the closed property that is set on each status in maniphest.

Test Plan

Invoke the conduit maniphest.info method on any task and insure that:

  1. The isClosed property is included in the properties
  2. that it is set properly according to the statuses set for maniphest.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

bwinterton retitled this revision from to Added isClosed property to maniphest conduit endpoint in order to fix an issue with arcanist when displaying tasks.
bwinterton updated this object.
bwinterton edited the test plan for this revision. (Show Details)
bwinterton added a reviewer: epriestley.

A small bite of context in T4744. Offhand, I'd guess that adding statusName might also be useful? The status field just has the status constant (like open), not the human-readable name (like Open), right?

If that seems sensible, you should be able to pull it with:

'statusName' => ManiphestTaskStatus:;getTaskStatusName($task->getStatus()),

We probably need to adjust maniphest.query slightly too, but that can be a separate diff.

I'm sorry I hadn't seen the task. I should have checked first. I think that adding statusName would definitely be of use. That could also be potentially used in the arc tasks display instead of Open/Closed don't you think? I think that would be much more informative and we can leave a green bar signifying open and red signifying closed.

And you are correct about the status field showing the constant versus the human readable.

I can go ahead and add that functionality in right now (that was where I was headed with this anyways). Would you like me to add that change to this diff or would you like me to make another?

Also, I can look into maniphest.query and see if we will need to tweak anything there.

Yeah, let's do this:

  • add statusName to this diff (just update the existing revision);
  • update D8732 to make use of the new statusName column.

We can land those, and then look into the query stuff separately.

(I have to log off for the night, but I'll take a look at the updates tomorrow if you've had a chance to get through them by then. Thanks for these fixes!)

bwinterton edited edge metadata.

Added a statusName property as well which will be used by arc tasks in D8732.

Update to change the base commit for the diff

Here are the fixes. I am happy to do it. I am excited to continue contributing to these projects. My team and I are going to begin using phabricator and arcanist so there are improvements that I will hopefully be able to make as we find things that we would like improved.

Also, sorry about the change in the diff, I accidentally based it off of one of my local commits.

epriestley edited edge metadata.

Perfect, thanks!

This revision is now accepted and ready to land.Apr 9 2014, 2:47 PM
epriestley updated this revision to Diff 20710.

Closed by commit rPdffbbaf0a65b (authored by @bwinterton, committed by @epriestley).