Post function Time Spent not working in a simple workflow Jira 4.4

Carlos Reyes
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.
March 3, 2013

G'Day Jira Gurus,

I have a very simple workflow

Create (status) ------ Create Transition ----> Closed (Status)

I am using post functions in the create transition

All Validators (1) Post Functions (9)

Add a new post function to the unconditional result of the transition.

The Assignee of the issue will be set to dbond.
Edit | Move Down | Delete
— THEN
The Original Estimate of the issue will be set to 5m.
Edit | Move Up | Move Down | Delete
— THEN
Creates the issue originally.
— THEN
The Time Spent of the issue will be set to 5m.
Edit | Move Up | Move Down | Delete
— THEN
The Resolution of the issue will be set to 1.
Edit | Move Up | Move Down | Delete
— THEN
Set issue status to the linked status of the destination workflow step.
— THEN
Stores updates to an issue (no change history is created).
— THEN
Re-index an issue to keep indexes in sync with the database.
— THEN
Fire a Issue Created event that can be processed by the listeners.
Edit

The Post Function Time Spent is not working. Every thing else works fine

Any ideas why the Post Function Time Spent is not working?

I appreciate your assistance

Carlos

1 answer

1 accepted

0 votes
Answer accepted
Dave C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 3, 2013

From what I can see there are two current problems:

  1. Time logged does not seem to be working - I believe this is a bug and have raised it under JRA-31929. Please watch that issue for future updates from the devs and PMs.
  2. To set a resolution on the issue during Create Issue, as in our Special Cases you'll need to configure it in a particular way. Please check out those docs as they instruct how to do so.

However, this is a bit of an edge use case and not exactly how we expect JIRA to be used. Is there any particular reason for creating issues this way? If we could get a better understanding of what the context is for this, we may be able to suggest some other options. Specifically, what's the user trying to do with this behaviour? It would make sense to log work against one issue rather than creating an issue for every 5 minute block. For example, say you need to track administrative tasks for a month, you could have one issue open for that month and log each section of work in there. When that month is over, you can create a new one. I suggest keeping it monthly as excessive log tracking in one single issue is known to cause problems.

Carlos Reyes
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.
March 3, 2013

Thanks David,

The resolution is working fine and the documentation was instrumental to achieve that. Basically the problem I have is a bug as reported in JIRA-31929

I have a client who wants to create issues by email only for statistical pourposes.

She wants that the issues to be created closed with specific assignee assigned and time spent set to 5 minutes. (It does not mean that an issue will be created every 5 minutes but when she actually works on one and email it to Jira then the time spent should be around 5 minutes)

Anyway, she still want to go ahead but It would be useful to have this "Time Spent" fixed (I am watching issue JRA-31929)

Cheers

Carlos

Dave C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 3, 2013

You're welcome! Glad to hear that helped you with the resolution. I suspect that the bug may not actually be fixed as setting that time logged field can break GreenHopper time calculations.

I'd suggest looking at an alternative solution as well, for example you could write a script using Script Runner that would log work - there's another example question on this topic that may assist: https://answers.atlassian.com/questions/115221/set-worklog-by-script

Suggest an answer

Log in or Sign up to answer