Page MenuHomePhabricator

Changed checking for a closed task in `arc tasks` to look for the isClosed property instead of a non-empty status
ClosedPublic

Authored by bwinterton on Apr 9 2014, 3:46 AM.
Tags
None
Referenced Files
F13265871: D8732.diff
Tue, May 28, 6:49 AM
F13246657: D8732.diff
Thu, May 23, 12:32 PM
F13246035: D8732.diff
Thu, May 23, 7:14 AM
F13226531: D8732.id20711.diff
Sun, May 19, 9:22 PM
F13226177: D8732.id.diff
Sun, May 19, 7:24 PM
F13206331: D8732.id.diff
Wed, May 15, 7:11 AM
F13206142: D8732.diff
Wed, May 15, 5:31 AM
F13192723: D8732.diff
Sun, May 12, 9:29 AM
Subscribers

Details

Summary

I changed the way arc tasks was checking to see if a maniphest task was closed from looking for a non-empty status to looking for the isClosed property submitted in D8731.

Test Plan

Run arc tasks and check that the tasks show open/closed correctly.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

bwinterton retitled this revision from to Changed checking for a closed task in `arc tasks` to look for the isClosed property instead of a non-empty status.
bwinterton updated this object.
bwinterton edited the test plan for this revision. (Show Details)
bwinterton added a reviewer: epriestley.
src/workflow/ArcanistTasksWorkflow.php
157–180

As per discussion in D8731, let's use statusName instead of "Closed" and "Open".

Let's also put an:

if (isset($task['isClosed'])) { ... }

...check around this whole block, so if newer arc makes a request to out-of-date Phabricator we just don't render the column, instead of hitting an error. I don't think this is worth retaining full backward compatibility over, but dropping the column seems like a reasonable compromise in the case of version mismatches.

bwinterton edited edge metadata.

Added the changes requested by epriestley.
Now arc tasks shows the actual human-readable status and a green bar for open or red bar for closed. Also, if there is a newer version of arc using an older version of phabricator, the status column will not be displayed so that we do not have any errors thrown.

  • Changed the display of Closed/Open on the tasks to represent their actual status names, leaving a green bar for open and red bar for closed
  • Placed the rendering of the task status column in an isset check for the isClosed property. This way if there is a newer version of arc with an older phabricator, the column will not be rendered instead of throwing an error
  • Added an empty status key to the output variable with lenght of 0 so that we do not get errors thrown for non existant variables later on during the rendering of the information
This revision is now accepted and ready to land.Apr 9 2014, 2:48 PM
epriestley updated this revision to Diff 20711.

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