Forums

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

Problem with JIRA Suit Utilities plugin, Unable to delete the validator after deleting my custom field

Hanumesh Jojode October 17, 2011

Hello,

I developed a plugin of SelectList CF type. During "Resovle" transition i added this custom field as *required* using JIRA Suit Utilities plugin. There after my custom field and the validator provided by JIRA Suit utility lived happily together.

But recently i had to delete my custom filed. After deleting my custom field I am not able to delete the Validator :-(.

Error on Resolve Transition:

"An unknown exception occured executing Validator com.googlecode.jsu.workflow.validator.FieldsRequiredValidator@10499c5: root cause: The second parameter is null."

The following text is displayed under validator:

Type: class
Class: com.googlecode.jsu.workflow.validator.FieldsRequiredValidator
Arguments:
hidFieldsList = customfield_10025@@customfield_10373@@customfield_10177@@customfield_10374@@customfield_10560@@

I don't see the delete option when i create a "draft" of WorkFlow to remove this validator. My deleted custom field ID is customfield_10560.

I followed the amendment of dataBase described here. But no luck.. How can i delete this custom field value from the validators list? or how can i delete the whole validator so that i can re-add the required field again?

Any thouthgs?

Cheers!

3 answers

1 accepted

1 vote
Answer accepted
Denis Yaparov October 17, 2011

You can do this quickly by SQL operator, which deletes occurrences of "@@customfield_10560" from workflow descriptor. Of course, it must be done while Jira is stopped.

Next steps are valid for MySQL, in other databases queries can differ. See your database's manual for REPLACE() string function.

1. Figure out an ID of buggy workflow by SQL query

use jira;

select ID, workflowname from jiraworkflows;

2. Run SQL query for deleting occurrences of "@@customfield_10560"

update jiraworkflows set DESCRIPTOR = REPLACE(DESCRIPTOR, "@@customfield_10560", "") where ID = INSERT_YOUR_WF_ID;

Start Jira instance.

Denis Yaparov

Hanumesh Jojode October 17, 2011

Thanks Denis, Let me try this option on DB and share my feedback.

Another question is that, I have a custom select CF type, I have added values Yes and No for this custom field, but when i go to "Edit Defaults" for this custom field it is not able to populate any values here. Any thoughts? I only see "Set Default" and "Cancle" without field name and values select list on this screen.

Denis Yaparov October 17, 2011

Could you post a screenshot?

Hanumesh Jojode October 17, 2011

I am not able to attach the screenshot here. How to do it?

Hanumesh Jojode October 17, 2011

Denis I am not able to upload a saved image on my PC. The image you uploaded is ffrom web i guess. How to upload an image that i have on my pc?

Denis Yaparov October 17, 2011

You can use one of picture hosting services.

Anyway, you should register this additional question as separate one in main questions list.

Hanumesh Jojode October 17, 2011

Sure will do :-) Thanks for your quick help on REPLACE command.. The fix works with very minimal effort :-D

Cheers!

0 votes
Rina Nir (AC)
Atlassian Partner
December 3, 2015

(JIRA 7)

Had the same bug, and for me the following workaround worked:

exported the workflow XML and found the "offensive" validator. Then edited the workflow and deleted the 'suspicious' jirasuite utilities validator (it looks very normal from the regular workflow editor) and then defined the same one again (using only existing customfields).

 

0 votes
JamieA
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.
October 17, 2011

Sounds like a bug. You could export the workflow as XML, edit the XML to remove this validator (just search for the classname), then create a new workflow based on this XML.

Hanumesh Jojode October 17, 2011

Yes! This is a bug. Thanks Jamie, I did XML import but the problem with this is, After i associate new workflow to a Issue Type i need to change the workflow Scheme for all the projects and this will take more than 48 hours for me to do through UI :-(. Can i change the workflow scheme for all the projects on the database directly?

Another question is that, I have a custom select CF type, I have added values Yes and No for this custom field, but when i go to "Edit Defaults" for this custom field it is not able to populate any values here. Any thoughts? I only see "Set Default" and "Cancle" without field name and values select list on this screen.

Denis Yaparov October 17, 2011

Yes, you can do bulk change WF Scheme by SQL query. There is table "nodeassociation" in Jira database.

Stop Jira instance.

MySQL:

1. Explore it by query

use jira;

select * from nodeassociation limit 100;

2. Figure out an old and a new WF Scheme's IDs

select ID, NAME from workflowscheme;

3. Run substitution SQL query

update nodeassociation set SINK_NODE_ID = INSERT_NEW_WFS_ID where SINK_NODE_ID = INSERT_OLD_WFS_ID and SINK_NODE_ENTITY = 'WorkflowScheme';

Start Jira instance.

Denis Yaparov

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events