The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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 :)
Thanks for the reply John. I realized Jira's out of the box settings does not allow something this specific.
The coding apps are a bit difficult. I would need help into writing the correct code for this.
JMWE offers great support with their syntax, as well as others here. Should be something straight forward.
Dear John, just wanted to let you know that it is also not possible with the JMWE app after their developers told me they do not support this for Jira Cloud users.
So sorry about that - would have thought they would be able to compare two fields. Is there something more involved than that?
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.
Sounds reasonable. I guess you could dump the value into a couple of custom fields and then compare them also.
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
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,
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.
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.
Dear Blazej Borucki,
Thanks. I managed with the Automation for Jira application.
👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events