fix(core): correct logic for slash command /spend

ref: #284 c#286
This commit is contained in:
2024-09-14 11:20:47 +09:30
parent 7894ac5522
commit d05537a619
2 changed files with 20 additions and 14 deletions

View File

@ -61,7 +61,12 @@ For this command to process the following conditions must be met:
duration += int(seconds[:-1])
if duration > 0:
if duration == 0:
#ToDo: Add logging that the slash command could not be processed.
return str(match.string[match.start():match.end()])
if str(self._meta.verbose_name).lower() == 'ticket':
@ -77,7 +82,7 @@ For this command to process the following conditions must be met:
user = self.opened_by,
)
if str(self._meta.verbose_name).lower() == 'comment':
elif str(self._meta.verbose_name).lower() == 'comment':
self.duration = duration
@ -87,4 +92,5 @@ For this command to process the following conditions must be met:
return str(match.string[match.start():match.end()])
return None

View File

@ -24,7 +24,7 @@ prepare:
markdown-mkdocs-lint:
PATH=${PATH}:node_modules/.bin markdownlint-cli2 docs/*.md docs/**/*.md docs/**/**/*.md docs/**/**/**/*.md docs/**/**/**/**/**/*.md !CHANGELOG.md !gitlab-ci !website-template
PATH=${PATH}:node_modules/.bin markdownlint-cli2 docs/*.md docs/**/*.md docs/**/**/*.md docs/**/**/**/*.md docs/**/**/**/**/**/*.md !CHANGELOG.md !gitlab-ci !website-template || true
docs-lint: markdown-mkdocs-lint