-
Notifications
You must be signed in to change notification settings - Fork 0
fix: include workspace labels in the issue label dropdown in automation platform #139
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
fix: include workspace labels in the issue label dropdown in automation platform #139
Conversation
AdamSelene
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks ! Left a question and a suggestion
| for (const label of labels.nodes) { | ||
| // Prevent duplicates | ||
| if (!labelMap.has(label.id)) { | ||
| labelMap.set(label.id, label.name); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can the id be duplicated? That's weird 🤔
They don't use UUIDs? I would expect a workspace label ID to never collide with a team label ID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated the second api call to filter out the labels that are not associated with any team (as they will the global labels available in the workspace) and there is no longer a need to deduplicate a well, thank you!
| for (const label of labels.nodes) { | ||
| // Prevent duplicates | ||
| if (!labelMap.has(label.id)) { | ||
| labelMap.set(label.id, label.name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add an indication that it's a workspace label?
E.g. [Workspace] prefix (or ideally something as explicit but more discreet 😄 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The labels are now in alphabetical order and the team labels are displayed first followed by the workspace labels.
For the grouping of the labels, I will contact activepieces if there is a way to do so, thank you!
AdamSelene
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks you can submit to ActivePieces!
What does this PR do?
Currently in the automation platform, while team labels are available, workspace labels are not available fully. This PR includes workspace labels in the dropdown when creating linear tasks in the automation platform
Explain How the Feature Works
The API was only fetching team based labels initially due to the team filter in the API call
Updated the
labelsproperty inprops.tsto include workspace labels by removing this filterUsed a map to prevent duplicates in the labels
Relevant User Scenarios
Fixes # (issue)