Skip to content

Closes #3998: Trellis Opportunity Content Type and Importer#5182

Merged
joeparsons merged 81 commits intomainfrom
issue/3998
May 7, 2026
Merged

Closes #3998: Trellis Opportunity Content Type and Importer#5182
joeparsons merged 81 commits intomainfrom
issue/3998

Conversation

@zsaenz
Copy link
Copy Markdown
Contributor

@zsaenz zsaenz commented Jan 9, 2026

Closes #3998: Non-Academic Trellis Programs

Description

Adds a new content type—Opportunities, and an importer for it. Two modules, with Trellis Opportunities embedded within the folder.

  1. Opportunities is used for things like study abroad, research, job opportunities, scholarships and internships.

    • This will be used for student opportunities and engagement, showing the different kinds of jobs or financial assistance the college or unit offers or prepares students for. It can also be used in conjunction with course work, as some courses require volunteer work or internships as part of their capstones. Websites will be able to list opportunities in multiple formats, with filters, in case they need more advanced listings. These fit between things like Events and News—some of them have deadlines, some of them don't and are ongoing, some of them do have deadlines and a program date, where the application may happen months before the actual program starts.
  2. The second part of this content type is the Trellis Importer. Trellis opportunities are called Programs, which come from Accounts. Similar to the Event Importer, we want Trellis to be able to import content right into Quickstart sites, with links between for ease of use.

----- Follow ups or non-critical updates

  • In config > az quicksart settings, Combine both Trellis Hostname fields for events and opportunities into a single page.
  • Also, possibly combine the Recurring Imports into a single page or table, with the type (opp, event) listed in the table. Two buttons, one for create recurring event and one for recurring opp.
  • Search by date in trellis fields (Trellis update)
  • After we migrate to Single Directory Components: make the card view the same height

Related issues

Closes #3998: Non-Academic Trellis Programs

How to test

  1. Install both az_opportunity and az_opportunity_trellis

  2. Make sure you have the latest Enterprise Attributes (API was recently updated); otherwise you won't see "Program Type" as an import filter
    a. Go to /admin/config/az-enterprise-attributes-import/settings and "Save Configurations

  3. Go to /admin/trellis-opportunity-importer, make sure "Program Type" is present.

  4. Use these search parameters, as Cameron said our first clients for this module would be. You can search for partial phrases and search for only some of them in the "keyword" parameter. You can also play around with other filters like "Program Type" ("On-Campus Job", "Professional Development", "Mentorship" yield good results)

    Name Owner NetID Parent Name
    Thrive Peer Mentoring - 1st Year wbryan Belonging and Service
    Thrive Peer Mentoring - 2nd Year+ wbryan Belonging and Service
    New Start wbryan New Start
    CALES Ambassadors ekowalsky CALS Career & Acad Svcs
    Student Worker - Salesforce Implementation Support kayliwhill Comm & Collaboration Services
    Student Worker – Salesforce Administrator swieland Comm & Collaboration Services
    EHS-RISE: Environmental Health Sciences - Research for Indigenous Student Engagement cubeta Molecular and Cellular Biology
    Biology Research Abroad: Vistas Open! (BRAVO!) cubeta Molecular and Cellular Biology
  5. Import some of these, and test that the node looks good.

  6. Also test the different views (card view, row view, small row view)

Test recurring import.

  1. Search something in the importer (/admin/trellis-opportunity-importer)

  2. If the search returns more than 1 result, the "Create Recurring Import" button will appear

  3. Click on "Create Recurring Import" and the Recurring Search Parameters will pre-fill what you already searched. Make necessary adjustments. Name the import rule and click "Save"

  4. The default recurring import cron migration interval is set at 12 hrs (720 mins), but if you want to test it right away, you can go to Cron migration settings (/admin/config/migrate_queue_importer/cron_migration). Edit Quickstart Trellis Opportunites and set the interval to 0 minutes.

  5. Go to Cron page /admin/config/system/cron. Use the external link or if you're testing on your local, use drush cron. Clicking on the UI "Run Cron" button won't work—I believe this is intentional.

