Sorry, we don't support your browser.  Install a modern browser
This post is closed.

Support Behaviours on Issue View#100

As a ScriptRunner Admin,
I would like to set up behaviours on issue view,
So that I can apply my business rules throughout the workflow of my issues

Pleaes comment with detailed use cases - they are very helpful!

a year ago
Changed the status to
Gathering Interest
a year ago
K

I would like to have this feature as well. It would be somthing that we can apply a rule when a custom field has changed or edited. It has been a limitation what we can do with ScirptRunner in the JIRA Cloud. For example, we are using a formula for the Priority field based on Severity and Necessity. This behavior only limited in the Create issue screen. We would like to set the rule/behavior to update the Priority field when there is a change in Severity or Necessity after the the issue has been created.

a year ago
K

We need this feature if without this we are not able to fully control the workflow like the example we set a default value for one of the fields with read-only and deduct the value using the scriptrunner post function after each trigger so we can limit the time of retrigger without letting other user edit the value.

a year ago

Hi Folks! Wanted to give you an update on this: Atlassian is currently in progress with and as soon as they release it, we will support it in Behaviours. Thanks!

10 months ago
1
Changed the status to
In Progress
9 months ago
1

We need this feature to make fields editable during specific issue statuses (e.g. review, approval) and allow only specific group/role to edit these fields.

Edit:
Maybe it’s more relevant if I give an example. Here’s the kind of conditions that are evaluated to determine if a field should be writable, assuming transitions are also supported:

def isInGroupChangeCoordinators = groupManager.getUserNamesInGroup(groupManager.getGroup(‘coordinators’)).contains(currentUser.name)
def isProjectLead = projectManager.getProjectsLeadBy(currentUser).contains(project)
def isInGroupQA = groupManager.getUserNamesInGroup(groupManager.getGroup(‘qa-managers’)).contains(currentUser.name)

for (fieldName in [‘Description’, ‘Category’, ‘Impacted Deliverables’, ‘Fix Version/s’, ‘Assignee’,
‘D&D Alpha Outcome’, ‘D&D Beta Outcome’, ‘Transfer Outcome’, ‘Validation Outcome’])
def field =
fieldName == ‘Priority’? getFieldById(PRIORITY) :
fieldName == ‘Assignee’? getFieldById(ASSIGNEE) :
fieldName == ‘Description’? getFieldById(DESCRIPTION) :
fieldName == ‘Fix Version/s’? getFieldById(FIX_FOR_VERSIONS) :
getFieldByName(fieldName)

if (
    !(
        [
            'Description', 'Category', 'Fix Version/s'
        ].contains(fieldName) && (action == 'Create' || status == '0. Created' || action == 'Scope Finished') ||
        fieldName == 'Assignee' && (action == 'Create' || (isInGroupChangeCoordinators||isProjectLead) && (status == '0. Created' || status.contains('Ready to'))) ||
        fieldName == 'Impacted Deliverables' && (status == '0. Created' || action == 'Initiated') ||
        fieldName == 'D&D Alpha Outcome' && (status == '2. Ready to D&D Alpha' || action == 'D&D Alpha Finished') ||
        fieldName == 'D&D Beta Outcome' && (status == '4. Ready to D&D Beta' || action == 'D&D Beta Finished') ||
        fieldName == 'Transfer Outcome' && (status == '6. Ready to Transfer' || action == 'Transfer Finished' ) ||
        fieldName == 'Validation Outcome' && (status == '8. Ready to Validate' || action == 'Validation Finished' )
    )
   )
{
    //field.setHelpText("You don't have the permissions to edit that field.")
    field.setReadOnly(true)
    field.setHidden(true)
}

}

9 months ago

Hi @Jpatterson , any idea if we can expect this feature to be implemented this year or should I pray to Atlassian?

8 months ago

Hi @Vincent Roger, No need to pray to Atlassian for this :) You can expect Behaviours on Issue view this year for sure - likely in October. We’ll be sure to annouce it as soon as it’s released.

Please note that not all of the same fields will be supported on Issue view as Create view. Have a look at Atlassian’s docs to know which ones you can use first https://developer.atlassian.com/platform/forge/custom-ui-jira-bridge/uiModifications/#supported-fields-per-view

8 months ago

Thanks Jpatterson for the feedback!

The list of supported fields for Create screen is extensive. In contrast the View screen supports only 4 fields : priority, summary, assignee, description.

In my use case there is quite a lot of custom (paragraph) fields that need to be set as read only. So it won’t be enough. Hopefully, Issue View will catch up GIC eventually.

In the meantime, I will probably not use behaviours much and instead try to use transition screens + jira.permission.edit.denied workflow property to limit the edition of fields.

8 months ago

Hi everyone! We’re excited to announce that the first release of Behaviours on Issue View is now available. You can learn more about what’s included by checking the announcement blog post here. It also contains demo videos, example use cases and scripts. Our team is already working on adding support for more fields, including the custom single/multi-select fields, and the custom text and paragraph fields.

6 months ago
Changed the status to
Completed
6 months ago
Changed the status to
In Progress
6 months ago

Update: We’ve just released support for 7 new custom field types in Behaviours on Issue View. For a full overview of the supported fields and methods, please see the table below or check our documentation here.

6 months ago
2

For those who might be interested, I submitted an additional request for setVisible/setRequired on more field types here ->
Issue View: Allow for setRequired & setVisible on all Field Types #183

5 months ago
Changed the status to
Completed
a month ago