Skip to content

Conversation

sophatsam
Copy link

No description provided.

… output `hub_id`, `project_id`, and `container_id`
…output `hub_id`, `project_id`, and `folder_id`
…le_content` in `PUT` payload, output `hub_id` and `project_id`
@@ -2301,7 +1399,7 @@
[
{
name: 'hub_id',
label: 'Hub name',
label: 'Hub Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label as

label: 'Hub name',

@@ -2317,7 +1415,7 @@
},
{
name: 'project_id',
label: 'Project name',
label: 'Project Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label as

label: 'Project name',

@@ -2377,7 +1481,7 @@
[
{
name: 'hub_id',
label: 'Hub name',
label: 'Hub Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label as

label: 'Hub name',

@@ -2393,7 +1497,7 @@
},
{
name: 'project_id',
label: 'Project name',
label: 'Project Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label as

label: 'Project name',

control_type: 'text',
sticky: true,
hint: 'Enter filters for the search. A list of filters can be' \
' found at https://forge.autodesk.com/en/docs/data/v2/' \
Copy link
Contributor

Choose a reason for hiding this comment

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

Use hyper link tag
e.g

hint: 'To create client ID, the system admin or manager can click ' \
        "<a href='https://abc.com/app/settings/developer/apps/new' " \
        "target='_blank'>here</a> to register a new client application." },

@@ -2461,7 +1575,7 @@
[
{
name: 'hub_id',
label: 'Hub name',
label: 'Hub Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label as

label: 'Hub name',

@@ -2477,7 +1591,7 @@
},
{
name: 'project_id',
label: 'Project name',
label: 'Project Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label as

label: 'Project name',

@@ -2511,10 +1625,10 @@
hint: 'Use Folder ID'
} },
{ name: 'item_id',
label: 'File name',
label: 'File Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label as

 label: 'File name',

},
config_fields:
[
{
name: 'hub_id',
label: 'Hub name',
label: 'Hub Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

update label as

 label: 'Hub name',

@@ -2573,7 +1687,7 @@
},
{
name: 'project_id',
label: 'Project name',
label: 'Project Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label as

label: 'Project name',

{
name: 'item_id',
label: 'File name',
label: 'File Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label as

label: 'File name'```

optional: true,
toggle_hint: 'Use custom value',
hint: 'Use version number'
hint: 'Use File/Item ID'
Copy link
Contributor

@svchandra svchandra Sep 9, 2019

Choose a reason for hiding this comment

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

Update hint

hint: 'Use fileiItem ID'

"#{version_url}/exports/#{input['export_id']}")
project_id = input['project_id'].split('.').last
get("/bim360/docs/v1/projects/#{project_id}/versions/" \
"#{version_url}/exports/#{input['export_id']}").
Copy link
Contributor

Choose a reason for hiding this comment

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

Convert all three in to one merge operation, there are other e.g.

          merge({ hub_id: input['hub_id'] }).
          merge({ project_id: input['project_id'] }).
          merge({ item_id: input['item_id'] })

@@ -2671,7 +1758,7 @@
[
{
name: 'hub_id',
label: 'Hub name',
label: 'Hub Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label as

label: 'Hub name',
``

@@ -2687,7 +1774,7 @@
},
{
name: 'project_id',
label: 'Project name',
label: 'Project Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label as```
label: 'Project name',

@@ -2721,7 +1807,7 @@
hint: 'Use Folder ID'
} },
{ name: 'item_id',
label: 'File name',
label: 'File Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label as

label: 'File name',

config_fields: [
{
name: 'hub_id',
label: 'Hub name',
label: 'Hub Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label as

label: 'Hub name',

@@ -2778,7 +1874,7 @@
},
{
name: 'project_id',
label: 'Project name',
label: 'Project Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label as

label: 'Project name',

@@ -2814,35 +1910,48 @@
],
input_fields: lambda do |_object_definitions|
[
{ name: 'file_name', optional: false,
{ name: 'file_name', optional: false, label: 'File Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label as

label: 'File Name',

You can ignore as well, workato derives labels from name field.

},
input_fields: lambda do |_object_definitions|
[
{
name: 'hub_id',
label: 'Hub name',
label: 'Hub Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label as

label: 'Hub name'

@@ -3131,7 +2103,7 @@
},
{
name: 'project_id',
label: 'Project name',
label: 'Project Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label as

label: 'Project name',

},
input_fields: lambda do |_object_definitions|
[
{
name: 'hub_id',
label: 'Hub name',
label: 'Hub Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label

label: 'Hub name',

@@ -3264,7 +2228,7 @@
},
{
name: 'project_id',
label: 'Project name',
label: 'Project Name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Update label as

label: 'Project name',

@@ -3324,22 +2289,27 @@
'filter[type]=items&filter[lastModifiedTimeRollup]-ge=' \
"#{last_modified_time}&" \
"page[limit]=#{limit}&page[skip]=#{skip}"
get("/data/v1/projects/#{project_id}/folders/" \
"#{folder_id}/contents", query_params)
get("/data/v1/projects/#{input['project_id']}/folders/" \
Copy link
Contributor

Choose a reason for hiding this comment

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

you can use project_id field instead of input['project_id']

Copy link
Author

Choose a reason for hiding this comment

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

this is where we were seeing issues where the project_id is cached from another trigger and was not polling from the project specified in the input. we're using input['project_uid'] to make sure we're polling from the project specified in the input instead of the cached one.

get("/data/v1/projects/#{project_id}/folders/" \
"#{folder_id}/contents", query_params)
get("/data/v1/projects/#{input['project_id']}/folders/" \
"#{input['folder_id']}/contents", query_params)
Copy link
Contributor

Choose a reason for hiding this comment

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

you can use folder_id field instead of input['folder_id']

Copy link
Author

Choose a reason for hiding this comment

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

same comment as above. this ensures we're looking at the folder specified in the input instead of the cached value.

project_id = closure&.[]('project_id') || input['project_id']
container_id = closure&.[]('container_id') ||
get("/project/v1/hubs/#{input['hub_id']}" \
"/projects/#{project_id}")&.
"/projects/#{input['project_id']}")&.
Copy link
Contributor

@svchandra svchandra Sep 9, 2019

Choose a reason for hiding this comment

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

you can use project_id field instead of input['project_id']
is there any issue to switch from the project_id?

Copy link
Author

Choose a reason for hiding this comment

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

same comment as above. this ensures we're looking at the folder specified in the input instead of the cached value.

Copy link
Contributor

@svchandra svchandra left a comment

Choose a reason for hiding this comment

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

@sophatsam I updated the PR, please fix the changes.

@sophatsam
Copy link
Author

@svchandra I have pushed the latest commit based on the changes you recommended, with the exception of the last 3 comments where i provided a response comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants