What kind of Field Values i can use on Post Functions?

Deleted user January 23, 2019

Hello Community. I want to set up an Easy Post Function: If you go from "In Progress" to "Resolve" The Time Spent of the issue will be set to 100%

It does´nwork and i think i did something wrong with the Field Value. On the Edit Mode is a small information: Please make sure that the value you set is valid for the project using this workflow. Otherwise, the transition may fail at execution time.

The Issue Field is: Time Spent and the Field Value is: 100%

Is that even possible that i can write 100%   ???

I can not attach an Screenshot, sorry

 

I hope you guys can help me

3 answers

0 votes
Dave Rosenlund
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 25, 2019

Hi, Ina.  As Nic says, it would be helpful to know which of the Jira Gantt apps you are using.  That way, the experts for that particular Gantt solution can chime in. :)

-dave

Deleted user January 25, 2019

Oh, Sorry. i Thought i sad that. We use Jira BigPicture Enterprise

Dave Rosenlund
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 25, 2019

@Tomek-SoftwarePlant   --- over to you :)

Tomek-SoftwarePlant
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.
January 25, 2019

Thanks @Dave Rosenlund :-) 

@[deleted] I'll look into this and let you know my thoughts soon. 

Cheers.

 

Tomek-SoftwarePlant
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.
January 28, 2019

Hi @[deleted], 

So, referring to your comment: 

I changed the Issue to resolved and the color changes into green in the Gantt Diagram but the Time Tracking is still on 0%.

On Remaining and Origin Estimate is 0m and no entry in time spendig. Thats normal, because i havn´t tracked any time.... But why is the percentage still on 0%, however the issue is solved and closed?

That is because of the current Time Tracking formula we use, which is:

100% - (100% * Remaining estimate) / Original estimate

So, if Remaining estimate and Original estimate values are equal (0m in your case) then, Time Tracking will show 0%. We are planning to introduce the new Time Tracking field based on a different formula (PPM-3217), which is:

Time spent / (Time spent + Remaining estimate) *100%

...and that would rather cover your case. 

* Be sure to open the hyperlink given above in Incognito Mode * 

As for now, you can use a different field for indicating progress. Please, find the steps below. Scriptrunner add-on is required.

1) Go to Jira Administration > Add-ons > BigPicture > Task configuration. 

2) Map "Progress" to Task progress field. 

3) Make sure Progress field is added to Screens for each IssueType in the Jira Project that is in the scope of your Program (created in BigPicture). 

4) Add a script post function to your project's workflow for the transition which changes status to Resolved/Closed. This should be something similar to: 

import com.atlassian.jira.component.ComponentAccessor
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cf = customFieldManager.getCustomFieldObjectByName("Progress")
issue.setCustomFieldValue(cf, 100)

...but if I were you I would rather consult the guys of Adaptavist first in order to find out if the script has some errors. 

5) Go to your Program, open its configuration (cog icon) and navigate to Perspectives. 

6) Remove Time Tracking field and add Progress field to the Selected Fields instead. Finally, click "Save". 

From that moment, if you close an issue, its Progress value should be automatically set to 100 - this will be reflected on the Gantt. I know that's probably not what you were after but still, this can be a good progress indicator and something you can use until PPM-3217 is implemented. 

Cheers.

0 votes
Deleted user January 23, 2019

Ok, maybe i ask the wrong question.

The Case is:

We have an Task/Issue and there is no Original Estimate set it up. Or any kind of Estimate and if this is the case und you set the Task to "resolve" it will still on 0% in the Gantt Chart. Even if you just want to add the Project Contract or something like this, then you have to set up the Estimate time. Do you know what i mean?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 23, 2019

Ah, I see, it's not the estimates, it's the completion that your Gantt Chart is measuring.

Which Gantt chart is it?  Although I'm not sure that matters too much - most of them have a simple not-done or done flag, which means you need to resolve an issue as done for it to understand that the issue is done.

Deleted user January 25, 2019

I changed the Issue to resolved and the color changes into green in the Gantt Diagram but the Time Tracking is still on 0%.

On Remaining and Origin Estimate is 0m and no entry in time spendig. Thats normal, because i havn´t tracked any time.... But why is the percentage still on 0%, however the issue is solved and closed?

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 23, 2019

Those % fields do not really hold % values, they calculate them from the estimate and worklogs.

Generally, you really do not want to be setting the time spent to 100% - it is supposed to measure the estimate, yes, so 100% could be completed, but in most cases, you actually don't want that, because you lose the information that says "we spent more or less time than estimated on it".  (Although if you do set it, you can still work it out from the history, but that is a right pain)

Anyway, if you're sure you want to lose sight of the estimate/actual data, you can simply set the remaining time to 0, or the used time to what the original estimate is.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events