Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

force user to set field value in post function

David Goldstein June 4, 2018

When a QA user moves an Issue from state "Resolved" to "Verified", for example, I want a dialog to pop up and force him to set the value of Resolution.

How do I do this? Which Post Function?

3 answers

2 votes
Nic Brough -Adaptavist-
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.
June 4, 2018

A post function is the wrong place - they execute after a transition has passed all validation and can not stop the transition.

The right place is a "validator" on the workflow.

However, for resolution, you don't need to one.  Just put it on the transition screen and the user has to fill it in.

David Goldstein June 4, 2018

Great. How do I see the Transition Screen?

Alec Jasanovsky June 4, 2018

Create your transition screen like any other screen, then inside the workflow, select the transition you want the screen to appear on. 

 

Once inside the transition, select Edit > then select the Screen Option field and set it to the screen you created before. 

1 vote
Marcos PS [DEISER]
Contributor
June 4, 2018

Hello David,

You just need to add a transition screen with the Resolution field. In order to make this field mandatory, you can use a JSU validator or a ScriptRunner behaviour.

Regards,

Marcos.

David Goldstein June 4, 2018

Sounds easy, but you are talking to a newbie with zero experience with Jira. Details please.

Like Melody KirkWagner likes this
Marcos PS [DEISER]
Contributor
June 4, 2018
Nic Brough -Adaptavist-
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.
June 4, 2018

You don't need to do most of that.  Resolution is set whenever it is on an "edit" type screen.

There's two parts to it

First, go to and edit the workflow, and find the transition you want to ask the user for a resolution on.  In the properties box for the transition, you will find the current screen in use.  If there is none, you can change it to the "resolution screen"

Second step might not be needed if you already have a screen for resolving issues -but go to Admin -> Issues -> Screens and add a new screen, putting at least "resolution" on it.  Then go back to the workflow to select it

David Goldstein June 4, 2018

I created the screen, but I cannot see where to attach it to the transition. Is it a Property I have to add. Because there is not "Add Screen" when I edit the transition.

Marcos PS [DEISER]
Contributor
June 5, 2018

Hi again David,

You can add the transition screen editing you workflow, then, select the desired transition and use "Edit" button, in the next screen you will be able to select the scree you have created previously.

image.png

Greetings!,

Marcos.

David Goldstein June 5, 2018

Finally. Thanks. I hit edit from the Transition in the tabular form and got nothing. Now from the diagram I finally am able to edit Screens. This was far from obvious. Thanks.

David Goldstein June 5, 2018

Ok, I have the Screen on transition, but when I create a new issue I get an error that Resolution does not have a legal value. And, I from the drop-down I cannot set it to Unresolved (or Empty).

I tried putting in a Post Function "The Resolution of the issue will be cleared" but it didn't help.

Marcos PS [DEISER]
Contributor
June 5, 2018

Could you attach a screenshot of the transition validators tab as well as post-functions tab?. Additionally, the available resolutions for whole instance are defined here http://jira.domain.com/secure/admin/ViewResolutions.jspa (replace http://jira.domain.com for your Jira's base URL).

David Goldstein June 5, 2018

Post Functions.jpgValidators.jpg

David Goldstein June 5, 2018

About your suggestion edit the list of values for Resolution. I went to .../secure/admin/ViewResoluions.jspa and added "Unresolved" as the first value in the list. It worked. However, I thought that the Reports differentiated an empty value from any other value. So now will my reports work? Is my new "Unresolved" value the same as not finished, as far as the Report generators are concerned?

Marcos PS [DEISER]
Contributor
June 5, 2018

I see... is quite rare that you want to fill the resolution in the issue creation, anyway, this is the creation screen, not exactly a transition screen, you have to set back to none this transition screen, then edit the appropriate screen. You have to go to project admin view, then, under the Screens section, drill down until you find the screen associated to the creation function of your issue type.

By the other hand, ensure the Resolution field is visible under the field configuration scheme.


Here you have some documentation that can help you on a better understanding.

https://confluence.atlassian.com/adminjiraserver/associating-a-screen-with-an-issue-operation-938847289.html

https://confluence.atlassian.com/adminjiraserver/project-screens-schemes-and-fields-938847220.html

