YouTrack Workflows not Firing - workflow

I have a basic scheduled workflow that creates issues, but can't get the flow to trigger as it should on the projects to which it is attached:
I have 3 projects: A, B and C
I have a scheduled workflow that creates a single issue (summary and description only) in each of A, B and C.
When the workflow is attached to project B, it triggers and all 3 issues are created.
When the workflow is attached to A and/or C, the workflow does not trigger.
Many of the project fields overlap, but given that I'm only setting the summary and description, i don't see that being a problem?
I can't find where workflow execution gets logged, so don't know if there are problems (but the flow does execute on project B)...?
Any help appreciated!

Be aware that stateless and state machine rules are executed on behalf of a user who actually made changes that triggered a workflow. Scheduled rules, in turn, run on behalf of their author. Thus, make sure the author has respective permissions in all of the projects the rule is attached to.

Although not an answer to the problem, this problem was resolved by upgrading from YT5 to YT6.
Part of the upgrade involved going through this problem: http://forum.jetbrains.com/thread/YouTrack-1810 (resolved by backing up, uninstalling YT5, removing all YT folders, then installing YT and restoring backup)
That leads me to wonder if the problem wasn't related to a bad/locked/corrupted file somewhere in the YT directory?
Nevertheless, post upgrade, I attached the scheduled workflows as they were and they fired without hindrance.

Related

How to split changes on my PR into two separate PR's without losing comments?

I made sweeping changes to 2 projects (call it Project A and B) in my team's repository in this PR *. After getting through testing, review, and getting comments resolved, I found out that a different team is working on conflicting changes to project A on a different PR and those changes need to go to staging first. Now I can't merge my PR because it has changes to A, but my changes to Project B need to be merged ASAP. Now the obvious answer is probably to abandon the PR, do a soft reset and start again with two branches, but my team wants to keep the comment threads on both A and B because they showcase a month of work and important design decisions made by multiple teams during the reviewing process. Is there a way to split my changes to Projects A and B into two separate PR's without losing all the comments?
My current solution is branch a new branch off the current one, manually undo my changes to Project A from the branch, push, and leave the comments to A dangling (I think there will be some comment view that the file reference is deleted), merge. Then create a new PR of the newest branch, copy and paste each of the 50+ dangling comments over to their respective files, resolve all, and merge. This is obviously not great because I lose some context and it will take hours. Other solutions I've seen on here will delete all existing comments altogether and I can't have that.
*Yes, I definitely shouldn't have done that.
There is no out of the box solution for this.
I would suggest to use Azure DevOps APIs, and even that isn’t a walk in the park.
Modus operandi
Choose your language, PowerShell, js, c#, etc and start exploring. Below a suggestion where to start:
Start with getting the original PR using the getbyid api
Since you mention the comments are the most import part, the next thing is to retrieving list with thread comments API.
Optional: Per comment iterate through the thread with the next get api, because the docs state: Represents a comment which is one of potentially many in a comment thread.
From this point, retrieve more info you need or start building the copy of the PR with, create PR and adding comments and other part you need to reuse.
Again, this is not easy and maybe retrieving and saving this in another format already helps you.
I did tried to find a solution for you online, but did find it (yet). Found other handy stuff like this quick and dirty js script to search through comments.

Adding Parent Link Automatically When Bug is Created

