Dear ALL,
is there a way to implement in the Jira Data Center (I use version 9.12.5) the powerful Jira Cloud feature of the lookupIssues on the due date field?
Thanks in advance,
Vincenzo.
Hello @vincenzo_spatafora
What do you mean implement lookupIssues on Due Date field, as in access Due date field in the response of lookupIssues JQL?
Thank You @Kalyan Sattaluri for your reply.
Yes, correct and my JQL in the Lookup issues is "issue in childIssuesOf("{{issue.key}}")".
And afterwards, in log action, my log message is "List of Sub-Tasks is {{lookupIssues.key}} and the Due Date is {{lookupIssues.duedate}}".
From the Audit log, the list of the sub-tasks is nicely reported but NOT the due date.
Do you see a reason for that?
Thanks in advance,
Vincenzo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately, in Data Center, lookupIssues exposes only certain (basic) fields and we dont have option to expand that list.
It needs to be an update from Jira itself where they are expanding available fields like it is in Cloud, where all fields are accessible.
But, looking at your post, if all you want is to access sub-task fields, you dont need to do lookupIssues.
You should be able to reference it as {{issue.subtasks.key}} & {{issue.subtasks.Due date}}
Please try and let me know if issues..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Kalyan Sattaluri , appreciated your help.
I was trying that: the trigger of my rule is an issue transition: how can I pick all the associated sub-tasks?
And also, I need to take the max due date of all the sub-tasks tickets.
What would be the syntax in this case?
Kind Regards, Vincenzo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You reference it as I mentioned.. see screenshot below..
{{issue.subtasks.Due date}} <- gives you list of dates
{{issue.subtasks.Due date.max}} <- gives you max date
Please try to log above values like I have in my screenshot to verify you are seeing the correct values and do your next steps..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank You @Kalyan Sattaluri , we are almost there.
Yes, I see in the log what I expect.
Just the very last action is NOT performed: what I need now is that the issue wich has triggered the rule gets, from this rule, its Due Date updated to the max due date of its sub-task.
See please my rule flow:
Where the Edit issue fields is:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No need to do branch, just directly edit issue like below..
If it works, please accept answer so it benefits otehrs in the future.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks again @Kalyan Sattaluri but there is something wrong with the very last step (the Edit).
See please the Dates of the triggering issue either at Feedback status and after the transition (to In Progress); as you can see the Due Date, after the transition / and so the Edit, has even disappeared:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @vincenzo_spatafora
What is happening is your smart value {{issue.subtasks.duedate.max}} is resolving to null and so your field is getting wiped out.
Have your confirmed the out put of {{issue.subtasks.duedate.max}} by logging it? Can you share screenshot?
Last time I came across such an issue helping, the poster has 2 due date fields configured.
So, instead of referencing it as {{issue.subtasks.duedate.max}} , you need to reference it by its customfield value.. {{issue.subtasks.customfield_xxx.max}}
So, first log the {{issue.subtasks.duedate.max}} value and second, see if you have another field with the same name which is null..if so, find the customfield for the one you need to use.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Kalyan Sattaluri, sorry to reply only now but yesterday here it was holiday.
Find please attached the log action.
Where can I find the relevant custom field number? But is not the due date a System field?
I would like also to ask: in case there are 4 sub-tasks and I need to take the due date of the 3rd sub-task, what would it be the syntax to apply?
Thanks in advance for your help.
Kind Regards, Vincenzo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Find an issue where this due date field is already populated. For example ABC-1234.
Then in below URL, replace bolded parts, copy the URL, open new tab in browser, paste the URL and hit enter
https://yourdomain.net/rest/api/2/issue/ABC-123?expand=names
Then you should see JSON response. In the response, find the due date value you entered earlier. (ex - 2024-05-31)
When you find this value, see which field is it assigned to.
If it says custom field.. we need to use that field to edit your issue using advanced edit.
Please follow above steps and share screenshot of relevant section of your JSON.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank you: it has worked.
Thanks a lot for your great help.
Kind Regards,
Vincenzo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@vincenzo_spatafora Great to hear. Can you share what was the issue and solution..
Also, Please consider accepting answer so it benefits others in the future, thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
as you were alluding, there were 2 due date fields being configured.
I have already accepted the answer.
Thanks again,
Vincenzo.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome. BTW, I dont see answer as accepted. You have to do that to the first post. :p Thanks and have great day.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, lol, Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Forgot to mention that in your above URL, jira was missing, so for me is working like this:
https://yourdomain.net/jira/rest/api/2/issue/ABC-123?expand=names
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.