You also can take a look to the following link in order to check what "Resolution" is and how to customize it.

https://confluence.atlassian.com/adminjiraserver/defining-resolution-field-values-938847105.html

Regards,

Nic Brough -Adaptavist-
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.
June 5, 2018

> About your suggestion edit the list of values for Resolution. I went to .../secure/admin/ViewResoluions.jspa and added "Unresolved" as the first value in the list. 

Ah, ok, stop and take a step back.

You have put the resolution on the "create issue" screen, you need to remove it immediately.  As before, it should only be added to the "transition" screen in the workflow, never a create or edit (well, sometimes, but those are rare edge-cases)

You need to

  • Rename your "unresolved" resolution as "do not use this" with a view to removing it later
  • Remove the mandatory flag in the field configuration scheme
  • Remove the resolution field from the "create" screen

The reason is that Jira uses the resolution field to determine whether an issue is "resolved".  If the field is empty, then Jira displays "unresolved" for you and considers it "unresolved".  If the field has any value, then the issue is "resolved".  That value could be anything - Fixed, won't fix, done, penguin, unresolved, not done - all of those mean "resolved" to Jira.

Because you've put the resolution as mandatory, which is what we said not to do, then you have to fill it in on create, which is how you've ended up with it on the create screen, where you don't want it.

David Goldstein June 5, 2018

Where do I see the field as mandatory so I can make it not mandatory?

Also, I edit the create issue transition and I see Validators, Post Functions, and Properties --- I do not see Screens. Where is my create Screen?

David Goldstein June 5, 2018

What is the difference between a Workflow and a Workflow Scheme?

David Goldstein June 5, 2018

Okay, I got this. The scheme is just the mapping of Workflow to Issue type.

Nic Brough -Adaptavist-
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.
June 5, 2018

>Where do I see the field as mandatory so I can make it not mandatory?

It's in the "field configuration screen scheme" - that is similar to workflow schemes, in that it says "for this issue type, use this field configuration scheme", so you'll need to descend into that to find the field and flag it as optional.

>Also, I edit the create issue transition and I see Validators, Post Functions, and Properties --- I do not see Screens. Where is my create Screen?

This is in the "issue type screen scheme" - again, that level maps issue type to "screen scheme", and a "screen scheme" tells Jira what screens to use for Create, View and Edit (those are actions outside the workflow)

David Goldstein June 5, 2018

I drilled down to https://.../secure/admin/ViewIssueFields.jspa  and I see the various fields. In the Actions column of the table (last column) some of the fields allow me to set the field to Optional or Required, but some of the fields, like Resolution, do not offer a choice. See attached screen shot. BTW, notice that the field after Resolution, "Scheduled Ver." has additional properties: [Autocomplete Renderer] --- what's that?Field Config.jpg

Nic Brough -Adaptavist-
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.
June 5, 2018

If you have no validator on the create transition, and the resolution is not allowing it to be set mandatory (some versions of Jira did it, but not yours, so we can forget that), then you must have an add-on providing some validation that we can't see.

As the field config can't be the culprit, I would want to check the create issue validation very carefully.

By the way, I think you're doing really well as a newbie - you've hit pretty much the most confusing part of Jira Admin stuff head on (fields, and their complicated quirks - took me a long time to get my head around them)

David Goldstein June 6, 2018

I appreciate the comment -- I'm feeling pretty stupid and I really appreciate all the help.

I'll start looking for anything dealing with creating issues.

0 votes
Fazila Ashraf
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 4, 2018

Hi @David Goldstein

 

Have a look at https://confluence.atlassian.com/jirakb/mapping-a-screen-to-a-workflow-transition-720634253.html to help you with associating the screen to the transition..

For making the field required during transition, refer to https://confluence.atlassian.com/jirakb/how-to-make-jira-applications-fields-required-in-a-workflow-transition-691011903.html . But it needs the jira suite utilities plugin to be purchased.

 

Hope it helps

David Goldstein June 4, 2018

I don't have confluence. Another option?

Nic Brough -Adaptavist-
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.
June 4, 2018

You don't need Confluence, it is providing the public documentation system that Fazila is pointing at.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events