Skip to content

Workday View Open Job#560

Merged
Sudheer2137 merged 4 commits intomoveworks:mainfrom
hariv24:View-Open-Job
Jul 4, 2025
Merged

Workday View Open Job#560
Sudheer2137 merged 4 commits intomoveworks:mainfrom
hariv24:View-Open-Job

Conversation

@hariv24
Copy link
Copy Markdown
Contributor

@hariv24 hariv24 commented Jun 11, 2025

No description provided.

@hariv24 hariv24 requested a review from ajaymerchia as a code owner June 11, 2025 00:25
@ghost
Copy link
Copy Markdown

ghost commented Jun 11, 2025

🎉 Snyk checks have passed. No issues have been found so far.

code/snyk check is complete. No issues have been found. (View Details)

@github-actions
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

@vijval-n
Copy link
Copy Markdown
Contributor

LGTM Approved @sbhadwal-moveworks @Sudheer2137

@Sudheer2137
Copy link
Copy Markdown
Contributor

@hariv24 We need to handle pagination for this plugin, as there could be more than 100 jobs for most organizations. Hence, please implement pagination handling.

Test this by creating a compound action and adding the code below.

steps:

  • script:
    output_key: sample_value
    input_args: {}
    code: |
    return '0'
  • action:
    action_name: view_open_jobs
    input_args:
    offset: data.sample_value
    output_key: first_page
  • script:
    output_key: remaining_offsets
    input_args:
    total_pagination: data.first_page.total
    code: |
    total_pagination = int(total_pagination)
    offsets = []
    for i in range(100,total_pagination,100):
    offsets.append(i)
    return offsets
  • script:
    output_key: has_offsets
    input_args:
    remaining_offsets: data.remaining_offsets
    code: |
    return bool(remaining_offsets)
  • switch:
    cases:
    - steps:
    - for:
    each: offset
    steps:
    - action:
    action_name: view_open_jobs
    input_args:
    offset: offset
    output_key: job_page
    index: loop_index
    in: data.remaining_offsets
    output_key: remaining_pages
    condition: data.has_offsets == true
    default:
    steps:
    - script:
    output_key: remaining_pages
    input_args: {}
    code: |
    return []
  • try_catch:
    catch:
    on_status_code: []
    steps:
    - script:
    output_key: all_jobs
    input_args:
    first_page: data.first_page
    code: |
    return first_page.get("data", [])
    try:
    steps:
    - script:
    output_key: all_jobs
    input_args:
    first_page: data.first_page
    remaining_pages: data.remaining_pages
    code: |
    jobs = first_page.get("data", [])
    for page in remaining_pages:
    jobs.extend(page.get("job_page", {}).get("data", []))
    return jobs
  • return:
    output_mapper:
    list:
    MAP():
    converter:
    MoreDetails: item.url
    JobLocation: item.primaryLocation.country.descriptor
    JobTitle: item.title
    items: data.all_jobs

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 3, 2025

@Sudheer2137 Sudheer2137 enabled auto-merge July 4, 2025 06:35
@Sudheer2137 Sudheer2137 merged commit 81f2612 into moveworks:main Jul 4, 2025
3 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 4, 2025

tdavison-moveworks pushed a commit that referenced this pull request Jul 25, 2025
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.

3 participants