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.
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T4744: `arc tasks` probably needs an update for user-configurable statuses
- Commits
- rARC7e394dcf11eb: Changed checking for a closed task in `arc tasks` to look for the isClosed…
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
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. |
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
Closed by commit rARC7e394dcf11eb (authored by @bwinterton, committed by @epriestley).