async function()

in nodes/YouTrack/resources/command/shared.ts [35:67]


					async function (this, requestOptions) {
						const issueIds = this.getNodeParameter('issueIds') as string;
						if (!issueIds) {
							throw new NodeOperationError(
								this.getNode(),
								'Issue IDs are required',
								{ itemIndex: this.getItemIndex() }
							);
						}

						// Split by comma and trim
						const ids = issueIds
							.split(',')
							.map((id) => id.trim())
							.filter((id) => id.length > 0);

						// Convert to array of issue objects
						const issues = ids.map((id) => {
							// Check if it's a database ID (format: number-number)
							const isDatabaseId = /^\d+-\d+$/.test(id);
							if (isDatabaseId) {
								return { id };
							}
							// Otherwise, treat as readable ID
							return { idReadable: id };
						});

						if (requestOptions.body && typeof requestOptions.body === 'object') {
							(requestOptions.body as CommandSharedRequestBody).issues = issues;
						}

						return requestOptions;
					},