-
Notifications
You must be signed in to change notification settings - Fork 4
[NAE-2231] Unable to change behavior of taskRef on finish event witho… #307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/6.4.2
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -206,11 +206,12 @@ export abstract class TaskContentService implements OnDestroy { | |||||||
| /** | ||||||||
| * Clears the assignee, start date and finish date from the managed Task. | ||||||||
| */ | ||||||||
| public updateStateData(eventOutcome: TaskEventOutcome): void { | ||||||||
| public updateStateData(eventOutcome: TaskEventOutcome, isStillExecutable: boolean = true): void { | ||||||||
| if (this._task) { | ||||||||
| this._task.user = eventOutcome.task.user; | ||||||||
| this._task.startDate = eventOutcome.task.startDate; | ||||||||
| this._task.finishDate = eventOutcome.task.finishDate; | ||||||||
| this._task.isStillExecutable = isStillExecutable; | ||||||||
| } | ||||||||
| } | ||||||||
|
|
||||||||
|
|
@@ -235,7 +236,7 @@ export abstract class TaskContentService implements OnDestroy { | |||||||
| } | ||||||||
|
|
||||||||
| protected updateField(chFields: ChangedFields, field: DataField<any>, frontendActions: Change, referenced: boolean = false): void { | ||||||||
| if (this._fieldConverterService.resolveType(field) === FieldTypeResource.TASK_REF) { | ||||||||
| if (this._fieldConverterService.resolveType(field) === FieldTypeResource.TASK_REF && (!!this._task?.isStillExecutable || this._task?.isStillExecutable === undefined)) { | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Simplify the conditional logic. The double negation Apply this diff to simplify the condition: - if (this._fieldConverterService.resolveType(field) === FieldTypeResource.TASK_REF && (!!this._task?.isStillExecutable || this._task?.isStillExecutable === undefined)) {
+ if (this._fieldConverterService.resolveType(field) === FieldTypeResource.TASK_REF && this._task?.isStillExecutable !== false) {This alternative reads more clearly: "reload task data unless explicitly marked as not executable." 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||
| this._taskDataReloadRequest$.next(frontendActions ? frontendActions : undefined); | ||||||||
| return; | ||||||||
| } | ||||||||
|
|
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
🧩 Analysis chain
Verify naming consistency across interfaces.
The property is named
isStillExecutablehere, butisTaskStillExecutableinFinishTaskEventOutcome. While the difference might be intentional (Task context vs Event context), consider whether consistent naming would improve clarity.Run the following script to check for any other references to these properties:
🏁 Script executed:
Length of output: 1153
Align naming of executable flag across interfaces.
Task interface uses
isStillExecutablebutFinishTaskEventOutcomedefinesisTaskStillExecutable. Consider unifying to a single property name (e.g.isStillExecutable) for clarity.🤖 Prompt for AI Agents