Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do you clear description when changing project or issuetype?

Tim Perrault
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 Champions.
July 30, 2019

I was trying to set a default description, which I was able to do. My problem is when I change the issuetype the description is carried over. This also occurs when I change the project. I have the mapping set to a single project and single issue type. I was even trying to get past the issue with putting some validators in script that would check the issue type, but still no success. 

 

Jira v7.13.1

ScriptRunner v5.5.9 

 

def desc = getFieldById("description")

def defaultValue = """
{color:#505f79} _Complete this Story description using the following:_ {color}

*As a* <"role">

*I need*: <requirement or feature>

*So that* <goal/value>

"""

def accept = getFieldByName("Acceptance Criteria")

def acceptValue = """
{color:#505f79} _Include the Acceptance Criteria for this Story in the form of "Test Scenarios". If the criteria is documented elsewhere, provide the link._{color}

Test Scenario:

Test Scenario:

"""

if ((getActionName() == "Create") && (issueContext.issueType.name =="Story")) {
desc.setFormValue(defaultValue)
accept.setFormValue(acceptValue)
}

 

2 answers

Suggest an answer

Log in or Sign up to answer
0 votes
Josh
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!
August 27, 2019

Hello,

I have similar problem because we want to do the scheduling with portfolio and use the target dates in a second tool for visualization. So far I tried to copy the values from the origin field to a new custom field because the tool is not able the access the portfolio custom fields. For me as an experienced Jira user this sounded pretty easy in the first hand. Unfortunately I couldn't solve this on my own and therefore I would appreciate any help on this topic :) 

Any idea how this could be done? We really want to use portfolio but this only possible if we don't have to do update the dates manually. 

Thanks,

Josh 

0 votes
shafqat
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 26, 2018

Hi Rommel,

Currently, it isn't possible to use script runner to automatically copy scheduled dates into target dates.

However, there is functionality within Portfolio to do this. If you select all the issues in your plan, you can choose the "Set targets > Set target dates from calculated" operation to set target dates on all the issues. Afterwards, you can commit them to be reflected in Jira. For details please see here: https://confluence.atlassian.com/jiraportfoliocloud/add-target-start-and-target-end-dates-868977060.html#Addtargetstartandtargetenddates-Settargetdatesinbulkusingyourcalculatedstartandenddates

Kind regards,

The Portfolio for Jira Team

TAGS
AUG Leaders

Atlassian Community Events