Skip to content
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

Redmine update #10

Merged
merged 6 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/appmixer/monday/core/CreateItem/CreateItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ module.exports = {
},
transform: './ListGroups#groupsToSelectArray'
}
}
};
}

return context.sendJson({
Expand Down
10 changes: 5 additions & 5 deletions src/appmixer/monday/core/GetItem/GetItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ module.exports = {
let item = data.items[0];
item?.column_values?.map(val => {
item[`column_value_${val.id}_id`] = val.id,
item[`column_value_${val.id}_text`] = val.text,
item[`column_value_${val.id}_title`] = val.title,
item[`column_value_${val.id}_type`] = val.type,
item[`column_value_${val.id}_value`] = val.value,
item[`column_value_${val.id}_additional_info`] = val.additional_info;
item[`column_value_${val.id}_text`] = val.text,
item[`column_value_${val.id}_title`] = val.title,
item[`column_value_${val.id}_type`] = val.type,
item[`column_value_${val.id}_value`] = val.value,
item[`column_value_${val.id}_additional_info`] = val.additional_info;
});

if (context.properties.generateOutputPortOptions) {
Expand Down
6 changes: 3 additions & 3 deletions src/appmixer/redmine/bundle.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "appmixer.redmine",
"version": "1.0.0",
"version": "1.0.1",
"changelog": {
"1.0.0": [
"1.0.1": [
"Redmine"
]
}
}
}
4 changes: 2 additions & 2 deletions src/appmixer/redmine/core/IssueCreate/IssueCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ module.exports = {
'issue.fixed_version_id': input['issue|fixed_version_id'],
'issue.assigned_to_id': input['issue|assigned_to_id'],
'issue.parent_issue_id': input['issue|parent_issue_id'],
'issue.custom_fields': input['issue|custom_fields'],
'issue.watcher_user_ids': input['issue|watcher_user_ids'],
'issue.custom_fields': !!input['issue|custom_fields'] ? JSON.parse(input['issue|custom_fields']) : undefined,
'issue.watcher_user_ids': !!input['issue|watcher_user_ids'] ? JSON.parse(input['issue|watcher_user_ids']) : undefined,
'issue.is_private': input['issue|is_private'],
'issue.estimated_hours': input['issue|estimated_hours']
};
Expand Down
44 changes: 29 additions & 15 deletions src/appmixer/redmine/core/IssueCreate/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@
"issue|project_id": {
"title": "ProjectId",
"type": "integer",
"example": 1,
"path": "issue.project_id"
},
"issue|tracker_id": {
"title": "TrackerId",
"type": "integer",
"example": 1,
"path": "issue.tracker_id"
},
"issue|status_id": {
Expand Down Expand Up @@ -55,34 +57,44 @@
"issue|fixed_version_id": {
"title": "FixedVersionId",
"type": "integer",
"description": "ID of the Target Versions (previously called \"Fixed Version\" and still referred to as such in the API)",
"example": 1,
"description": "ID of the Target Versions (previously called \"Fixed Version\" and still referred to as such in the API).",
"path": "issue.fixed_version_id"
},
"issue|assigned_to_id": {
"title": "AssignedToId",
"type": "integer",
"description": "ID of the user to assign the issue to (currently no mechanism to assign by name)",
"example": 34,
"description": "ID of the user to assign the issue to (currently no mechanism to assign by name).",
"path": "issue.assigned_to_id"
},
"issue|parent_issue_id": {
"title": "ParentIssueId",
"type": "integer",
"description": "ID of the parent issue",
"example": 43,
"description": "ID of the parent issue.",
"path": "issue.parent_issue_id"
},
"issue|custom_fields": {
"title": "CustomFields",
"type": "array",
"type": "string",
"path": "issue.custom_fields",
"originalType": "array",
"items": {
Copy link
Contributor

Choose a reason for hiding this comment

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

@jirihofman Since you changed the type from an array to a string, do we still need to keep these items?

Copy link
Member Author

Choose a reason for hiding this comment

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

We don't need items anymore but that would need to be handled in the generator. As of now it keeps many other properties there if they are in openAPI specs even though Appmixer doesn't use them.

Definitely a good idea to start removing them in the generator so that our component.json files are smaller.

"type": "object"
}
},
"issue|watcher_user_ids": {
"title": "WatcherUserIds",
"type": "array",
"description": "Array of user ids to add as watchers",
"type": "string",
"example": [
1,
2,
3
],
"description": "Array of user ids to add as watchers.",
"path": "issue.watcher_user_ids",
"originalType": "array",
"items": {
"type": "integer"
}
Expand All @@ -95,6 +107,7 @@
"issue|estimated_hours": {
"title": "EstimatedHours",
"type": "number",
"example": 1.5,
"path": "issue.estimated_hours"
}
}
Expand All @@ -105,13 +118,13 @@
"type": "number",
"index": 0,
"label": "Issue Project Id",
"tooltip": ""
"tooltip": "<p>Example: 1</p>"
},
"issue|tracker_id": {
"type": "number",
"index": 1,
"label": "Issue Tracker Id",
"tooltip": ""
"tooltip": "<p>Example: 1</p>"
},
"issue|status_id": {
"type": "number",
Expand Down Expand Up @@ -147,31 +160,31 @@
"type": "number",
"index": 7,
"label": "Issue Fixed Version Id",
"tooltip": "<p>ID of the Target Versions (previously called \"Fixed Version\" and still referred to as such in the API)</p>"
"tooltip": "<p>ID of the Target Versions (previously called \"Fixed Version\" and still referred to as such in the API). Example: 1</p>"
},
"issue|assigned_to_id": {
"type": "number",
"index": 8,
"label": "Issue Assigned To Id",
"tooltip": "<p>ID of the user to assign the issue to (currently no mechanism to assign by name)</p>"
"tooltip": "<p>ID of the user to assign the issue to (currently no mechanism to assign by name). Example: 34</p>"
},
"issue|parent_issue_id": {
"type": "number",
"index": 9,
"label": "Issue Parent Issue Id",
"tooltip": "<p>ID of the parent issue</p>"
"tooltip": "<p>ID of the parent issue. Example: 43</p>"
},
"issue|custom_fields": {
"type": "textarea",
"index": 10,
"label": "Issue Custom Fields",
"tooltip": " JSON array. Example: [{}]."
"tooltip": "<p><br/>JSON array. Example: [{}].</p>"
},
"issue|watcher_user_ids": {
"type": "textarea",
"index": 11,
"label": "Issue Watcher User Ids",
"tooltip": "<p>Array of user ids to add as watchers</p> JSON array. Example: [-42962995]."
"tooltip": "<p>Array of user ids to add as watchers. Example: [1,2,3]</p>"
},
"issue|is_private": {
"type": "toggle",
Expand All @@ -183,7 +196,7 @@
"type": "number",
"index": 13,
"label": "Issue Estimated Hours",
"tooltip": ""
"tooltip": "<p>Example: 1.5</p>"
}
}
}
Expand Down Expand Up @@ -506,8 +519,9 @@
}
],
"properties": {},
"label": "CreateIssue",
"auth": {
"service": "appmixer:redmine"
},
"icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAABrVBMVEUAAADnAADfAADdAADkAAvjAAzjAAzjAA3iAAzkAAviAAu/AAD/AADiAAziAAvfAADWAADcCwDcCwDlAADjAAvmAAjZBgDdCwDdCQDcBgDcCgDdCwD/AADUAADiAAziAAvUAADdCwDdCwD/AADdCgDbCQDiAAvfAAa/AADbCwDdCgDbCgDbBwDMAADaAADiAADeCQDQAADcCgDdBwAAAADdCgDcCwDbCgDCAADbCgDcCwDZCADeCgDbCwDfBwC/AADKAADMAADLAADUAADdCQDcCgDJAADJAADLAADKAADTAADLAADLAADKAADaAADIAADLAADMAADLAADKAADNAADLAADNAADLAADKAADOAADLAADLAADKAADEAADLAADMAADKAADMAADMAADKAADLAACjAACUAABVAADKAADNAADLAADLAAB/AACZAAChAAChAAChAAChAACpAACZAACpAACmAACgAAChAACfAAChAACcAACiAAChAACcAACeAAChAAChAACgAACiAACiAACgAACdAACiAAChAACgAAChAAChAADdDADdCwDMAACiAADiOACXAAAAi3RSTlMACwgPhrjT1c2sbQQEzrYQE87fCtUfKfigJe3HAwbRwhLyxgHspJYoCOe8vUAFDgluC7JEAZD+ZBVd/T6V7iAQuPaZGGyjGM38ax3++aUHHNr91ZZt5D7vHU+t5eAatA+9eez4gRwMA4Q0hUoGCm3+rj8SBQkXYdHOtDTk+SdF+N95FqLGFcNMp36IxVriGQAAAAFvck5UAc+id5oAAAFOSURBVDjL3VFXOwNBFL0I0YPoEkJ0ovdeI0TvvSdqRAmC6C2MyW+2c0fZ7Pg8enAe5p62d7+dBfhzBAT+EgapgkPU6tCw8J/jCIiMUiOiATRCHBMbpwUV5vEJkJiUrMhTUglJ0+nTWSEDDJmEZBnluSGbSMiBXLYgL7+AqUJ5oYggik0lpVrNh3orkxXKK5hVWcWVqVoSNbXf76jTAdQ3kMYvw9hEmlsAWj91W3uHHjq7ZBtN3YFg7rH0ctVnpbR/YND/s4aGRygd5XyMMoz7FybQnEQ+hXzavzCD5iyj5jlG5xU3t8BM6yIXS8sWuqK8+1W6to7EZt+Qzs0tZWF7Rzp2HQB7Puf+weGR+HddxyenPjfAmQ/hUubnaDsdcIHEIyy45A9ewTXOG6Fg44VbcOJ0C4U7XrgHD84HofDIC0/w7GV4EQp29L2v8C/wDtc2dUgZNJ+BAAAAAElFTkSuQmCC"
}
}
1 change: 1 addition & 0 deletions src/appmixer/redmine/core/IssueDelete/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
}
],
"properties": {},
"label": "DeleteIssue",
"auth": {
"service": "appmixer:redmine"
},
Expand Down
1 change: 1 addition & 0 deletions src/appmixer/redmine/core/IssueShow/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@
}
],
"properties": {},
"label": "GetIssue",
"auth": {
"service": "appmixer:redmine"
},
Expand Down
4 changes: 2 additions & 2 deletions src/appmixer/redmine/core/IssueUpdate/IssueUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ module.exports = {
'issue.fixed_version_id': input['issue|fixed_version_id'],
'issue.assigned_to_id': input['issue|assigned_to_id'],
'issue.parent_issue_id': input['issue|parent_issue_id'],
'issue.custom_fields': input['issue|custom_fields'],
'issue.watcher_user_ids': input['issue|watcher_user_ids'],
'issue.custom_fields': !!input['issue|custom_fields'] ? JSON.parse(input['issue|custom_fields']) : undefined,
'issue.watcher_user_ids': !!input['issue|watcher_user_ids'] ? JSON.parse(input['issue|watcher_user_ids']) : undefined,
'issue.is_private': input['issue|is_private'],
'issue.estimated_hours': input['issue|estimated_hours'],
'issue.notes': input['issue|notes'],
Expand Down
33 changes: 22 additions & 11 deletions src/appmixer/redmine/core/IssueUpdate/component.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,37 @@
"issue|assigned_to_id": {
"title": "AssignedToId",
"type": "integer",
"description": "ID of the user to assign the issue to (currently no mechanism to assign by name)",
"example": 34,
"description": "ID of the user to assign the issue to (currently no mechanism to assign by name).",
"path": "issue.assigned_to_id"
},
"issue|parent_issue_id": {
"title": "ParentIssueId",
"type": "integer",
"description": "ID of the parent issue",
"example": 43,
"description": "ID of the parent issue.",
"path": "issue.parent_issue_id"
},
"issue|custom_fields": {
"title": "CustomFields",
"type": "array",
"type": "string",
"path": "issue.custom_fields",
"originalType": "array",
"items": {
"type": "object"
}
},
"issue|watcher_user_ids": {
"title": "WatcherUserIds",
"type": "array",
"description": "Array of user ids to add as watchers",
"type": "string",
"example": [
1,
2,
3
],
"description": "Array of user ids to add as watchers.",
"path": "issue.watcher_user_ids",
"originalType": "array",
"items": {
"type": "integer"
}
Expand All @@ -95,6 +104,7 @@
"issue|estimated_hours": {
"title": "EstimatedHours",
"type": "number",
"example": 1.5,
"path": "issue.estimated_hours"
},
"issue|notes": {
Expand Down Expand Up @@ -171,25 +181,25 @@
"type": "number",
"index": 9,
"label": "Issue Assigned To Id",
"tooltip": "<p>ID of the user to assign the issue to (currently no mechanism to assign by name)</p>"
"tooltip": "<p>ID of the user to assign the issue to (currently no mechanism to assign by name). Example: 34</p>"
},
"issue|parent_issue_id": {
"type": "number",
"index": 10,
"label": "Issue Parent Issue Id",
"tooltip": "<p>ID of the parent issue</p>"
"tooltip": "<p>ID of the parent issue. Example: 43</p>"
},
"issue|custom_fields": {
"type": "textarea",
"index": 11,
"label": "Issue Custom Fields",
"tooltip": " JSON array. Example: [{}]."
"tooltip": "<p><br/>JSON array. Example: [{}].</p>"
},
"issue|watcher_user_ids": {
"type": "textarea",
"index": 12,
"label": "Issue Watcher User Ids",
"tooltip": "<p>Array of user ids to add as watchers</p> JSON array. Example: [36849599]."
"tooltip": "<p>Array of user ids to add as watchers. Example: [1,2,3]</p>"
},
"issue|is_private": {
"type": "toggle",
Expand All @@ -201,7 +211,7 @@
"type": "number",
"index": 14,
"label": "Issue Estimated Hours",
"tooltip": ""
"tooltip": "<p>Example: 1.5</p>"
},
"issue|notes": {
"type": "text",
Expand All @@ -226,8 +236,9 @@
}
],
"properties": {},
"label": "UpdateIssue",
"auth": {
"service": "appmixer:redmine"
},
"icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAABrVBMVEUAAADnAADfAADdAADkAAvjAAzjAAzjAA3iAAzkAAviAAu/AAD/AADiAAziAAvfAADWAADcCwDcCwDlAADjAAvmAAjZBgDdCwDdCQDcBgDcCgDdCwD/AADUAADiAAziAAvUAADdCwDdCwD/AADdCgDbCQDiAAvfAAa/AADbCwDdCgDbCgDbBwDMAADaAADiAADeCQDQAADcCgDdBwAAAADdCgDcCwDbCgDCAADbCgDcCwDZCADeCgDbCwDfBwC/AADKAADMAADLAADUAADdCQDcCgDJAADJAADLAADKAADTAADLAADLAADKAADaAADIAADLAADMAADLAADKAADNAADLAADNAADLAADKAADOAADLAADLAADKAADEAADLAADMAADKAADMAADMAADKAADLAACjAACUAABVAADKAADNAADLAADLAAB/AACZAAChAAChAAChAAChAACpAACZAACpAACmAACgAAChAACfAAChAACcAACiAAChAACcAACeAAChAAChAACgAACiAACiAACgAACdAACiAAChAACgAAChAAChAADdDADdCwDMAACiAADiOACXAAAAi3RSTlMACwgPhrjT1c2sbQQEzrYQE87fCtUfKfigJe3HAwbRwhLyxgHspJYoCOe8vUAFDgluC7JEAZD+ZBVd/T6V7iAQuPaZGGyjGM38ax3++aUHHNr91ZZt5D7vHU+t5eAatA+9eez4gRwMA4Q0hUoGCm3+rj8SBQkXYdHOtDTk+SdF+N95FqLGFcNMp36IxVriGQAAAAFvck5UAc+id5oAAAFOSURBVDjL3VFXOwNBFL0I0YPoEkJ0ovdeI0TvvSdqRAmC6C2MyW+2c0fZ7Pg8enAe5p62d7+dBfhzBAT+EgapgkPU6tCw8J/jCIiMUiOiATRCHBMbpwUV5vEJkJiUrMhTUglJ0+nTWSEDDJmEZBnluSGbSMiBXLYgL7+AqUJ5oYggik0lpVrNh3orkxXKK5hVWcWVqVoSNbXf76jTAdQ3kMYvw9hEmlsAWj91W3uHHjq7ZBtN3YFg7rH0ctVnpbR/YND/s4aGRygd5XyMMoz7FybQnEQ+hXzavzCD5iyj5jlG5xU3t8BM6yIXS8sWuqK8+1W6to7EZt+Qzs0tZWF7Rzp2HQB7Puf+weGR+HddxyenPjfAmQ/hUubnaDsdcIHEIyy45A9ewTXOG6Fg44VbcOJ0C4U7XrgHD84HofDIC0/w7GV4EQp29L2v8C/wDtc2dUgZNJ+BAAAAAElFTkSuQmCC"
}
}
Loading