Hi All,
I've created a date picker custom field.
I wish to give it a default value of {{Now}}+X Hours
Is there a simple wat to do that?
Very simple.
I have a transition screen with a date picker field / I am able to set its default value to { now } but am not able to set it to few hours ahead of the current time.
Now for the motivation:
We allow users to assign an issue temporarily to someone else. Setting the field to a future time will reassign back to current user automatically
They asked for a default value of 12h from current time so they don’t have to manually enter this. If this interval suites them than it’s set. If they want another time they ya of course modify the field’s value.
You could do this with automation but what would be your trigger?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good question. I do not have an answer for that yet.
let me tell you more about the scenario. I’ve created a looped transition for asking for more information. For the transition I’ve created a screen where the user can set the assignee, the question and the time by which he needs the answer.
I than created an scheduled rule which checks whether there was answer given and if not it assigns the issue back to the one who asked the question. (And also sends a message to both users)
now, our rnd manager asked that the default time for waiting would be 24 hours. This is why I wanted the date picker to have a dynamic default value.
maybe I am tackling the whole questioning idea wrong so I am more than ready to hear other suggestions
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I need the trigger to be something between when the user presses the transition button and before he execute the transition itself. Therefor I do not know if it is possible.
Any Idea?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am still a bit puzzled by what problem you are trying to solve.
Anyway...you may want to consider using the field value changed trigger, checking for a change to your custom field. That may work more reliably as that transition may fire prior to the field change...leaving the data not yet set.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill,
Sorry for the long delay in returning here.
Here is the thing:
I have created a looped transition that allows users to ask one each other questions and get answers. (The main benefit is that the issue status and assignee is changed when asking so the one who asks does not see the issue on him anymore and when answering the issue automatically returns to the old status and assigned back to the person who asked the question.)
This works like charm.
In addition we have a time field where the person asking can set a timeout for waiting. If the timeout is reached without the other person replying than they both get messages and the issue returns to the person who asked and the status it was in.
Now - They asked me to set this timeout field default value to now + 12 hours.
This means that if the person asking does not change this field, the timeout is set to 12 hours.
He of course may change it to anything else or delete the value so there is no timeout. (in this case the issue stays at the receiver until answered.)
This is the need.
I could set the default value to now however I could not set it to now+12 hours.
Hope now it is clearer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
One approach to do this is not to set a default value. Instead use a transition-trigged rule which checks if the timeout field is empty, and then set it to {{now.plusHours(12)}} as shown here: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Example.6
If instead the person asking set the timeout value, that is used rather than the incremented value.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If the field is empty it means the user does not want to set a timeout but wait as long as is takes for the answer to be given.
I therefore set a default value of now to the field and set the following automation rule:
condition:
issueInput.fields.customfield_10048 != null && issueInput.fields.customfield_10048 < {{now.plusHours(0.5)}}
than
issueInput.fields.customfield_10048 = {{now.plusHours(12)}}
Similar to what you suggest.
I hope it will work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Checking this I find the field empty and now see there is a bug registered in Jira log for this. What to do?
How can I set a default value for this field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the error you are seeing in the audit log? Would you please post an image of the log showing the error and your complete rule? Thanks!
One challenge with your solution approach is that you are trying to represent three conditions/pieces of information with one custom field:
Given automation rules might not fire when expected (due to rule errors, performance, and outages) that may lead to unpredictable behavior.
Another solution approach would be to use a single-select dropdown field of possible response times: No hurry, 1 hour, 4 hours... and then when the field changes, compute the timeout field by incrementing {{now}} or clearing the timeout for "No hurry".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not yet tired the rule so there are no errors.
What I see is that the default value of the field is not populated. The field is empty.
And I see a bug mentioned here:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.