Script to change the due date color if the due date is passed.which can be usable in script fields

jeetu July 26, 2017

it should  be usable in script fields provided by script runner

1 answer

0 votes
Christoph Schötz
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.
July 27, 2017

What is your question? 

jeetu July 27, 2017

Hi Christoph,

I am looking for groovy script, which can be used to change color of due date field on the view issue screen for the condition mentioned below .

3 days before due date- yellow highlighter

Due date or later- red highlighter

would be using this groovy script code in scripted fields provided by script runner

Benny June 9, 2022

Hi Christoph,

I'm also interested in a groovy script like this for scriptrunner.

Many thanks and best regards
Benny

Christoph Schötz
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 9, 2022

Hi Benny,

have you checked the Adaptavist Script Library?

There are quite some examples in it.

Unfortunately it is hard for me to post some code example here so I will try posting it in a google doc like this - does it work for you? Link to google doc

Best regards

Christoph

Benny June 13, 2022

Hi Christoph,

thank you very much for your suggestion!

As far as I can tell, the date inputs for Duration need to be of type LocalDateTime.

I've tried to define a custom scripted field but this seems to be incorrect as we do not want to define a new field but rather overwrite the style of an existing one.

Could you please elaborate on how to connect the style adjustments with the issue detail view shown on the RHS when selecting an issue in active sprint view?

Which is the ScriptRunner category I have to choose an element from?

Many thanks in advance.

Best regards
Benny

Christoph Schötz
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 20, 2022

Hi Benny,

thank you very much for your reply and you're welcome!

I would say Scriptrunner Fragments should be the thing to look into for this: Fragments documentation 

With web panels you can add custom java script to pages so that you could manipulate the style of an existing field: documentation

Hope this helps?

Best regards

Christoph

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events