Required / Optional fields

View: New views
15 Messages — Rating Filter:   Alert me  

Required / Optional fields

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

We have a workflow set up in JIRA. At the time of creating defects some fileds are mandatory and some are not.

However whilst we go through some workflow actions, we want the ability to force users to add in data on the field "FIXED IN" (software iteration). For example a defect gets reported and then goes through the software cycle and at the point it is code reviewed and released to testing we want the ability to force the user to fill in the "Fixed In" attribute so that we know which iteration the update is in.

I am told that this is not possible however as required fields must be populated at the time of creating the defect. Is there no way around this, perphaps some other method of implementing this basic fucntionality.

I believe the version is 3.13

Thanks in advance.
--
Post by glabana - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38433
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Required / Optional fields

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Not off the shelf, but several plugins provide "field mandatory on workflow transition"

I use the one in the [Jira Suite Utilites|http://confluence.atlassian.com/display/JIRAEXT/JIRA+Suite+Utilities] but there are others.
--
Post by broughn2 - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38433
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Required / Optional fields

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi thanks.

Do you know of any other plugins
--
Post by glabana - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38433
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Required / Optional fields

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There are loads in the [library|http://confluence.atlassian.com/display/JIRAEXT/Home] but I don't know which ones might contain mandatory field functions.  I mentioned it because I'm sure I've seen them, but the JSU is working for me, so I've never followed up the others.
--
Post by broughn2 - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38433
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Required / Optional fields

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok I have been playing around with this and it does force fields to be mandatory on window transition.

However what i need to do is to state that on a workflow action a custom field that may or may not have a value present needs to be updated.

For example:

Fixed In Version = 100

Then on workflow action: "Code review passed" i want the ability to force the user to update the "Fixed In Version" even if it has a previous version present

How can I do that please.
--
Post by glabana - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38433
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Required / Optional fields

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Now that's a bit more difficult - you'll need a validator that can detect the old value and check that the new one has been changed.  I am not aware of a plugin that provides that at the moment.
--
Post by broughn2 - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38433
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Required / Optional fields

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

can it be done with custom code?
--
Post by glabana - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38433
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Required / Optional fields

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I forgot, you could also try to clear the value as the screen is drawn using some javascript, or possibly the [Groovy runner|http://confluence.atlassian.com/display/JIRAEXT/Groovy+Runner]
--
Post by broughn2 - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38433
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Required / Optional fields

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Nic very helpful.

If you do come across a plugin or anyone esle does then please let me know.
--
Post by glabana - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38433
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Required / Optional fields

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hrm... do you mean you want to force them to enter a *different* value, or just force them to re-enter a value, to be sure that they gave it some thought? I think that could be annoying, but anyway.

I don't think you can set it to nothing on a post-function, because you actually want to set it as the page draws, if you set it after they commit it's too late. Unless you set it to nothing on a post-function on some previous transition.

I'd consider having a dummy "fixed in version" field that is only displayed on this screen. Then you add a post-function that copies it to the real one.

The JS idea sounds good but I think would be difficult because you only want it to fire on this one particular transition, and checking states and transitions is hard when you put the JS in the field desc.

cheers, jamie
--
Post by JamieEchlin - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38433
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Required / Optional fields

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>>Hrm... do you mean you want to force them to enter a different value

I want the user to force an entry with a different value.
--
Post by glabana - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38433
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Required / Optional fields

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK... I would either then use a simple groovy validator script to ensure the submitted value differs from the "current" value, or you could use the [behaviours plugin|http://confluence.atlassian.com/display/JIRAEXT/Behaviours+Plugin] to do it in a slightly more user-friendly way.

Start off with a validator though, it's easier.

cheers, jamie
--
Post by JamieEchlin - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38433
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Required / Optional fields

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

When you say "Start off with a validator though, it's easier." I assume you refer to a "groovy validator script"?
In your experience what is easier to implement for non developers?
Thank you for your advise it's been very helpful.
--
Post by glabana - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38433
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Required / Optional fields

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, I do. I find it far easier than writing a fully-fledged plugin. I'd do you an example but I'm tied up right now, if I get a chance later I will post one.

cheers, jamie
--
Post by JamieEchlin - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38433
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user

Re: Required / Optional fields

by forums-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here's an example *validator* function. Note that fix and affects version are *multi*-selects... I'm not sure what behaviour you want exactly, I've just this so the version(s) the user enters must be different from what was in there previously. You need to install the groovy runner plugin to use this.

{code}
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.IssueManager
import com.opensymphony.workflow.InvalidInputException

ComponentManager componentManager = ComponentManager.getInstance()
IssueManager issueManager = componentManager.getIssueManager()

Issue myIssue = issue

def currentVersions = myIssue.getFixVersions()
def previousVersions = issueManager.getIssueObject(myIssue.key).getFixVersions()

if (currentVersions == previousVersions) {
    invalidInputException = new InvalidInputException("You must change the Fix Version.")
}

{code}

cheers, jamie
--
Post by JamieEchlin - online at:
http://forums.atlassian.com/thread.jspa?forumID=46&threadID=38433
_______________________________________________
Jira-user mailing list
Jira-user@...
To unsubscribe or change your options visit this page:
http://lists.atlassian.com/mailman/listinfo/jira-user