From b0f9d6bee75c39e06e57a8e29884c3c5f8cc4179 Mon Sep 17 00:00:00 2001 From: jdhitsolutions Date: Fri, 23 Feb 2024 10:03:58 -0500 Subject: [PATCH] v1.8.0 --- License.txt | 2 +- PSWorkItem.psd1 | 8 +- PSWorkItem.psm1 | 9 +- README.md | 34 ++-- changelog.md | 22 ++- docs/Add-PSWorkItemCategory.md | 2 +- docs/Complete-PSWorkItem.md | 4 +- docs/Get-PSWorkItem.md | 16 +- docs/Get-PSWorkItemArchive.md | 4 +- docs/Get-PSWorkItemCategory.md | 6 +- docs/Get-PSWorkItemData.md | 4 +- docs/Get-PSWorkItemDatabase.md | 4 +- docs/Get-PSWorkItemPreference.md | 4 +- docs/Get-PSWorkItemReport.md | 2 +- docs/Initialize-PSWorkItemDatabase.md | 4 +- docs/New-PSWorkItem.md | 4 +- docs/Open-PSWorkItemConsole.md | 4 +- docs/Remove-PSWorkItem.md | 4 +- docs/Remove-PSWorkItemArchive.md | 6 +- docs/Remove-PSWorkItemCategory.md | 2 +- docs/Set-PSWorkItem.md | 6 +- docs/Set-PSWorkItemCategory.md | 12 +- docs/Update-PSWorkItemDatabase.md | 2 +- docs/Update-PSWorkItemPreference.md | 4 +- docs/about_PSWorkItem.md | 171 ++++++++++++++++ en-us/PSWorkItem-help.xml | 16 +- en-us/PSWorkItem.psd1 | 2 + en-us/about_PSWorkItem.help.txt | 207 ++++++++++++++++++++ functions/private/tui-helpers.ps1 | 1 + functions/public/Open-PSWorkItemConsole.ps1 | 3 +- 30 files changed, 495 insertions(+), 74 deletions(-) create mode 100644 docs/about_PSWorkItem.md create mode 100644 en-us/about_PSWorkItem.help.txt diff --git a/License.txt b/License.txt index a205295..5b06281 100644 --- a/License.txt +++ b/License.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022-2023 JDH Information Technology Solutions, Inc. +Copyright (c) 2022-2024 JDH Information Technology Solutions, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/PSWorkItem.psd1 b/PSWorkItem.psd1 index 67fd928..ed821bc 100644 --- a/PSWorkItem.psd1 +++ b/PSWorkItem.psd1 @@ -4,17 +4,17 @@ @{ RootModule = 'PSWorkItem.psm1' - ModuleVersion = '1.7.0' + ModuleVersion = '1.8.0' CompatiblePSEditions = 'Core' GUID = '4d3ff215-69ea-4fe6-8ad6-97ffc3a15bfb' Author = 'Jeff Hicks' CompanyName = 'JDH Information Technology Solutions, Inc.' Copyright = '(c) JDH Information Technology Solutions, Inc. All rights reserved.' - Description = 'A PowerShell 7 module for managing work and personal tasks or to-do items. This module uses a SQLite database to store task and category information. The module is not a full-featured project management solution, but should be fine for personal needs. The module requires a 64-bit Windows platform.' + Description = 'A PowerShell 7 module for managing work and personal tasks or to-do items. This module uses a SQLite database to store task and category information. The module is not a full-featured project management solution, but should be fine for personal needs. The module requires a 64-bit Windows or Linux platform.' PowerShellVersion = '7.3' DotNetFrameworkVersion = '4.6' ProcessorArchitecture = 'Amd64' - RequiredModules = "mySQLite" + RequiredModules = 'mySQLite' TypesToProcess = @( 'types\psworkitem.types.ps1xml', 'types\psworkitemarchive.types.ps1xml' @@ -59,7 +59,7 @@ # ReleaseNotes = '' # Prerelease = '' # RequireLicenseAcceptance = $false - ExternalModuleDependencies = "MySQLite" + ExternalModuleDependencies = 'mySQLite' } # End of PSData hashtable } # End of PrivateData hashtable diff --git a/PSWorkItem.psm1 b/PSWorkItem.psm1 index 3fb91ba..16d24f0 100644 --- a/PSWorkItem.psm1 +++ b/PSWorkItem.psm1 @@ -7,11 +7,12 @@ if ((Get-Culture).Name -match "\w+") { } else { #force using En-US if no culture found, which might happen on non-Windows systems. - Import-LocalizedData -BindingVariable strings -FileName PSWorkItem.psd1 -BaseDirectory .\en-us + Import-LocalizedData -BindingVariable strings -FileName PSWorkItem.psd1 -BaseDirectory $PSScriptRoot\en-us } -if (-Not $ISWindows) { - Write-Warning $Strings.WindowsOnly +#Adding a failsafe check for Windows PowerShell +if ($IsMacOS -or ($PSEdition -eq "Desktop")) { + Write-Warning $Strings.Unsupported #bail out Return } @@ -47,7 +48,7 @@ foreach ($dll in $dlls) { Switch ($Name) { "NStack.dll" { #get currently loaded version - $ver = [System.Reflection.Assembly]::GetAssembly([nstack.ustring]).GetName().version + $ver = [System.Reflection.Assembly]::GetAssembly([NStack.uString]).GetName().version if ($ver -lt $NStackVersion) { $Detail = $strings.WarnDetected -f $ver,$NStackVersion,$PSStyle.Foreground.Red,$PSStyle.Foreground.Green,$PSStyle.Italic,$PSStyle.Reset } diff --git a/README.md b/README.md index 7a8020d..fc2377a 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ [![PSGallery Version](https://img.shields.io/powershellgallery/v/PSWorkItem.png?style=for-the-badge&label=PowerShell%20Gallery)](https://www.powershellgallery.com/packages/PSWorkItem/) [![PSGallery Downloads](https://img.shields.io/powershellgallery/dt/PSWorkItem.png?style=for-the-badge&label=Downloads)](https://www.powershellgallery.com/packages/PSWorkItem/) -This module is a replacement for the [MyTasks](https://github.com/jdhitsolutions/MyTasks) module. The original PowerShell module offered simple task or to-do management. All data was stored in XML files. This module conceptually is designed the same way but instead uses a SQLite database file. The module commands are wrapped around functions from the MySQLite module. +This module is a replacement for the [MyTasks](https://github.com/jdhitsolutions/MyTasks) module. The original PowerShell module offered simple tasks or to-do management. All data was stored in XML files. This module conceptually is designed the same way but instead uses a SQLite database file. The module commands are wrapped around functions from the [MySQLite](https://github.com/jdhitsolutions/MySQLite) module. ## Installation -This module requires __PowerShell 7.3__ or later and a 64-bit version of PowerShell, which I assume most people are running. __The module requires a Windows platform__ until the dependency SQLite module [supports non-Windows systems](https://github.com/jdhitsolutions/MySQLite/issues/21). +This module requires __PowerShell 7.3__ or later and a 64-bit version of PowerShell, which I assume most people are running. __The module requires a Windows or Linux platform__ until the dependency SQLite module [supports other non-Windows systems](https://github.com/jdhitsolutions/MySQLite/issues/21). Install the PSWorkItem module from the PowerShell Gallery. @@ -14,11 +14,11 @@ Install the PSWorkItem module from the PowerShell Gallery. Install-Module PSWorkItem [-scope CurrentUser] ``` -:heavy_exclamation_mark: Module installation will also install the required [MySQLite](https://github.com/jdhitsolutions/MySQLite) module from the PowerShell Gallery. +:heavy_exclamation_mark: Module installation will also install the required [MySQLite](https://github.com/jdhitsolutions/MySQLite) module from the PowerShell Gallery. Linux support was added in `MySQLite v0.13.0`. ## PSWorkItem Database Change -**If you were using a version of this module prior to v1.0.0, this note applies to you.** +**If you were using a version of this module older than v1.0.0, this note applies to you.** >Version 1.0.0 of the PSWorkItem module introduced a structural change to the database tables. If you are using a database created in an earlier version, you need to run [Update-PSWorkItemDatabase](docs/Update-PSWorkItemDatabase.md) before adding, changing, or completing work items. You should back up your database file before running this command. > Alternatively, you could export your work items, delete the database file, initialize a new one, and re-import your work items. @@ -37,6 +37,7 @@ Install-Module PSWorkItem [-scope CurrentUser] - [Get-PSWorkItemReport](docs/Get-PSWorkItemReport.md) - [Initialize-PSWorkItemDatabase](docs/Initialize-PSWorkItemDatabase.md) - [New-PSWorkItem](docs/New-PSWorkItem.md) +- [Open-PSWorkItemConsole](docs/Open-PSWorkItemConsole.md) - [Remove-PSWorkItem](docs/Remove-PSWorkItem.md) - [Remove-PSWorkItemArchive](docs/Remove-PSWorkItemArchive.md) - [Remove-PSWorkItemCategory](docs/Remove-PSWorkItemCategory.md) @@ -61,7 +62,7 @@ ColumnIndex ColumnName ColumnType 8 completed integer ``` -When items are queried from this table using `Get-PSWorkItem` they are written to the pipeline as a `PSWorkItem` object. This is a class-based object defined in the root module. +When items are queried from this table using `Get-PSWorkItem` they are written to the pipeline as `PSWorkItem` objects. This is a class-based object defined in the root module. > These definitions were revised for v1.0.0. @@ -109,7 +110,7 @@ ColumnIndex ColumnName ColumnType You __must__ define categories with `Add-PSWorkItemCategory` before you can create a new task. Categories are written to the pipeline as `PSWorkItemCategory` objects, also defined with a PowerShell class. -```powershell +```shell class PSWorkItemCategory { [String]$Category [String]$Description @@ -135,7 +136,7 @@ To get started, run `Initialize-PSWorkItemDatabase`. This will create a new data You can view a database summary with `Get-PSWorkItemDatabase`. -```powershell +```shell PS C:\> Get-PSWorkItemDatabase Path: C:\Users\Jeff\PSWorkItem.db [44KB] @@ -155,7 +156,7 @@ Add-PSWorkItemCategory -Category "SRV" -Description "server management tasks" Use `Get-PSWorkItemCategory` to view your categories. -```powershell +```shell PS C:\> Get-PSWorkItemCategory Category Description @@ -172,7 +173,7 @@ If you need to update a category, you can re-add it using `-Force`. > The category name is case-sensitive. -```powershell +```shell PS C:\> Add-PSWorkItemCategory -Category Work -Description "business-related tasks" -PassThru -Force Category Description @@ -245,7 +246,7 @@ Category highlighting is only available in the default view. Use [Set-PSWorkItem](docs/Set-PSWorkItem.md) or its alias `swi` to update a task based on its ID. -```powershell +```shell PS C:\> Set-PSWorkItem -id 7 -Progress 30 -DueDate "8/15/2023 12:00PM" -PassThru Database: C:\Users\Jeff\PSWorkItem.db @@ -259,7 +260,7 @@ ID Name Description DueDate Category Pct When a task is complete, you can move it to the `Archive` table. -```powershell +```shell PS C:\> Complete-PSWorkItem -id 7 -PassThru Database: C:\Users\Jeff\PSWorkItem.db @@ -288,7 +289,7 @@ Beginning with v1.0.0, you can use [Remove-PSWorkItemArchive](docs/Remove-PSWork You can use [Get-PSWorkItemReport](docs/Get-PSWorkItemReport.md) to get a summary report of open work items grouped by category. -```powershell +```shell PS C:\> Get-PSWorkItemReport Path: C:\Users\Jeff\PSWorkItem.db @@ -352,7 +353,7 @@ $global:PSDefaultParameterValues["New-PSWorkItem:Category"] = $importPref.Defaul Use `Get-PSWorkItemPreference` to view. -```powershell +```shell PS C:\> Get-PSWorkItemPreference Path: C:\Users\Jeff\PSWorkItem.db [Default Days: 7 Default Category: Work] @@ -369,7 +370,7 @@ Personal `e[32m The categories are only those where you have customized an ANSI sequence. On module import, these categories will be used to populate `$PSWorkItemCategory.` If you make any changes to your preference, re-run `Update-PSWorkItemPreference`. -> It is possible you will need to manually delete the JSON preferences file if you uninstall the module. +> You might need to manually delete the JSON preferences file if you uninstall the module. ## Database Backup @@ -379,7 +380,7 @@ This module has no specific commands for backing up or restoring a database file Export-MySQLiteDB -path $PSWorkItemPath -Destination d:\backups\pwi.json ``` -Use `Import-MySQLiteDB` to import the file and rebuild the database file. When restoring a database file, you should restore the file to a new location, verify the database, then copy the file to `$PSWorkItemPath`. +Use `Import-MySQLiteDB` to import the file and rebuild the database file. When restoring a database file, you should restore the file to a new location, verify the database, and then copy the file to `$PSWorkItemPath`. ## Database Sample @@ -391,7 +392,7 @@ If you copy the sample to `$PSWorkItemPath`, delete the file before creating you Most of the commands in this module create custom objects derived from PowerShell [class definitions](PSWorkItem.psm1) and data in the SQLite database file. If you need to troubleshoot a problem, you can use `Get-PSWorkItemData` to select all data from one of the three tables. -```powershell +```shell PS C:\> Get-PSWorkItemData taskid : 2196617b-b818-415d-b9cc-52b0c649a77e @@ -410,6 +411,5 @@ rowid : 19 ## Future Tasks or Commands - Password protection options. -- Update the TUI management console to show database details If you have an enhancement suggestion, please submit it as an [Issue](https://github.com/jdhitsolutions/PSWorkItem/issues). diff --git a/changelog.md b/changelog.md index a50a840..fd08b41 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,25 @@ ## [Unreleased] +## [1.8.0] - 2024-02-23 + +### Added + +- Added `mySQLite` module version to the About display in `Open-POSWorkItemConsole`. +- Added an `about_psworkitem` help topic +- Added support for running on Linux-x64 platforms. + +### Changed + +- Updated `Open-PSWorkItemConsole` to use the `$PSWorkItemDefaultDays` value instead of the hard-coded 30. +- Updated help documentation +- Updated `README.md`. +- Revised module description. + +### Fixed + +- Fixed bug importing localized data on non-Windows systems. + ## [1.7.0] - 2024-01-07 ### Changed @@ -280,7 +299,8 @@ This is a major update with significant changes. If this is your first time inst - Initial files - Created Module outline -[Unreleased]: https://github.com/jdhitsolutions/PSWorkItem/compare/v1.7.0..HEAD +[Unreleased]: https://github.com/jdhitsolutions/PSWorkItem/compare/v1.8.0..HEAD +[1.8.0]: https://github.com/jdhitsolutions/PSWorkItem/compare/v1.7.0..v1.8.0 [1.7.0]: https://github.com/jdhitsolutions/PSWorkItem/compare/v1.5.0..v1.7.0 [1.5.0]: https://github.com/jdhitsolutions/PSWorkItem/compare/v1.4.0..v1.5.0 [1.4.0]: https://github.com/jdhitsolutions/PSWorkItem/compare/v1.3.1..v1.4.0 diff --git a/docs/Add-PSWorkItemCategory.md b/docs/Add-PSWorkItemCategory.md index 9bdacad..c88ef58 100644 --- a/docs/Add-PSWorkItemCategory.md +++ b/docs/Add-PSWorkItemCategory.md @@ -28,7 +28,7 @@ It is recommended that you use proper casing for your category names and that th ### Example 1 -```powershell +```shell PS C:\> Add-PSWorkItemCategory -Name Blog -Description "blog management and content" -PassThru Category Description diff --git a/docs/Complete-PSWorkItem.md b/docs/Complete-PSWorkItem.md index 10dbbb2..2bdf940 100644 --- a/docs/Complete-PSWorkItem.md +++ b/docs/Complete-PSWorkItem.md @@ -25,7 +25,7 @@ When you are ready to mark a task as complete, use this command. Complete-PSWork ### Example 1 -```powershell +```shell PS C:\> Complete-PSWorkItem -id 9 -PassThru Database: C:\Users\Jeff\PSWorkItem.db @@ -38,7 +38,7 @@ Mark a PSWorkItem as completed and move it to the Archive table. The PSWorkItem ### Example 2 -```powershell +```shell PS C:\> Get-PSWorkItem -category Alpha | Complete-WorkItem ``` diff --git a/docs/Get-PSWorkItem.md b/docs/Get-PSWorkItem.md index 67bed1c..994c8fd 100644 --- a/docs/Get-PSWorkItem.md +++ b/docs/Get-PSWorkItem.md @@ -51,7 +51,7 @@ This command will retrieve PSWorkItems from the database using a parameter defin ### Example 1 -```powershell +```shell PS C:\> Get-PSWorkItem Database: C:\Users\Jeff\PSWorkItem.db @@ -67,7 +67,7 @@ Get all items due in the next 10 days. ### Example 2 -```powershell +```shell PS C:\> Get-PSWorkItem -all Database: C:\Users\Jeff\PSWorkItem.db @@ -86,7 +86,7 @@ Get all open tasks. ### Example 3 -```powershell +```shell PS C:\> Get-PSWorkItem -Category Work Database: C:\Users\Jeff\PSWorkItem.db @@ -102,7 +102,7 @@ Get tasks from the Work category. ### Example 4 -```powershell +```shell PS C:\> Get-PSWorkItem -id 9 Database: C:\Users\Jeff\PSWorkItem.db @@ -116,7 +116,7 @@ Get a PSWorkItem by its ID. ### Example 5 -```powershell +```shell PS C:\> Get-PSWorkItem -Name p* Database: C:\Users\Jeff\PSWorkItem.db @@ -131,7 +131,7 @@ Get PSWorkItems with a name that begins with P. ### Example 6 -```powershell +```shell PS C:\> Get-PSWorkItem | Format-Table -View countdown ID Name Description DueDate TimeRemaining @@ -145,7 +145,7 @@ The PSWorkItem has a named table view called Countdown. ### Example 7 -```powershell +```shell PS C:\> Get-PSWorkItem | Where Overdue Database: C:\Users\Jeff\PSWorkItem.db @@ -161,7 +161,7 @@ Get all overdue PSWorkItems. ### Example 8 -```powershell +```shell PS C:\> Get-PSWorkItem -all | Sort-Object category | Format-Table -view category Category: Other diff --git a/docs/Get-PSWorkItemArchive.md b/docs/Get-PSWorkItemArchive.md index d13897a..709dfd5 100644 --- a/docs/Get-PSWorkItemArchive.md +++ b/docs/Get-PSWorkItemArchive.md @@ -39,7 +39,7 @@ Completed PSWorkItems are moved to the Archive table. Using this command to view ### Example 1 -```powershell +```shell PS C:\> Get-PSWorkItemArchive Database: C:\Users\Jeff\PSWorkItem.db @@ -58,7 +58,7 @@ Get all archived PSWorkItems. ### Example 2 -```powershell +```shell PS C:\> Get-PSWorkItemArchive -Category Personal Database: C:\Users\Jeff\PSWorkItem.db diff --git a/docs/Get-PSWorkItemCategory.md b/docs/Get-PSWorkItemCategory.md index ffe154c..32ea95b 100644 --- a/docs/Get-PSWorkItemCategory.md +++ b/docs/Get-PSWorkItemCategory.md @@ -25,7 +25,7 @@ When you create a PSWorkItem, you need to tag it with a category. The category m ### Example 1 -```powershell +```shell PS C:\> Get-PSWorkItemCategory Category Description @@ -45,7 +45,7 @@ Get all defined categories. ### Example 2 -```powershell +```shell PS C:\> Get-PSWorkItemCategory blog Category Description @@ -57,7 +57,7 @@ Get information about a single category. ### Example 3 -```powershell +```shell PS C:\> Get-PSWorkItemCategory | Select-Object Category,ANSIString Category ANSIString diff --git a/docs/Get-PSWorkItemData.md b/docs/Get-PSWorkItemData.md index f0ddb9f..4973c75 100644 --- a/docs/Get-PSWorkItemData.md +++ b/docs/Get-PSWorkItemData.md @@ -25,7 +25,7 @@ Most of the time you will use commands like Get-PSWorkItem to get data from the ### Example 1 -```powershell +```shell PS C:\> Get-PSWorkItemData | Out-GridView ``` @@ -33,7 +33,7 @@ Get all data from the Tasks table and display using Out-GridView. ### Example 2 -```powershell +```shell PS C:\> Get-PSWorkItemData Categories category description rowid diff --git a/docs/Get-PSWorkItemDatabase.md b/docs/Get-PSWorkItemDatabase.md index a119eea..27d2e50 100644 --- a/docs/Get-PSWorkItemDatabase.md +++ b/docs/Get-PSWorkItemDatabase.md @@ -25,7 +25,7 @@ Use this command to get a summary of the PSWorkItem database file. You can not m ### Example 1 -```powershell +```shell PS C:\> Get-PSWorkItemDatabase Path: C:\Users\Jeff\PSWorkItem.db [44KB] @@ -39,7 +39,7 @@ The default summary. ### Example 2 -```powershell +```shell PS C:\> Get-PSWorkItemDatabase | Format-List Path : C:\Users\Jeff\PSWorkItem.db diff --git a/docs/Get-PSWorkItemPreference.md b/docs/Get-PSWorkItemPreference.md index df3b54e..6c05a75 100644 --- a/docs/Get-PSWorkItemPreference.md +++ b/docs/Get-PSWorkItemPreference.md @@ -19,13 +19,13 @@ Get-PSWorkItemPreference [] ## DESCRIPTION -You can use Update-PSWorkItemPreference to export the $PSWorkitemCategory and your default database to a settings file in $HOME. Use Get-PSWorkItemPreferences to view the file. +You can use Update-PSWorkItemPreference to export the $PSWorkitemCategory and your default database to a settings file in $HOME. Use Get-PSWorkItemPreference to view the file. ## EXAMPLES ### Example 1 -```powershell +```shell PS C:\> Get-PSWorkItemPreference Path: C:\Users\Jeff\PSWorkItem.db [Default Days: 7 Default Category: Work] diff --git a/docs/Get-PSWorkItemReport.md b/docs/Get-PSWorkItemReport.md index b7d5320..d843ad8 100644 --- a/docs/Get-PSWorkItemReport.md +++ b/docs/Get-PSWorkItemReport.md @@ -25,7 +25,7 @@ Use this simple command to get a report of PSWorkItems by category. The percenta ### Example 1 -```powershell +```shell PS C:\> Get-PSWorkItemReport Path: C:\Users\Jeff\PSWorkItem.db diff --git a/docs/Initialize-PSWorkItemDatabase.md b/docs/Initialize-PSWorkItemDatabase.md index 044c64c..b957953 100644 --- a/docs/Initialize-PSWorkItemDatabase.md +++ b/docs/Initialize-PSWorkItemDatabase.md @@ -29,7 +29,7 @@ The setup will also define the default categories of Work, Personal, Project, an ### Example 1 -```powershell +```shell PS C:\> Initialize-PSWorkItemDatabase ``` @@ -37,7 +37,7 @@ Create a new database file. ### Example 2 -```powershell +```shell PS C:\> Initialize-PSWorkItemDatabase -PassThru Database: C:\Users\jeff\PSWorkItem.db Table:Metadata diff --git a/docs/New-PSWorkItem.md b/docs/New-PSWorkItem.md index 6d04d05..7c51986 100644 --- a/docs/New-PSWorkItem.md +++ b/docs/New-PSWorkItem.md @@ -33,7 +33,7 @@ Use this command to add a new PSWorkItem to the database. It is assumed you have ### Example 1 -```powershell +```shell PS C:\> New-PSWorkItem -Name "Blog updates" -Description "update pages" -DueDate "8/15/2023 5:00PM" -Category Blog -PassThru ``` @@ -41,7 +41,7 @@ Create a new PSWorkItem with a due date 30 days from now. You should be able to ### Example 2 -```powershell +```shell PS C:\> New-PSWorkItem -Name "Publish PSWorkItem" -DaysDue 3 -Category Project ``` diff --git a/docs/Open-PSWorkItemConsole.md b/docs/Open-PSWorkItemConsole.md index 17b6880..55809b6 100644 --- a/docs/Open-PSWorkItemConsole.md +++ b/docs/Open-PSWorkItemConsole.md @@ -31,7 +31,7 @@ You can also enter a different database path by entering the path in the Databas ### Example 1 -```powershell +```shell PS C:\> Open-PSWorkItemConsole ``` @@ -39,7 +39,7 @@ Open the management console using the default $PSWorkItemPath variable. You can ### Example 2 -```powershell +```shell PS C:\ OpenPSWorkItemConsole c:\work\personal.db ``` diff --git a/docs/Remove-PSWorkItem.md b/docs/Remove-PSWorkItem.md index f25d87e..03dc3f4 100644 --- a/docs/Remove-PSWorkItem.md +++ b/docs/Remove-PSWorkItem.md @@ -25,7 +25,7 @@ If you want to delete a PSWorkItem from the database, use Remove-PSWorkItem. You ### Example 1 -```powershell +```shell PS C:\> Remove-PSWorkItem -ID 10 ``` @@ -33,7 +33,7 @@ Remove the PSWorkItem with an ID of 10. ### Example 2 -```powershell +```shell PS C:\> Get-PSWorkItem -Category Testing | Remove-PSWorkItem ``` diff --git a/docs/Remove-PSWorkItemArchive.md b/docs/Remove-PSWorkItemArchive.md index 36bd32a..3576801 100644 --- a/docs/Remove-PSWorkItemArchive.md +++ b/docs/Remove-PSWorkItemArchive.md @@ -39,7 +39,7 @@ Completed work items are moved to the Archive table in the PSWorkItem database. ### Example 1 -```powershell +```shell PS C:\> Remove-PSWorkItem -id 7 -Verbose VERBOSE: [12:37:40.2036443 BEGIN ] Remove-PSWorkItem: Starting VERBOSE: [12:37:40.2045322 BEGIN ] Remove-PSWorkItem: PSBoundParameters @@ -61,7 +61,7 @@ Delete an archived item by its ID. ### Example 2 -```powershell +```shell PS C:\> Remove-PSWorkItemArchive -Category work -whatif What if: Performing the operation "Remove-PSWorkItemArchive" on target "7e87a44f-d0ff-4cbc-ad08-ce3bf834b8e0". What if: Performing the operation "Remove-PSWorkItemArchive" on target "02290cca-5e59-45f7-a2d9-9f34bf51817e". @@ -73,7 +73,7 @@ Remove archived items based on a category. ### Example 3 -```powershell +```shell PS C:\> Remove-PSWorkItemArchive -name *report ``` diff --git a/docs/Remove-PSWorkItemCategory.md b/docs/Remove-PSWorkItemCategory.md index 377d8c6..4345907 100644 --- a/docs/Remove-PSWorkItemCategory.md +++ b/docs/Remove-PSWorkItemCategory.md @@ -25,7 +25,7 @@ If you make a mistake entering a category or want to remove one of the default P ### Example 1 -```powershell +```shell PS C:\> Remove-PSWorkItemCategory Temp ``` diff --git a/docs/Set-PSWorkItem.md b/docs/Set-PSWorkItem.md index 5a223e2..13a50fc 100644 --- a/docs/Set-PSWorkItem.md +++ b/docs/Set-PSWorkItem.md @@ -36,7 +36,7 @@ If you want to clear the Description, use the -ClearDescription parameter. All o ### Example 1 -```powershell +```shell PS C:\> Set-PSWorkItem -id 3 -progress 10 ``` @@ -44,7 +44,7 @@ Set the progress on a PSWorkItem. ### Example 2 -```powershell +```shell PS C:\> Get-PSWorkItem -Category blog | Set-PSWorkItem -Category Other -PassThru Database: C:\Users\Jeff\PSWorkItem.db @@ -59,7 +59,7 @@ Modify multiple PSWorkItems at the same time. ### Example 3 -```powershell +```shell PS C:\ Set-PSWorkItem -id 5 -ClearDescription ``` diff --git a/docs/Set-PSWorkItemCategory.md b/docs/Set-PSWorkItemCategory.md index 511e023..7fe9c5b 100644 --- a/docs/Set-PSWorkItemCategory.md +++ b/docs/Set-PSWorkItemCategory.md @@ -22,11 +22,15 @@ Set-PSWorkItemCategory [-Category] [-Description ] This command will update an existing PSWorkItem category. The category name is case-sensitive. Use caution when renaming a category that has active tasks using the old category name. +If you want to modify the associated ANSI color, you will need to add or modify an entry in the $PSWorkItemCategory hashtable. + +$PSWorkItemCategory.Add("Event","`e[38;5;225m") + ## EXAMPLES ### Example 1 -```powershell +```shell PS C:\> Set-PsworkItemCategory -Category work -Description "Uncategorized work activities" -PassThru Category Description @@ -46,7 +50,7 @@ Parameter Sets: (All) Aliases: Name Required: True -Position: 0 +Position: 0sq Default value: None Accept pipeline input: True (ByValue) Accept wildcard characters: False @@ -175,3 +179,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable [Get-PSWorkItemCategory](Get-PSWorkItemCategory.md) [Remove-PSWorkItemCategory](Remove-PSWorkItemCategory.md) + +[Get-PSWorkItemPreference](Get-PSWorkItemPreference.md) + +[Update-PSWorkItemPreference](Update-PSWorkItemPreference.md) diff --git a/docs/Update-PSWorkItemDatabase.md b/docs/Update-PSWorkItemDatabase.md index abfb969..98007a2 100644 --- a/docs/Update-PSWorkItemDatabase.md +++ b/docs/Update-PSWorkItemDatabase.md @@ -29,7 +29,7 @@ During the upgrade, a new table column called ID is added to the Tasks and Archi ### Example 1 -```powershell +```shell PS C:\> New-PSWorkItem -Name "DOM1 backup" -DaysDue 3 -Category work WARNING: Cannot verify the tasks table column ID. Please run Update-PSWorkItemDatabase to update the table then try completing the command again. It is recommended that you backup your database before updating the table. PS C:\> Update-PSWorkItemDatabase -verbose diff --git a/docs/Update-PSWorkItemPreference.md b/docs/Update-PSWorkItemPreference.md index d554da2..dd1dff9 100644 --- a/docs/Update-PSWorkItemPreference.md +++ b/docs/Update-PSWorkItemPreference.md @@ -29,7 +29,7 @@ You may need to manually delete the preferences JSON file if you uninstall the m ### Example 1 -```powershell +```shell PS C:\> Update-PSWorkItemPreference ``` @@ -37,7 +37,7 @@ This assumes you've customized category settings or the database path. ### Example 2 -```powershell +```shell PS C:\> Update-PSWorkItemPreference -DefaultCategory Work ``` diff --git a/docs/about_PSWorkItem.md b/docs/about_PSWorkItem.md new file mode 100644 index 0000000..5b93612 --- /dev/null +++ b/docs/about_PSWorkItem.md @@ -0,0 +1,171 @@ +# PSWorkItem + +## about_PSWorkItem + +# SHORT DESCRIPTION + +This module is a replacement for the MyTasks (https://github.com/jdhitsolutions/MyTasks) module. The original PowerShell module offered simple tasks or to-do management. All data was stored in XML files. This module conceptually is designed the same way but instead uses a SQLite database file. The module commands are wrapped around functions from the MySQLite (https://github.com/jdhitsolutions/MySQLite) module. + +# LONG DESCRIPTION + +The module is based on three tables in a SQLite database file. The primary `Tasks` table is where active items are stored. When items are queried from this table using `Get-PSWorkItem` they are written to the pipeline as `PSWorkItem` objects. Each task or `PSWorkItem` must have an associated category. These are stored in the `Categories` table. + +You __must__ define categories with `Add-PSWorkItemCategory` before you can create a new task. Categories are written to the pipeline as `PSWorkItemCategory` objects, also defined with a PowerShell class. + +When a task is complete, you can use `Complete-PSWorkItem` to update the task as completed. This command will copy the task to the `Archive` table, which has the same layout as the `Tasks` table, and then delete it from `Tasks`. + +### PSWorkItemPath + +The module defines a global variable, `$PSWorkItemPath`, which points to the database file. The default file is `$HOME\PSWorkItem.db`. This variable is used as the default `Path` parameter on all module commands. If you want to change it, do so in your PowerShell profile. + +Because everything is stored in a single database file, advanced users could set up multiple PSWorkItem systems. It is up to the user to keep track of database paths. + +## Creating a New Database + +To get started, run `Initialize-PSWorkItemDatabase`. This will create a new database file and set default categories of Work, Personal, Project, and Other. By default, the new database will be created using the value of `$PSWorkItemPath`. + +You can view a database summary with `Get-PSWorkItemDatabase`. + +## Categories + +To add a new category, you must specify a category name. The description is optional. The category will be defined exactly as you enter it, so watch casing. + +Use `Get-PSWorkItemCategory` to view your categories. If you need to update a category, you can re-add it using `-Force`. The category name is case-sensitive. + +## Adding a Task + +Use `New-PSWorkItem` to define a task. You need to specify a name and category. You must specify a valid, pre-defined category. By default, the task will be configured with a due date of 30 days from now. You can specify a different datetime or specify the number of days from now. + +## Viewing Tasks + +The primary command in this module, `Get-PSWorkItem`, which has an alias of `gwi`, has several parameter sets to help you select PSWorkItems. + +- `Get-PSWorkItem [-All] [-Path ]` +- `Get-PSWorkItem [-Category ] [-Path ]` +- `Get-PSWorkItem [-DaysDue ] [-Path ]` +- `Get-PSWorkItem [-ID ] [-Path ]` +- `Get-PSWorkItem [[-Name] ] [-Path ]` + +The default behavior is to get tasks due within the next ten days + +If you are running the command in the PowerShell console or VSCode, overdue tasks will be highlighted in red. Tasks due within three days will be highlighted in yellow. + +Read the examples for `Get-PSWorkItem` for other ways to use this command, including custom format views. + +### PSWorkItemCategory + +In addition to formatting overdue and imminent due dates, the module also provides a mechanism to add highlighting for specific categories. Importing the module will create a global variable called `PSWorkItemCategory`. The key will be a category name. The value will be a $PSStyle or ANSI escape sequence. + +You can modify this hashtable as you would any other hashtable. + +```shell +$PSWorkItemCategory.Add("Event","`e[38;5;153m") +``` + +The entry will have no effect unless the category is defined in the database. The category customizations last for the duration of your PowerShell session or until the module is removed. Add your customizations to your PowerShell profile script or use `Update-PSWorkItemPreference` to save the settings to a JSON file under $HOME. + +Note that when you view the hashtable, you won't see any values because the escape sequences are non-printable. + +## Updating Tasks + +Use `Set-PSWorkItem` or its alias `swi` to update a task based on its ID. + +## Completing Tasks + +When a task is complete, you can move it to the `Archive` table. + +```shell +PS C:\> Complete-PSWorkItem -id 7 +``` + +There are no commands to modify the task after it has been archived, so if you want to update the name, description, or category, do so before marking it as complete. + +`Complete-PSWorkItem` has an alias of `cwi`. + +### Removing a Task + +If you want to delete a task, you can use Remove-PSWorkItem or its alias `rwi`. + +```powershell +Remove-PSWorkItem -id 13 +``` + +This command will delete the item from the Tasks database. + +Beginning with v1.0.0, you can use Remove-PSWorkItemArchive to remove items from the archive table. + +## Reporting + +You can use `Get-PSWorkItemReport` to get a summary report of open work items grouped by category. The percentages for each category are rounded. The percentage for Overdue items is based on all open work items. + +## TUI-Based Management Console + +Version 1.3.0 added a management console based on the Terminal.Gui framework. + +Run Open-PSWorkItemConsole or its alias *`wic`*. The form will open with your default database. You can type a new database path or use the Open Database command under Options. The file must end in `.db`. If you select a different database, you can use `Options - Reset Form` to reset to your default database. + +If you select an item from the table, it will populate the form fields. You can then update, complete, or remove the item. To create a new item, it is recommended that you first clear the form (`Options - Clear Form`). Enter the PSWorkItem details and click the `Add PSWorkItem` button. + +### IMPORTANT + +This command relies on a specific version of the Terminal.Gui assembly. You might encounter version conflicts from modules that use older versions of this assembly like `Microsoft.PowerShell.ConsoleGuiTools`. You may need to load this module first in a new PowerShell session. + +# User Preferences + +The module includes features for the user to save preferences. You might update ANSI sequences for some categories using `$PSWorkItemCategory`. You might have set a different default database path using `$PSWorkItemPath`. Or you might have specified a different value for the number of default days with `$PSWorkItemDefaultDays`. Instead of setting these values in your PowerShell profile, you can export them to a JSON file. + +```powershell +Update-PSWorkItemPreference +``` + +This will create a JSON file in `$HOME` called `.psworkitempref.json`. The settings in this file will be used when importing the module. + +You can also specify a default category for `New-PSWorkItem`. + +```powershell +Update-PSWorkItemPreference -DefaultCategory Work +``` + +The next time you import the module, an entry will be made to `$PSDefaultParameterValues`. + +```powershell +$global:PSDefaultParameterValues["New-PSWorkItem:Category"] = $importPref.DefaultCategory +``` + +Use `Get-PSWorkItemPreference` to view. + +The categories are only those where you have customized an ANSI sequence. On module import, these categories will be used to populate `$PSWorkItemCategory.` If you make any changes to your preference, re-run `Update-PSWorkItemPreference`. + +You might need to manually delete the JSON preferences file if you uninstall the module. + +## Database Backup + +This module has no specific commands for backing up or restoring a database file. But you can use the `Export-MySQLiteDB` command to export the PSWorkItem database file to a JSON file. + +```shell +Export-MySQLiteDB -path $PSWorkItemPath -Destination d:\backups\pwi.json +``` + +Use `Import-MySQLiteDB` to import the file and rebuild the database file. When restoring a database file, you should restore the file to a new location, verify the database, and then copy the file to `$PSWorkItemPath`. + +## Database Sample + +A sample database has been created in the module's Samples directory. You can specify the path to the sample database or copy it to `$PSWorkItemPath` to try the module out. Note that it is very likely that many of the tasks will be flagged as overdue by the time you view the database. + +If you copy the sample to `$PSWorkItemPath`, delete the file before creating your database file. + +## Troubleshooting + +Most of the commands in this module create custom objects derived from PowerShell class definitions and data in the SQLite database file. If you need to troubleshoot a problem, you can use `Get-PSWorkItemData` to select all data from one of the three tables. + +If you have an enhancement suggestion, please submit it as a GitHub issue at https://github.com/jdhitsolutions/PSWorkItem/issues. + +# SEE ALSO + +https://github.com/jdhitsolutions/PSWorkItem + +# KEYWORDS + +- WorkItem +- PSWorkItem +- SQLite diff --git a/en-us/PSWorkItem-help.xml b/en-us/PSWorkItem-help.xml index b546280..1a23038 100644 --- a/en-us/PSWorkItem-help.xml +++ b/en-us/PSWorkItem-help.xml @@ -1560,7 +1560,7 @@ ModifiedAge : 00:46:29.3572634 - You can use Update-PSWorkItemPreference to export the $PSWorkitemCategory and your default database to a settings file in $HOME. Use Get-PSWorkItemPreferences to view the file. + You can use Update-PSWorkItemPreference to export the $PSWorkitemCategory and your default database to a settings file in $HOME. Use Get-PSWorkItemPreference to view the file. @@ -3587,11 +3587,13 @@ ID Name Description DueDate Category Pct This command will update an existing PSWorkItem category. The category name is case-sensitive. Use caution when renaming a category that has active tasks using the old category name. + If you want to modify the associated ANSI color, you will need to add or modify an entry in the $PSWorkItemCategory hashtable. + $PSWorkItemCategory.Add("Event","`e[38;5;225m") Set-PSWorkItemCategory - + Category Specify a case-sensitive category name. There should be tab-completion for this parameter. If you will be specifying an alternate database path, specify the path before using this parameter so that correct categories will be detected. @@ -3675,7 +3677,7 @@ ID Name Description DueDate Category Pct - + Category Specify a case-sensitive category name. There should be tab-completion for this parameter. If you will be specifying an alternate database path, specify the path before using this parameter so that correct categories will be detected. @@ -3823,6 +3825,14 @@ Work Uncategorized work activities Remove-PSWorkItemCategory + + Get-PSWorkItemPreference + + + + Update-PSWorkItemPreference + + diff --git a/en-us/PSWorkItem.psd1 b/en-us/PSWorkItem.psd1 index 59f6711..7999495 100644 --- a/en-us/PSWorkItem.psd1 +++ b/en-us/PSWorkItem.psd1 @@ -47,6 +47,7 @@ ConvertFrom-StringData @' InvalidCategory = The PSWorkItem category {0} is not valid InvalidHost = This must be run in a console host. Detected PowerShell host: {0} MissingName = Oops! You forgot to specify a name for your PSWorkItem. + MissingDependency = Can't find or load the required module {0} MoveItem = Moving PSWorkItem to Archive. NoPreferenceFile = No PSWorkItem preference file found at {0}. Run Update-PSWorkItemPreferences to create it. NoWorkItemSelected = No PSWorkItem selected @@ -83,6 +84,7 @@ ConvertFrom-StringData @' UpdateTaskTable = Updating tasks table values UsingDB = Using SQLite database {0} UsingModule = Using module PSWorkItem version {0} + Unsupported = This module is unsupported on this platform ValidateCategory = Validating PSWorkItem category {0} ValidateMove = Validating the move WarnNoTasksFound = Failed to find any matching open PSWorkItems diff --git a/en-us/about_PSWorkItem.help.txt b/en-us/about_PSWorkItem.help.txt new file mode 100644 index 0000000..6f815b9 --- /dev/null +++ b/en-us/about_PSWorkItem.help.txt @@ -0,0 +1,207 @@ +TOPIC + about_psworkitem + +SHORT DESCRIPTION + This module is a replacement for the MyTasks + (https://github.com/jdhitsolutions/MyTasks) module. The original PowerShell + module offered simple tasks or to-do management. All data was stored in XML + files. This module conceptually is designed the same way but instead uses a + SQLite database file. The module commands are wrapped around functions from + the MySQLite (https://github.com/jdhitsolutions/MySQLite) module. + +LONG DESCRIPTION + The module is based on three tables in a SQLite database file. The primary + Tasks table is where active items are stored. When items are queried from + this table using Get-PSWorkItem they are written to the pipeline as + PSWorkItem objects. Each task or PSWorkItem must have an associated + category. These are stored in the Categories table. + + You must define categories with Add-PSWorkItemCategory before you can + create a new task. Categories are written to the pipeline as + PSWorkItemCategory objects, also defined with a PowerShell class. + When a task is complete, you can use Complete-PSWorkItem to update the + task as completed. This command will copy the task to the Archive table, + which has the same layout as the Tasks table, and then delete it from + Tasks. + + PSWORKITEMPATH + The module defines a global variable, $PSWorkItemPath, which points to the + database file. The default file is $HOME\PSWorkItem.db. This variable is + used as the default Path parameter on all module commands. If you want to + change it, do so in your PowerShell profile. + + Because everything is stored in a single database file, advanced users could + set up multiple PSWorkItem systems. It is up to the user to keep track of + database paths. + +Creating a New Database + To get started, run Initialize-PSWorkItemDatabase. This will create a new + database file and set default categories of Work, Personal, Project, and + Other. By default, the new database will be created using the value of + $PSWorkItemPath. You can view a database summary with Get-PSWorkItemDatabase. + +Categories + To add a new category, you must specify a category name. The description is + optional. The category will be defined exactly as you enter it, so watch casing. + + Use Get-PSWorkItemCategory to view your categories. If you need to update + a category, you can re-add it using -Force. The category name is + case-sensitive. + +Adding a Task + Use New-PSWorkItem to define a task. You need to specify a name and + category. You must specify a valid, pre-defined category. By default, the + task will be configured with a due date of 30 days from now. You can specify + a different datetime or specify the number of days from now. + +Viewing Tasks + The primary command in this module, Get-PSWorkItem, which has an alias of + gwi, has several parameter sets to help you select PSWorkItems. + + - Get-PSWorkItem [-All] [-Path ] + - Get-PSWorkItem [-Category ] [-Path ] + - Get-PSWorkItem [-DaysDue ] [-Path ] + - Get-PSWorkItem [-ID ] [-Path ] + - Get-PSWorkItem [[-Name] ] [-Path ] + + The default behavior is to get tasks due within the next ten days + + If you are running the command in the PowerShell console or VSCode, overdue + tasks will be highlighted in red. Tasks due within three days will be + highlighted in yellow. + + Read the examples for Get-PSWorkItem for other ways to use this command, + including custom format views. + + PSWORKITEMCATEGORY + In addition to formatting overdue and imminent due dates, the module also + provides a mechanism to add highlighting for specific categories. Importing + the module will create a global variable called PSWorkItemCategory. The + key will be a category name. The value will be a $PSStyle or ANSI escape sequence. + + You can modify this hashtable as you would any other hashtable. + + $PSWorkItemCategory.Add("Event","e[38;5;153m") + + The entry will have no effect unless the category is defined in the + database. The category customizations last for the duration of your + PowerShell session or until the module is removed. Add your customizations + to your PowerShell profile script or use Update-PSWorkItemPreference to + save the settings to a JSON file under $HOME. + + Note that when you view the hashtable, you won't see any values because the + escape sequences are non-printable. + +Updating Tasks + Use Set-PSWorkItem or its alias swi to update a task based on its ID. + +Completing Tasks + When a task is complete, you can move it to the Archive table. + + PS C:\> Complete-PSWorkItem -id 7 + + There are no commands to modify the task after it has been archived, so if + you want to update the name, description, or category, do so before marking + it as completed. + + Complete-PSWorkItem has an alias of cwi. + + REMOVING A TASK + If you want to delete a task, you can use Remove-PSWorkItem or its alias + rwi. + + Remove-PSWorkItem -id 13 + + This command will delete the item from the Tasks database. + Beginning with v1.0.0, you can use Remove-PSWorkItemArchive to remove items + from the archive table. + +Reporting + You can use Get-PSWorkItemReport to get a summary report of open work + items grouped by category. The percentages for each category are rounded. + The percentage for Overdue items is based on all open work items. + +TUI-Based Management Console + Version 1.3.0 added a management console based on the Terminal.Gui framework. + Run Open-PSWorkItemConsole or its alias wic. The form will open with your + default database. You can type a new database path or use the Open Database + command under Options. The file must end in .db. If you select a different + database, you can use 'Options - Reset Form' to reset to your default database. + + If you select an item from the table, it will populate the form fields. You + can then update, complete, or remove the item. To create a new item, it is + recommended that you first clear the form (Options - Clear Form). Enter + the PSWorkItem details and click the Add PSWorkItem button. + + IMPORTANT + This command relies on a specific version of the Terminal.Gui assembly. You + might encounter version conflicts from modules that use older versions of + this assembly like Microsoft.PowerShell.ConsoleGuiTools. You may need to + load this module first in a new PowerShell session. + +USER PREFERENCES + The module includes features for the user to save preferences. You might + update ANSI sequences for some categories using $PSWorkItemCategory. You + might have set a different default database path using $PSWorkItemPath. Or + you might have specified a different value for the number of default days + with $PSWorkItemDefaultDays. Instead of setting these values in your + PowerShell profile, you can export them to a JSON file. + + Update-PSWorkItemPreference + + This will create a JSON file in $HOME called .psworkitempref.json. The + settings in this file will be used when importing the module. + You can also specify a default category for New-PSWorkItem. + + Update-PSWorkItemPreference -DefaultCategory Work + + The next time you import the module, an entry will be made to + $PSDefaultParameterValues. + + $global:PSDefaultParameterValues["New-PSWorkItem:Category"] = $importPref.DefaultCategory + + Use Get-PSWorkItemPreference to view. The categories are only those where + you have customized an ANSI sequence. On module import, these categories + will be used to populate $PSWorkItemCategory. If you make any changes to + your preference, re-run Update-PSWorkItemPreference. + + You might need to manually delete the JSON preferences file if + you uninstall the module. + +Database Backup + This module has no specific commands for backing up or restoring a database + file. But you can use the Export-MySQLiteDB command to export the + PSWorkItem database file to a JSON file. + + Export-MySQLiteDB -path $PSWorkItemPath -Destination d:\backups\pwi.json + + Use Import-MySQLiteDB to import the file and rebuild the database file. + When restoring a database file, you should restore the file to a new + location, verify the database, and then copy the file to $PSWorkItemPath. + +Database Sample + A sample database has been created in the module's Samples directory. You + can specify the path to the sample database or copy it to $PSWorkItemPath + to try the module out. Note that it is very likely that many of the tasks + will be flagged as overdue by the time you view the database. + + If you copy the sample to $PSWorkItemPath, delete the file before creating + your database file. + +Troubleshooting + Most of the commands in this module create custom objects derived from + PowerShell class definitions and data in the SQLite database file. If you + need to troubleshoot a problem, you can use Get-PSWorkItemData to select + all data from one of the three tables. + + If you have an enhancement suggestion, please submit it as a GitHub issue at + https://github.com/jdhitsolutions/PSWorkItem/issues. + +SEE ALSO + https://github.com/jdhitsolutions/PSWorkItem + +KEYWORDS +- WorkItem +- PSWorkItem +- SQLite + diff --git a/functions/private/tui-helpers.ps1 b/functions/private/tui-helpers.ps1 index c8187db..9e31e81 100644 --- a/functions/private/tui-helpers.ps1 +++ b/functions/private/tui-helpers.ps1 @@ -385,6 +385,7 @@ Function ShowAbout { $about = @" PSWorkItem $scriptVer +mySQLite $((Get-Module mySQLite).version.ToString()) PSVersion $($PSVersionTable.PSVersion) Terminal.Gui $TerminalGuiVersion NStack $NStackVersion diff --git a/functions/public/Open-PSWorkItemConsole.ps1 b/functions/public/Open-PSWorkItemConsole.ps1 index 8974f0f..b362acd 100644 --- a/functions/public/Open-PSWorkItemConsole.ps1 +++ b/functions/public/Open-PSWorkItemConsole.ps1 @@ -318,7 +318,8 @@ Function Open-PSWorkItemConsole { $controls += $txtDays = [Terminal.Gui.TextField]@{ Width = 4 - Text = 30 + #Updated 23 Feb 2024 to use the $PSWorkItemDefaultDays variable + Text = $global:PSWorkItemDefaultDays Y = $txtDescription.Y + 2 X = $radioGrp.Frame.Width + 2 TabStop = $True