diff options
Diffstat (limited to 'lib/edit.sh')
| -rwxr-xr-x | lib/edit.sh | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/edit.sh b/lib/edit.sh index 19974b1..7abe241 100755 --- a/lib/edit.sh +++ b/lib/edit.sh @@ -172,12 +172,10 @@ function deleteProject() { local idsTaskProject local nameProject - idsTaskProject=$(getIdsTask "$1") + readarray -t idsTaskProject < <(getIdsTask "$1") nameProject=$(getNameProject "$1") - if [[ "${#idsTaskProject[@]}" -eq 0 ]]; then - return - else + if [[ "${#idsTaskProject[@]}" ]]; then task rc.bulk=0 rc.confirmation=off project:"$nameProject" -COMPLETED -DELETED +current delete fi } @@ -198,7 +196,7 @@ function deleteProject() { function recreateProject() { for taskIndex in "${!taskStages[@]}"; do if [[ "$taskIndex" -eq 0 ]]; then - task add "${taskStages[$taskIndex]}" project:"$nameProject" order:$(("$taskIndex" + 2 - 1)) +current + task add "${taskStages[$taskIndex]}" project:"$projectName" order:$(("$taskIndex" + 2 - 1)) +current else task add "${taskStages[$taskIndex]}" project:"$nameProject" depends:"$uuidNewTask" order:$(("$taskIndex" + 2 - 1)) +current fi |
