Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export interface CaseSearchRequestBody {
* for more information.
*/
query?: string;
/**
* A switch for resolving query the old way or by Groovy compiler for dynamic code in queries.
*/
dynamicQuery?: boolean;
Comment on lines +55 to +58
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Improve documentation clarity.

The JSDoc comment could be more specific and helpful for developers. Consider clarifying:

  • What happens when dynamicQuery is true vs false vs undefined (not provided)
  • What "the old way" means (e.g., "static query resolution" or "template-based resolution")
  • What the Groovy-based dynamic code execution enables
  • The default behavior when this field is omitted

Example improvement:

 /**
- * A switch for resolving query the old way or by Groovy compiler for dynamic code in queries.
+ * Controls query resolution mode for the {@link query} field.
+ * 
+ * - `true`: Enables Groovy-based dynamic code evaluation in queries, allowing runtime date resolution and expressions
+ * - `false` or `undefined`: Uses legacy template-based query resolution (default)
+ * 
+ * @default false
  */
 dynamicQuery?: boolean;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/**
* A switch for resolving query the old way or by Groovy compiler for dynamic code in queries.
*/
dynamicQuery?: boolean;
/**
* Controls query resolution mode for the {@link query} field.
*
* - `true`: Enables Groovy-based dynamic code evaluation in queries, allowing runtime date resolution and expressions
* - `false` or `undefined`: Uses legacy template-based query resolution (default)
*
* @default false
*/
dynamicQuery?: boolean;
🤖 Prompt for AI Agents
In
projects/netgrif-components-core/src/lib/filter/models/case-search-request-body.ts
around lines 55 to 58, the JSDoc for dynamicQuery is vague; update it to
explicitly state behavior for true, false, and undefined, define what "the old
way" means (e.g., static/template-based resolution), describe what enabling
Groovy-based dynamic execution allows (evaluating dynamic expressions or scripts
in queries), and document the default when omitted; change the comment to
clearly list: true = use Groovy dynamic evaluation, false = use
static/template-based resolution, undefined = use the default behavior (specify
which default your system uses), and note any security/validation considerations
or side effects of enabling Groovy evaluation.

/**
* Returned cases must have the specified ID.
* If more than one ID is specified, the returned cases must have one of them.
Expand Down
Loading