I know my question is quit about everything, that is because I am a bit confused here.
I want to create a Condition that through an error message to the user rather than just not allow them to make the transition on the workflow. A Validator did not help as It did not allow checking values of custom fields. And I do not really know how the user should use it (when I add validation to change value before transition for a certain existing field I get an error message even after changing that value. So not sure how that really works).
From reading other questions/answers, it seems I need to create custom Condition/Validator. On this front, I have two questions:
1- Can I create such a thing on Cloud JIRA? Or it has to be JIRA Server instance?
2- Where do I start with that exactly? Do i need to first create a Plugin, which hosts a Module, which then contains my conditional logic? Or what?? And what is that OnDemand?
I really hope someone can put me in the right path as now I am lost
I think you've almost got it, but you do need to decide whether to use a condition or a validator quite carefully
A condition hides a transition from a user for some reason. It's a simple yes/no decision on whether to display the transition, there's no way to feed anything back to the users because the system is designed to hide it completely.
A validator checks data on the issue after the user enters something. A lot of descriptions I see say "it validates what the user enters before committing it", but that is not quite accurate. A validator checks all the data that would be committed - you can have validators that don't check any of the data entered by the user. Validators can feed back to the user. If they pass, the transition moves on, if they fail, they can return an error message, which JIRA will give to the user.
So, to break down your main question:
>I want to create a Condition that through an error message to the user rather than just not allow them to make the transition on the workflow.
You'll need to rewrite the way JIRA works to do that. Conditions don't have feedback
>A Validator did not help as It did not allow checking values of custom fields.
They do allow checking of custom fields, but my guess is that you don't have any validators installed that can do that. JIRA ships with a very sparse set of validators, and most admins are very fond of adding the JIRA Suite Utilities which add loads (free, well supported, available on server and cloud - well worth a look)
>when I add validation to change value before transition for a certain existing field I get an error message even after changing that value.
I suspect your validator looked at the current field value, not the value the user just entered.
>create custom Validator.
@Nic Brough [Adaptavist] many many thanks for this detailed answer!
It is now clear what I am doing wrong and what I need to do
I will check the Suite Utilities you recommended.
Regarding my question about how Validators work, you said "...your validator looked at the current field value, not the value the user just entered." The thing is, when the user "just enters" a new value and then transition, this new value is not accepted by the Validator! How do I change a value for the validator to consider as new not current?
I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG