Need a condition for Jira's workflow: something like
// If input equal or less then true
jira.issue.worklog.value <= jira.issue.originalestimate.value
return true;
Else
// If input more than then true false
jira.issue.worklog.value > jira.issue.originalestimate.value
return false;
});
Any help will be much appreciated :)
Hi Oliver,
Thank you for your response! So far the Cloud Workflow app is the most user friendly as ScriptRunner and the others are a bit more complicated.
I have tried your suggestion and it works perfectly!
Blocking the transition to which status I choose it to.
However, instead of blocking the transition, I need something to block the actual action of a user logging to not be allowed to log more than the original estimated field. Is this maybe possible?
Hi Kate,
it is definitely possible to have conditions in Jira's workflow. There are quite a few conditions (and validators) that come out-of-the-box and even more that come from Marketplace Apps.
From you code examples I gather that you want to hide a transition if more work has been logged than was originally estimated; you will need a Marketplace App for that. There are few options available, but in my biased opinion Cloud Workflows is a great option, as it supports Jira Expressions as workflow conditions.
Here's how you would solve your scenario with Cloud Workflows:
issue.timeSpent <= issue.originalEstimate
Publish your changes and you're done!
Full disclosure: I work for Jodocus, the Vendor who created Cloud Workflows. Let me know if you need any help getting started, I'll be happy to help!
Cheers,
Oliver
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kate,
Glad to hear our app works for you!
However, instead of blocking the transition, I need something to block the actual action of a user logging to not be allowed to log more than the original estimated field.
I understand that it would be even better to catch invalid input (ex. overbooking) at the moment the user enters data (ideally at the UI level), but I'm afraid that is much harder to achieve with Jira. Specifically with Jira Cloud I am not aware of any way to perform this kind of input validation – although it would certainly be a useful feature.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kate - Welcome to the Atlassian Community!
I don't believe that is going to be possible with out of the box Jira. However, if you use an add-on like JMWE or ScriptRunner you should be able to do that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would also suggest the Automation app, pretty easy to use.
Concerning validation of time logged it also can be done with automation, little bit complicated, but they got pretty good documentation. You should start with updated field trigger and advanced condition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sounds reasonable. I guess you could dump the value into a couple of custom fields and then compare them also.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As simple as it sounds in theory they said Jira Cloud is just too limited and that there are no workaround apps for it as there is also a Cloud bug when it comes to validating the timeSpent with originalEstimate.
I am now looking into creating a trigger to transition an issue once a user logged more time than the estimate field with the Automation app.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So sorry about that - would have thought they would be able to compare two fields. Is there something more involved than that?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.