Skip to content

Conversation

@vhudlikar
Copy link
Contributor

I have created an Action that handles the tag creation part of the feature. #7 (comment)

Logic:

  1. Check if a tag with the provided Tag Name already exists in the Tags [label] table.
  2. If it does not exist, create a new tag record with that name.
  3. Return the Sys ID of the newly created tag.
  4. If the tag already exists, it should likely not create a duplicate but instead return the Sys ID of the existing tag by setting tag as active.

Testing Done for Action:

  1. Input provided to action with Name as "Hacktoberfest".
    -> Result: New Tag was created with same Name with Active as true.
  2. Input provided to action with same name again as "Hacktoberfest".
    -> Result: Instead of new tag creation it provided sys_id of existing record.
  3. Existing record which was created in Test Step 1, mark it as inactive and Input provided to action with same name again as "Hacktoberfest".
    -> Result: Script was able to detect existing tag which was made active and sys_id was return which match with sys_id for the record created in Test Step 1.

…ature.

Logic:
1. Check if a tag with the provided Tag Name already exists in the label table.
2. If it does not exist, create a new tag record with that name. 
3. Return the Sys ID of the newly created tag. 
4. If the tag already exists, it should likely not create a duplicate but instead return the Sys ID of the existing tag by setting tag as active.
@github-actions
Copy link

github-actions bot commented Oct 2, 2025

Valid PR for ActionPack

Thank you for your contribution. This PR complies with the CONTRIBUTING.md.
A maintainer will review this shortly. In the meantime, Happy Hacking!

@niamccash niamccash merged commit d11fd48 into ServiceNowDevProgram:main Oct 2, 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.

2 participants