The priorities didn't set right when doing a Trac import, so I am just updating them via SQL. Sadly my UPDATE is changing all issues, and not the ones I want.
I want update priority based on what the stringvalue in a customefield. This is what I tried and it just updated priority for all issues.
UPDATE
jiraissue
SET priority = 1
From customfieldvalue
WHERE customfieldvalue.stringvalue = 'Blocking'
Any suggestions
You need a valid join from jiraissue to customfieldvalue don't you. Something like
update jiraissue SET priority=1 where id in (select ji.id from jiraissue ji join customfieldvalue cfv on cfv.ID = ji.ID where cfv.stringvalue = 'Blocking');
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.