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
F14030071: D8732.id20709.diff
Fri, Nov 8, 11:46 PM
F14023005: D8732.diff
Wed, Nov 6, 9:51 PM
F14015879: D8732.id20711.diff
Mon, Nov 4, 2:10 AM
F14013415: D8732.id20709.diff
Sat, Nov 2, 6:51 AM
F14010672: D8732.diff
Thu, Oct 31, 11:35 AM
F14009457: D8732.id20711.diff
Wed, Oct 30, 6:01 PM
F13982621: D8732.id20709.diff
Sun, Oct 20, 12:42 AM
F13976309: D8732.diff
Fri, Oct 18, 1:42 PM
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
Branch
master
Lint
Lint Passed
Unit
No Test Coverage

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–173

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).