Retrieve work item id in workflows

Hi,

is there any option to retrieve the id of a work item within a workflow?

According to the documentation of the YouTrack REST API work items do have an ID, but till now we weren't able to access the field within a workflow. Is there any chance to do so?

5
3 comments

Hi!

I'm Sergey from the YouTrack team.

No, that's not possible, I'm afraid. We have a related feature request in our public tracker: https://youtrack.jetbrains.com/issue/JT-67651/Provide-entity-IDs-in-a-workflow. Please feel free to vote for this issue. This helps us gauge how much impact this feature will have on our customer base, and you’ll also get subscribed to the issue’s notifications.

Just in case, you can send HTTP requests from a workflow, though.

0

Same problem here. Hopefully it will be implemented soon :)

3

We have the same problem. 

We want to check whether a user is allowed to change a workItem (especially the duration). Unfortunately, the workItem attributes cannot be controlled via permissions. (It is not possible to set workitems to `isBilled` without not every user being able to change it again).
Because of that, we make a request to our external billing tool that checks whether workitems are set to billed. If it is already billed in the app, it can also no longer be changed in YT.
As we do not have access to the ID (in our APP we do, because we sync the workItems here via the API), we have to do it with an artificial ID from `hash(date+user)`. This works, but is very messy.

The ID should be available, as it probably only needs to be passed on in one place anyway.

1

Please sign in to leave a comment.