Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Copying Field Value (Date Picker) into Summary

Matthias Brockmeier February 14, 2023

Hello everyone,

 

as a Jira Rookie I am currently experimenting with certain workflows and I stumpled over the current issue:

 

In the Create-Transition of a workflow I implemented a Post Function which copies the Start Date (which is filled by the user in the Request Form) into the summary.

 

It does work but it also copies the time of day into the summary.

For example: The user enters "01.03.2023" into the field and the post function changes the summary to: "01.03.2023 00:00"

 

The field type for the Start Date is a date picker (not date time picker).

 

 

Thanks for your advice.

3 answers

1 accepted

2 votes
Answer accepted
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 16, 2023

Oops, I didn't check the initial question before expanding on @Evn Tomeny (Appfire) 's answer. 
On Server/DC, You can use the Set Field Value post function, select the Summary field as the field to set, choose "Constant or Groovy Template" as the Value type, and use this as the value:

${issue.get("summary"} - ${issue.get("Start Date").format("dd.MM.yy")}

(or any other date formatting you want - see https://docs.oracle.com/javase/8/docs/api/java/text/SimpleDateFormat.html)

Matthias Brockmeier February 16, 2023

The expression is working. Thanks a lot.

Like Deleted user likes this
2 votes
Evn Tomeny (Appfire)
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
February 14, 2023

I'm experiencing the same behavior using your JSU configuration. It's possible that you've encountered a bug. I can get this to work the way you want with JMWE, but not with JSU. Just wanted you to know that I am able to replicate the issue. Let me know if you happen to have JMWE as well, and I can share that solution. Otherwise, it might be worth submitting a ticket to Appfire.

Matthias Brockmeier February 14, 2023

We have JMWE running. I will try to get it done with JMWE. Thanks for your answer.

Like Deleted user likes this
Evn Tomeny (Appfire)
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
February 15, 2023

@Matthias Brockmeier 

To accomplish this with JMWE, simply add the "Set issue fields" Post Function, choose Summary for the Current Issue, then use some simple code to add the Start Date after the Summary:

{{ issue.fields.summary }} - {{ issue.fields.customfield_10057 }}

(Replace the custom field number with your custom field - JMWE lets you select an issue field while filling out the field value).

Screenshot 2023-02-15 at 9.01.57 AM.png

Notice I've put a dash between the original summary and the Start Date custom field. Feel free to replace this with any delimiter you want.

Hope this helps!

Like Deleted user likes this
David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 15, 2023

Note that you can format the date using the date filter: https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/78481586/date+filter#Date-formatting

Like Deleted user likes this
Matthias Brockmeier February 15, 2023

@Evn Tomeny (Appfire) 

The "Set issue fields" post function is not available for me. Do the features differ regarding JMWE Version or which Jira Version we use? JMWE is Version 8.1.2 and should be the latest. Jira Version is Jira Service Management 5.4.2 (On Premis/Server).

 

Thanks for your help.

0 votes
Simon König
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.
February 14, 2023

Hello,

could you specify what Post-Function you used and how you referenced /copied the date in your Summary?

Matthias Brockmeier February 14, 2023

Hello,

 

thanks for your answer. I used a Post Function called "Copy Value From Other Field (JSU)" which comes form JSU Automation Suite Plugin.

 

There it is configured as "Copy Start Date" to Summary (append)

 

If there is a better way with on-board-tools, I am eager to hear.

 

Kind regards

Simon König
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.
February 14, 2023

My first idea is to drop the Date-Format Jira and JSU uses (Make the date a string), but since you would want to use the Date-Picker this would just be a workaround.

The other solution might be to use a Post-Functions to append your summary via a groovy script, which can influence your time format (Scriptrunner/JMWE). I think JSU is fixed on the dd-mm-yyyy hh:mm format.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events