Add current date and fixed text when transitioning an issue

Andrei Chis August 12, 2016

Hello,

Is there a way to add current date and a fixed text to a multiline field in an issue, when the issue transitions from one state to another?

I'm currently a bit stuck. I added "Fixed text and %%CURRENT_DATETIME%%" in a multiline text as a post function to a transition, but when I transition the issue, the current date is not displayed. Its still displayed as text %%CURRENT_DATETIME%%.

Using only %%CURRENT_DATETIME%% without any text before or after it works, displaying the date, which makes things more confusing.

Any thoughts on this?

Andrei

2 answers

0 votes
Deleted user August 12, 2016

Try adding two different Post Functions;

1 - Add the Date stamp

2 - Add the text using the "append" option.

or change the order as needed.

0 votes
Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 12, 2016

IN the docs it says - "If you use %%CURRENT_DATETIME%%
as the custom field value (exactly this, nothing more), the current date and time will be set as value."

Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 12, 2016
Andrei Chis August 12, 2016

But this makes no sense, cause they also say that:

 Additionally to enter text or numbers as value, you may use the following: 

  • You may use macro '%%CURRENT_USER%%' to insert the function caller.
  • You may use macro '%%CURRENT_DATETIME%%' to insert the current date and time.


By "additionally to enter text", I understand I can use text and one of those.

Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 12, 2016

where is it in the docs? can you share the link.

Andrei Chis August 12, 2016

Its in the same page you sent me.

https://jsutil.atlassian.net/wiki/download/attachments/786627/JSU-UpdateIssueCustomField-ConfigurePostFunction.png?version=3&modificationDate=1392117818802&api=v2

Maybe I'm not understanding this well enough. I just want an automatic comment that says: "Fixed on 12/08/2016" to be set whenever I transition an issue.

Ignacio Pulgar
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.
August 12, 2016

I'm not a native English speaker, but I think that "additionally to enter text" is quite ambiguous, as it may be interpreted also as "an additional option besides of entering text".

Based on that quote, ambiguity might be decreased (if not suppressed) by using a more appropriate phrase like:

  1. Alternatively to enter text or numbers, you may use a macro by entering just one of these exact sequences of characters as its exact value, without any additions:
  2. You may also insert dynamic phrases by intercalating any alphanumerical characters with any of the following exact sequences of characters, which will be substituted by the value returned by a macro:

Suggest an answer

Log in or Sign up to answer