Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Set condition in Create Issue transaction.

Deleted user July 9, 2011

Hi every one.

I want to force users to input a non-zero value for orginal estimate field.Can I use a condition on Create Issue transaction?

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

3 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 9, 2011

You can use a validator, not a condition. For example, the fields required validator from jira suite utilities.

Getting to the validators for the Create transition is not intuitive. First, click the first state, normally Open. Then from the top right of the screen in a panel labelled Workflow Browser click the Create action.

Then you can add the fields required validator, and select the Remaining Estimate field to be non-empty.

UPDATE following comments below:

OK, so non-empty AND non-zero. In which case the fields required validator won't work on its own. You can AND it with a "field not equals" value of which there are probably several floating around.

Personally I would use a simple scripted validator from the script runner where the validation field is just

issue.getEstimate()

and the error message you can put:

Original estimate should be entered and non-zero.

Deleted user July 9, 2011

Dear Jamie
Your answer is noticeable and helpful, but another problem that exist is my manager want me to define a field that ignore 0 value for it. Because users can set it to 0 value for tasks which they have no estimate for them.

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 10, 2011

So you want to enforce that it's only non-empty or zero?

cheers, jamie

Deleted user July 10, 2011

both of them!

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 10, 2011

Amended my answer because this thing says my comment is > 600 chars, even though the text on the right says 187 chars left.

0 votes
Deleted user July 10, 2011

Dear dementiev
your suggestions have been failed my system on next start up. I face to this problem when trying to access jira through my browser.

HTTP Status 404 -


type Status report

message

description The requested resource () is not available.


Apache Tomcat/6.0.32


How I can solve it? :( :( please help me ASAP

0 votes
dmitry dementiev July 10, 2011

if Jamie`s approach didn`t come to you - you can always extend com.atlassian.jira.web.action.issue.CreateIssue or even 'substitute' it with your own class (in atlassian-plugin.xml)

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 10, 2011

Only works for pre-OSGi plugins, also imho that's a dangerous approach. Quite likely to break when you upgrade, also you're likely to hard-code the project key/pid, and it breaks the separate between workflows and projects. Ie all the workflow logic should be in the workflow imho.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events