The organization I am with has transitioned to Azure DevOps for source control and for Sprint Management. I am responsible for investigating moving the organization to Azure DevOps for testing off of another solution. There is one question I have received from multiple people after doing some demonstrations that I have not been able to get an answer on.
What I have been asked if the system can do, is that when a Bug is entered during a Test Execution, for it to automatically have the User Story that the script is related to be set as a parent.
For example:
If I have User Story 123, which has a Tested By relationship to Test Case Test1. Test Case Test1 is in Test Plan ABC, which was created with the Area Path of my team and Iteration of the current Iteration. If I create a Bug while executing Test1 (in a Test Suite in Test Plan ABC), it currently adds the Bug to the current Iteration, but under an Unparented story. We would like to see that bug automatically appear under User Story 123.
Is this possible? Thanks for any information regarding this.
I think you can use Create work item task behind your test task in your build/release pipeline.
In this task, you can set the work item link type and target work item.
And other conditions about the work item.
You can set the Control Options as below.
It means, only when the test task has failed, this task will run.
Hops this will help.
So, for anyone else searching, I was able to resolve my issue.
What ended up being the solution was using the Create Test Suite from Requirement option, within a Test Plan. This is a very useful method for our use, as once the Test Suite is setup, and Test Cases which are created with a Tested By/Test Relationship (User case should show Tested By in the Related Work section, the test case will show a Tests entry to the User story) will automatically be added into the Test Suite. Then, when testing, when you create a new Bug from within a Test Execution, will automatically be created with the User Story as a Parent to the Bug.

Move a jira issue between workflows

I have an issue in JIRA that is following one workflow, workflow looks something like this (for bugs):
New -> Eval -> Approve -> Roadmap/Schedule -> Dev -> Complete
This workflow is for issue type "Bug".
For higher priority bugs, I want a totally different workflow, and for it to have its own issue type, for instance "Priority Bug".
R&D -> Dev -> Release -> Complete
This works great, for new Priority Bugs, but I have a transition, that allows you to promote a normal bug to a priority bug. That transition changes the issue type to Priority Bug properly, but when it gets there, it seems lost, its now not in either workflow. How do I get it to change workflows as well?
I suggest to install Script Runner plugin, and implement this as a single workflow. You can have custom scripted conditions that will check the type of the issue and allow and disallow your transitions thus emulating like it is a different workflow for another issue type.
Workflows are for a given project and for a given issue type. If the bug is in a particular project and of a particular issue type then it will follow the corresponding workflow.
However, when moving from one workflow to another there needs to be some way for JIRA to know what state to go to. When you do a manual move you get a prompt that allows you to decide what state in the new workflow it has. I have never done an automatic move triggered by a transition, but I suspect it will have a problem determining what state the issue should have. Perhaps you could set the state as a part of the transition?

How to inactivate a JIRA status workflow?

I have created a workflow of changing status in JIRA but now I want some of the statuses to be deleted. It does not give me the option to delete. I read in the document that you cannot delete active workflow steps.
How can I inactivate a workflow is not described anywhere. I have spent hours on it.
I'm not sure I got you 100% right, but to delete a workflow you have to unassign it from the workflow scheme, which is only possible if that scheme is not used by any project. If a status is not used anymore in any workflow it can be deleted if I remember correctly.
How I do it in most cases is: I create a new workflow, as it is needed. Then I associate it to the project. Afterwards I can delete the old one.

Dynamics CRM Change Status Workflow error

I have a workflow that that runs to update the status of a Case record to Resolved. However, the workflow gets put into status 'waiting' and contains a generic error message. When looking at the system job message it says:
This has worked on another system (as all I am doing is updating a status) so I assume it has something to do with the customizations in place.
Has anyone else ever come across this and how did you resolve it?
Thanks in advance
UPDATE:
I have created a new organisation to test out any possible solutions and to narrow down what might be happening.
I created a workflow on the blank organisation and a test case record to try it out on. It worked fine as expected.
I then imported the customizations that are on my customers system. Did the same again and it worked fine.
I then created a new case record and tried the original workflow, this did not work.
I then added a workflow that does the same as the first workflow and tried it on the pre customizations record, it worked.
I then tried the new workflow on the new record and once again this did not work.
It is therefore appearing that the workflows are not working on any records post customization import.
Has anyone come across this before, and what steps were taken to resolve?
Thanks again
If you have the possibility to look at the registered plugins, then search for a plugin registered on the message SetState or SetStateDynamicEntity for the entity case (incident).
I assume there is a plugin which fails in your case. This is the reason for your error message.