Use GraphQL properties in frontend and remove from work_items_helper
What does this MR do and why?
This change migrates work item metadata from server-rendered data to GraphQL queries, eliminating duplication between the Ruby helper and frontend data layer.
Changes:
- Add GraphQL fields for paths and permissions to work_item_metadata query
- Expose new computed properties in WorkItemMetadataProvider component
- Remove redundant data attributes from work_items/index.js bootstrap
- Clean up work_items_helper.rb by removing properties now fetched via GraphQL
- Update specs to reflect removal of server-rendered properties
The following properties are now fetched via GraphQL:
- autocompleteAwardEmojisPath, newTrialPath, newIssuePath, groupPath
- releasesPath, projectImportJiraPath, exportCsvPath
- canBulkUpdate (adminIssue), canEdit (adminProject)
- canImportWorkItems/showImportButton (importWorkItems)
This reduces initial page payload and centralizes data fetching through GraphQL, improving maintainability and performance.
References
Related to #578974
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #578974
Edited by Vedant Jain