API Testing & Dev API Branches

***CWS Team: this was done already, so don't worry about switching to the dev branch. Skip this step. ***

Opportunities pulls from 3 APIs, 2 are exposed for the editor. One is unique to this PR, the Opportunity API, called Programs in Trellis. The other is the shared Enterprise Attributes, used in multiple content imports and exports. To edit them, Go into Config / Arizona Quickstart Settings, and change both the Opportunity API (imports opportunity content from Trellis), and the Enterprise Attributes (imports attribute taxonomies). Program Type is only visible when it imports correctly.

We'll need to switch to the DEV versions for testing.

--- Config / Arizona Quickstart Settings / Opportunity Importer
Settings
Opportunity Dev API
api.qa.eips.arizona.edu
Opportunity Live API
api.eips.arizona.edu

--- Config / Arizona Quickstart Settings / Enterprise Attributes Importer Settings
Enterprise Dev API
https://api.qa.trellis.arizona.edu/ws/rest/events/v1/enterprise-attributes
Enterprise Live API
https://api.trellis.arizona.edu/ws/rest/events/v1/enterprise-attributes

(You should see over 200 items processed, if you're under the importer didn't work properly, try running it again later).

Postman API testing:

You can use the website PostMan to test the API Data, or any other api testing application, to compare data you see on the site with data as it exists from Trellis.

API 1: The IDs
Using GET, search for this link.
https://api.qa.eips.arizona.edu/ws/rest/programs/v1/searchprogram/
Use Params key "keyword", and value as the search term (put in whatever, i.e. CALES), to get specific content. You should see it appear as a query string in the URL.
"keyword"

API 2: The data from the IDs
Using POST, use this link.
https://api.qa.eips.arizona.edu/ws/rest/programs/v1/programinfo
Then for the data, switch to Body, choose Raw (json), and paste your IDs here, separated by commas.
{ "ids": "a55Kg00000001cGIAQ,a556R000001115mQAA" }

Types of changes

Arizona Quickstart (install profile, custom modules, custom theme)

  • Patch release changes
    • Bug fix
    • Accessibility, performance, or security improvement
    • Critical institutional link or brand change
    • Adding experimental module
    • Update experimental module
  • Minor release changes
    • New feature
    • Breaking or visual change to existing behavior
    • Upgrade experimental module to stable
    • Enable existing module by default or database update
    • Non-critical brand change
    • New internal API or API improvement with backwards compatibility
    • Risky or disruptive cleanup to comply with coding standards
    • High-risk or disruptive change (requires upgrade path, risks regression, etc.)
  • Other or unknown
    • Other or unknown

Drupal core

  • Patch release changes
    • Security update
    • Patch level release (non-security bug-fix release)
    • Patch removal that's no longer necessary
  • Minor release changes
    • Major or minor level update
  • Other or unknown
    • Other or unknown

Drupal contrib projects

  • Patch release changes
    • Security update
    • Patch or minor level update
    • Add new module
    • Patch removal that's no longer necessary
  • Minor release changes
    • Major level update
  • Other or unknown
    • Other or unknown

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My change requires release notes.

zsaenz added 3 commits January 9, 2026 09:54
Creates a base Opportunity content type with 3 display views. Uses Smart Title.
@zsaenz
Copy link
Copy Markdown
Contributor Author

zsaenz commented Jan 9, 2026

