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
Unknown Object (File)
Mon, May 6, 2:07 AM
Unknown Object (File)
Tue, Apr 30, 3:11 PM
Unknown Object (File)
Sun, Apr 28, 11:50 AM
Unknown Object (File)
Sun, Apr 28, 11:50 AM
Unknown Object (File)
Sun, Apr 28, 11:49 AM
Unknown Object (File)
Sun, Apr 28, 11:49 AM
Unknown Object (File)
Fri, Apr 26, 3:36 PM
Unknown Object (File)
Mon, Apr 22, 4:49 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
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).