Review questions:

  • Website links could be buttons in display?
  • The "Where" is always a link, which doesn't look good on Card or Row view due to stretched links.
  • Make views with more and less content displayed for various uses (simple list of titles format, detailed filterable table format, etc)
  • The location field is being reused from AZ_Event. This has a URL attached, in case folks want to link a google maps. However, link fields do require a URL, where we only want to use the Text field and optionally allow a URL.
    -- Should we switch this to a text field, using az_opportunity_location instead of az_location?
    -- See: https://www.drupal.org/project/drupal/issues/2880632
  • 5 taxonomies used: Audience, Credit, Modality, Semester, Topic.
    -- These being taxonomies is important because some folks might want different options than what's available as stock (particularly those not using Trellis' built in options).
    -- There needs to be the ability to change or modify content coming in. Trellis could change "No Course Credit" to "No Academic Course Credit" for example, and we need to account for that.
    -- Taxonomies should primarily be used for grouped content that needs to be tagged and searched. Topics and Semester are important. Modality probably, though there's flexibility there. Credit and Audience could probably be more freeform text fields - user might want to say "3 credits" instead of "Yes."
  • On Taxonomies: How do we categorize content? EX: News can be filtered and sorted by News Type, using contextual filters. Topics could play that role, for example "National" and "International" as tags. However, there may be the case of separating opportunities by opportunity type - National Internships, International Scholarships... Would wee need a second tag to group them? Other examples would be: Group by combining tags (National, Internships), group by hierarchy (Scholarships > National)

@zsaenz zsaenz self-assigned this Jan 12, 2026
Comment thread modules/custom/az_opportunity/config/install/.htaccess Outdated
Comment thread modules/custom/az_opportunity/css/az_opportunity.css Outdated
Comment thread modules/custom/az_core/config/install/smart_title.settings.yml
zsaenz and others added 3 commits January 26, 2026 11:40
Co-authored-by: Joe Parsons <471936+joeparsons@users.noreply.github.com>
It installs properly, but doesn't work. It causes problems with Trellis Event Importer.
@zsaenz
Copy link
Copy Markdown
Contributor Author

zsaenz commented Feb 11, 2026

#5274
Related issue to fix styling on Entity Reference fields

…stall/migrate_plus.migration.az_trellis_opportunities.yml

Co-authored-by: Chris Green <chrisgreen@arizona.edu>
trackleft
trackleft previously approved these changes May 6, 2026
…oller/AZRecurringImportModalController.php

Co-authored-by: Joe Parsons <471936+joeparsons@users.noreply.github.com>
Comment thread modules/custom/az_opportunity/az_opportunity_trellis/src/TrellisHelper.php Outdated
…isHelper.php

Co-authored-by: Joe Parsons <471936+joeparsons@users.noreply.github.com>
Copy link
Copy Markdown
Member

@joeparsons joeparsons left a comment

Choose a reason for hiding this comment

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

Claude suggestion #6.

zsaenz and others added 4 commits May 6, 2026 15:29
…urringImportRuleListBuilder.php

Co-authored-by: Joe Parsons <471936+joeparsons@users.noreply.github.com>
…urringImportRuleListBuilder.php

Co-authored-by: Joe Parsons <471936+joeparsons@users.noreply.github.com>
…unity_trellis.info.yml

Co-authored-by: Chris Green <chrisgreen@arizona.edu>
trackleft
trackleft previously approved these changes May 6, 2026
…unity_trellis.info.yml

Co-authored-by: Joe Parsons <471936+joeparsons@users.noreply.github.com>
Copy link
Copy Markdown
Member

@kevdevlu kevdevlu left a comment

Choose a reason for hiding this comment

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

Tested Tugboat build, successfully

  • Searched for the specified first adopters
  • Imported all searched results
  • Created recurring rules and confirmed that updates happen upon cron run

@github-project-automation github-project-automation Bot moved this from Needs review to Ready to merge in 3.4.0-alpha1 May 6, 2026
@tadean
Copy link
Copy Markdown
Contributor

tadean commented May 7, 2026

Retested to verify that a few cases of imports and recurring imports function.

@joeparsons joeparsons merged commit b829a4c into main May 7, 2026
33 checks passed
@github-project-automation github-project-automation Bot moved this from Ready to merge to Done in 3.4.0-alpha1 May 7, 2026
@joeparsons joeparsons deleted the issue/3998 branch May 7, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.4.x only enhancement New feature or request integrations This relates to an integration into a central service. release notes trellis Work associated with Trellis

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Non-Academic Trellis Programs

7 participants